Skip to content

Commit 15da041

Browse files
Merge pull request #1110 from furkatgofurov7/sure-9775
Use Rancher secret key names for vSphere in secret mapper
2 parents 9a38d3c + 47df4d1 commit 15da041

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: internal/sync/secret_mapper_sync.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ var (
8080
{to: "AZURE_TENANT_ID_B64", from: B64{source: "azurecredentialConfig-tenantId"}},
8181
},
8282
"vsphere": {
83-
{to: "VSPHERE_PASSWORD", from: Raw{source: "vmwarevsphere-password"}},
84-
{to: "VSPHERE_USERNAME", from: Raw{source: "vmwarevsphere-username"}},
83+
{to: "VSPHERE_PASSWORD", from: Raw{source: "vmwarevspherecredentialConfig-password"}},
84+
{to: "VSPHERE_USERNAME", from: Raw{source: "vmwarevspherecredentialConfig-username"}},
8585
},
8686
"gcp": {
8787
{to: "GCP_B64ENCODED_CREDENTIALS", from: B64{source: "googlecredentialConfig-authEncodedJson"}},

Diff for: internal/sync/secret_mapper_sync_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ var _ = Describe("SecretMapperSync get", func() {
399399
g.Expect(conditions.Get(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).ToNot(BeNil())
400400
g.Expect(conditions.IsFalse(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).To(BeTrue())
401401
g.Expect(conditions.GetMessage(syncer.Source, turtlesv1.RancherCredentialsSecretCondition)).To(
402-
ContainSubstring("key not found: vmwarevsphere-password, key not found: vmwarevsphere-username"))
402+
ContainSubstring("key not found: vmwarevspherecredentialConfig-password, key not found: vmwarevspherecredentialConfig-username"))
403403
g.Expect(syncer.Secret.StringData).To(Equal(map[string]string{
404404
"VSPHERE_PASSWORD": "",
405405
"VSPHERE_USERNAME": "",

0 commit comments

Comments
 (0)