rancher icon indicating copy to clipboard operation
rancher copied to clipboard

[BUG] [CSP Adapter] Adapter constantly errors out when installed before rancher is initialized

Open MbolotSuse opened this issue 2 years ago • 0 comments

Rancher Server Setup

  • Rancher version: 2.6.8
  • Installation option (Docker install/Helm Chart): Helm Chart
    • If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): EKS 1.22
  • Proxy/Cert Details: Self-signed, rancher-generated

User Information

  • What is the role of the user logged in? Admin

Describe the bug

If the csp adapter is installed before rancher is fully initialized (i.e. before the bootstrap password is provided and the server url is created), it will constantly error out. A banner will be created, and the error message will indicate that the adapter was not able to use a blank server-url.

To Reproduce

  1. Deploy an EKS cluster and the other csp-adapter pre-requisites.
  2. Install rancher. Do not specify a bootstrap password. Do not navigate to the URL rancher is installed in.
  3. Install the csp-adapter, following the install instructions.
  4. Go to rancher in your browser and complete the rest of the rancher setup.

Result

A banner has appeared, indicating that the setup is out of compliance. Adapter logs and supportconfigs indicate that the adapter tried to resolve a blank server url.

Expected Result

No banner appears because the setup is not out of compliance.

Additional context

You can resolve the issue by restarting the deployment using kubectl rollout restart deploy/rancher-csp-adapter -n cattle-csp-adapter-system.

The issue seems to be that when the adapter is started/initialized, the server-url setting doesn't exist yet. Since this is not fetched on each loop, the adapter has to be restarted to get the server URL.

MbolotSuse avatar Sep 22 '22 17:09 MbolotSuse