-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,38 @@ | |
msg: "cinder_auth_url is missing" | ||
when: cinder_auth_url is not defined or not cinder_auth_url | ||
|
||
- name: Cinder CSI Driver | check cinder_username value | ||
- name: Cinder CSI Driver | check cinder_username value cinder_application_credential_name value | ||
fail: | ||
msg: "cinder_username is missing" | ||
when: cinder_username is not defined or not cinder_username | ||
msg: "you must either set cinder_username or cinder_application_credential_name" | ||
when: | ||
- cinder_username is not defined or not cinder_username | ||
- cinder_application_credential_name is not defined or not cinder_application_credential_name | ||
|
||
- name: Cinder CSI Driver | check cinder_application_credential_id value | ||
fail: | ||
msg: "cinder_application_credential_id is missing" | ||
when: | ||
- cinder_application_credential_name is defined | ||
- cinder_application_credential_name|length > 0 | ||
- cinder_application_credential_id is not defined or not cinder_application_credential_id | ||
|
||
- name: Cinder CSI Driver | check cinder_application_credential_secret value | ||
fail: | ||
msg: "cinder_application_credential_secret is missing" | ||
when: | ||
- cinder_application_credential_name is defined | ||
- cinder_application_credential_name|length > 0 | ||
- cinder_application_credential_secret is not defined or not cinder_application_credential_secret | ||
|
||
- name: Cinder CSI Driver | check cinder_password value | ||
fail: | ||
msg: "cinder_password is missing" | ||
when: cinder_password is not defined or not cinder_password | ||
when: | ||
- 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 commentThe 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. |
||
- cinder_password is not defined or not cinder_password | ||
|
||
- name: Cinder CSI Driver | check cinder_region value | ||
fail: | ||
|
@@ -24,11 +47,13 @@ | |
msg: "one of cinder_tenant_id or cinder_tenant_name must be specified" | ||
when: | ||
- cinder_tenant_id is not defined or not cinder_tenant_id | ||
- cinder_tenant_name is not defined | ||
- cinder_tenant_name is not defined or not cinder_tenant_name | ||
- cinder_application_credential_name is not defined or not cinder_application_credential_name | ||
|
||
- name: Cinder CSI Driver | check cinder_tenant_name value | ||
- name: Cinder CSI Driver | check cinder_domain_id value | ||
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 commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your explanation, I got the point. |
||
when: | ||
- cinder_tenant_name is not defined or not cinder_tenant_name | ||
- cinder_tenant_id is not defined | ||
- cinder_domain_id is not defined or not cinder_domain_id | ||
- cinder_domain_name is not defined or not cinder_domain_name | ||
- cinder_application_credential_name is not defined or not cinder_application_credential_name |
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