Skip to content

fix: Fix secret reference to Rancher cloud credential#1982

Merged
salasberryfin merged 1 commit into
rancher:mainfrom
yiannistri:1978-credentials
Jan 6, 2026
Merged

fix: Fix secret reference to Rancher cloud credential#1982
salasberryfin merged 1 commit into
rancher:mainfrom
yiannistri:1978-credentials

Conversation

@yiannistri
Copy link
Copy Markdown
Contributor

@yiannistri yiannistri commented Jan 5, 2026

What this PR does / why we need it:

This PR fixes the secret reference to Rancher cloud credential.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1978

Special notes for your reviewer:

Running

helm template rancher-turtles-providers ./charts/rancher-turtles-providers --set providers.infrastructureAWS.enabled=true,providers.infrastructureAWS.credentials.name=bar

results in

apiVersion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
  name: aws
  namespace: capa-system
spec:
  name: aws
  type: infrastructure
  enableAutomaticUpdate: true
  variables:
    AWS_B64ENCODED_CREDENTIALS: ""
  credentials:
    rancherCloudCredential: bar

In this case the namespace that will be used to lookup the secret is cattle-global-data.

Running

helm template rancher-turtles-providers ./charts/rancher-turtles-providers --set providers.infrastructureAWS.enabled=true,providers.infrastructureAWS.credentials.name=bar,providers.infrastructureAWS.credentials.namespace=foo

results in

apiVersion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
  name: aws
  namespace: capa-system
spec:
  name: aws
  type: infrastructure
  enableAutomaticUpdate: true
  variables:
    AWS_B64ENCODED_CREDENTIALS: ""
  credentials:
    rancherCloudCredentialNamespaceName: foo:bar

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@yiannistri yiannistri marked this pull request as ready for review January 5, 2026 14:21
@yiannistri yiannistri requested a review from a team as a code owner January 5, 2026 14:21
Copy link
Copy Markdown
Contributor

@anmazzotti anmazzotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, but the schema is not updated accordingly.

Comment thread charts/rancher-turtles-providers/values.schema.json
Copy link
Copy Markdown
Contributor

@salasberryfin salasberryfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yiannistri. LGTM pending the schema update.

@salasberryfin salasberryfin merged commit 4493ee8 into rancher:main Jan 6, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/providers kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error installing a provider when setting the <provider>.credentials field

3 participants