Skip to content

Commit

Permalink
Merge pull request #1110 from furkatgofurov7/sure-9775
Browse files Browse the repository at this point in the history
Use Rancher secret key names for vSphere in secret mapper
  • Loading branch information
alexander-demicev authored Feb 27, 2025
2 parents 9a38d3c + 47df4d1 commit 15da041
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/sync/secret_mapper_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ var (
{to: "AZURE_TENANT_ID_B64", from: B64{source: "azurecredentialConfig-tenantId"}},
},
"vsphere": {
{to: "VSPHERE_PASSWORD", from: Raw{source: "vmwarevsphere-password"}},
{to: "VSPHERE_USERNAME", from: Raw{source: "vmwarevsphere-username"}},
{to: "VSPHERE_PASSWORD", from: Raw{source: "vmwarevspherecredentialConfig-password"}},
{to: "VSPHERE_USERNAME", from: Raw{source: "vmwarevspherecredentialConfig-username"}},
},
"gcp": {
{to: "GCP_B64ENCODED_CREDENTIALS", from: B64{source: "googlecredentialConfig-authEncodedJson"}},
Expand Down
2 changes: 1 addition & 1 deletion internal/sync/secret_mapper_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ var _ = Describe("SecretMapperSync get", func() {
g.Expect(conditions.Get(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).ToNot(BeNil())
g.Expect(conditions.IsFalse(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).To(BeTrue())
g.Expect(conditions.GetMessage(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).To(
ContainSubstring("key not found: vmwarevsphere-password, key not found: vmwarevsphere-username"))
ContainSubstring("key not found: vmwarevspherecredentialConfig-password, key not found: vmwarevspherecredentialConfig-username"))
g.Expect(syncer.Secret.StringData).To(Equal(map[string]string{
"VSPHERE_PASSWORD": "",
"VSPHERE_USERNAME": "",
Expand Down

0 comments on commit 15da041

Please sign in to comment.