-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to configure cloud provider and CSI Driver with different credentials #1730
Conversation
16b372d
to
1c039c4
Compare
@@ -1043,8 +1043,8 @@ stringData: | |||
name: cloud-provider-vsphere-credentials | |||
namespace: kube-system | |||
stringData: | |||
{{.vsphereServer}}.password: "{{.eksaVspherePassword}}" | |||
{{.vsphereServer}}.username: "{{.eksaVsphereUsername}}" | |||
{{.vsphereServer}}.password: "{{(or .eksaControlPlanePassword .eksaVspherePassword)}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a plan to migrate to 1 way of doing this? In general, 1 way is better than 2 but with env variables I feel like its more of a necessity as it can be confusing whats configuring what.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point this should be modified to use something other than environment variables.
@@ -577,8 +577,8 @@ stringData: | |||
thumbprint = "{{.thumbprint}}" | |||
|
|||
[VirtualCenter "{{.vsphereServer}}"] | |||
user = "{{.eksaVsphereUsername}}" | |||
password = "{{.eksaVspherePassword}}" | |||
user = "{{( or .eksaCSIUsername .eksaVsphereUsername)}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel it's more clear to handle this in vsphere.go when generating the vars instead of using or
in template.
Here u can just user = "{{( .eksaCSIUsername )}}"
and in vsphere.go if the env does not exist, use eksaCSIUsername=eksaVsphereUsername
Same thing for password.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Could we also change the username and password to be wrapped in single quotes making them literals so escape characters don't cause issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
54c51de
to
baac31a
Compare
done |
/override eks-anywhere-release-tooling-test-presubmit |
@abhay-krishna: Overrode contexts on behalf of abhay-krishna: eks-anywhere-release-tooling-test-presubmit In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@mdsgabriel: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
baac31a
to
0d81f49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
0d81f49
to
fac45db
Compare
decided not to use single quotes for now |
This will allow users to provide different credentials for cloud provider and CSI driver
fac45db
to
c4df74f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiayiwang7 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue #, if available:
Description of changes:
This will allow users to configure cloud provider and CSI Driver with different credentials using new environment variables.
The new environment variables are optional, and if not set, the required variables (EKSA_VSPHERE_USERNAME and EKSA_VSPHERE_PASSWORD) will be used.
Currently the same credentials are used when configuring CAPV, cloud provider and CSI driver. This change will allow users to set new environment variables to be used when configuring cloud provider and CSI credentials:
The new credentials are optional, if not set then the following credentials will be used
Testing (if applicable):
Added unit tests
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.