-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add application credentials support for cinder #7799
Add application credentials support for cinder #7799
Conversation
Hi @Xartos. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@@ -5,6 +5,9 @@ | |||
cinder_auth_url: "{{ lookup('env','OS_AUTH_URL') }}" | |||
cinder_username: "{{ lookup('env','OS_USERNAME') }}" | |||
cinder_password: "{{ lookup('env','OS_PASSWORD') }}" | |||
cinder_application_credential_id: "{{ lookup('env','OS_APPLICATION_CREDENTIAL_ID') }}" | |||
cinder_application_credential_name: "{{ lookup('env','OS_APPLICATION_CREDENTIAL_NAME') }}" | |||
cinder_application_credential_secret: "{{ lookup('env','OS_APPLICATION_CREDENTIAL_SECRET') }}" |
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.
The environment variables seem good for me according to https://github.com/kubernetes/cloud-provider-openstack/blob/ab36705fb740299c57cfeeefec6f4185e5f68579/cmd/client-keystone-auth/main.go#L177-L179
- cinder_username is defined | ||
- cinder_username|length > 0 | ||
- cinder_application_credential_name is not defined or not cinder_application_credential_name | ||
- cinder_application_credential_secret is not defined or not cinder_application_credential_secret |
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.
nit: This cinder_application_credential_secret is checked at the task of line 22.
I guess we can remove this line 37 for checking cinder_password.
fail: | ||
msg: "one of cinder_tenant_id or cinder_tenant_name must be specified" | ||
msg: "one of cinder_domain_id or cinder_domain_name must be specified" |
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.
Why do we need to replace cinder_tenant_id/name with cinder_domain_id/name?
I cannot get the point from the pull request message.
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.
So before this PR tenant_id/name was separated into separate steps, but I merged them to one and added this one for the domain_id/name which weren't checked at all.
So it looks like I replaced tenanat to domain, but that's just how git is interpreting it. I have basically just made this one more similar to this file
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.
Thanks for your explanation, I got the point.
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
fail: | ||
msg: "one of cinder_tenant_id or cinder_tenant_name must be specified" | ||
msg: "one of cinder_domain_id or cinder_domain_name must be specified" |
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.
Thanks for your explanation, I got the point.
forgot to run tests.. /ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, Xartos 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 |
* csi-driver: Added possibility to use application credentials for cinder * external-cloud-controller: Added env vars for openstack application credentials
* csi-driver: Added possibility to use application credentials for cinder * external-cloud-controller: Added env vars for openstack application credentials
* csi-driver: Added possibility to use application credentials for cinder * external-cloud-controller: Added env vars for openstack application credentials
What type of PR is this?
What this PR does / why we need it:
Since we are able to use application credentials for the external openstack cloud controller, we should also be able to use it for cinder.
This change is based on this PR
Also since we don't want to store sensitive credentials in config I also added support for sourcing the credentials from environmentvariables.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?: