Skip to content
Snippets Groups Projects
Unverified Commit d56e9f6b authored by Ali Sanhaji's avatar Ali Sanhaji Committed by GitHub
Browse files

Fix Cinder CSI bugs (#5492)

parent 57b0b6a9
No related branches found
No related tags found
No related merge requests found
...@@ -6,11 +6,12 @@ cinder_auth_url: "{{ lookup('env','OS_AUTH_URL') }}" ...@@ -6,11 +6,12 @@ cinder_auth_url: "{{ lookup('env','OS_AUTH_URL') }}"
cinder_username: "{{ lookup('env','OS_USERNAME') }}" cinder_username: "{{ lookup('env','OS_USERNAME') }}"
cinder_password: "{{ lookup('env','OS_PASSWORD') }}" cinder_password: "{{ lookup('env','OS_PASSWORD') }}"
cinder_region: "{{ lookup('env','OS_REGION_NAME') }}" cinder_region: "{{ lookup('env','OS_REGION_NAME') }}"
cinder_tenant_id: "{{ lookup('env','OS_TENANT_ID')| default(lookup('env','OS_PROJECT_ID')|default(lookup('env','OS_PROJECT_NAME'),true),true) }}" cinder_tenant_id: "{{ lookup('env','OS_TENANT_ID')| default(lookup('env','OS_PROJECT_ID'),true) }}"
cinder_tenant_name: "{{ lookup('env','OS_TENANT_NAME') }}" cinder_tenant_name: "{{ lookup('env','OS_TENANT_NAME')| default(lookup('env','OS_PROJECT_NAME'),true) }}"
cinder_domain_name: "{{ lookup('env','OS_USER_DOMAIN_NAME') }}" cinder_domain_name: "{{ lookup('env','OS_USER_DOMAIN_NAME') }}"
cinder_domain_id: "{{ lookup('env','OS_USER_DOMAIN_ID') }}" cinder_domain_id: "{{ lookup('env','OS_USER_DOMAIN_ID') }}"
cinder_cacert: "{{ lookup('env','OS_CACERT') }}" cinder_cacert: "{{ lookup('env','OS_CACERT') }}"
# For now, only Cinder v3 is supported in Cinder CSI driver # For now, only Cinder v3 is supported in Cinder CSI driver
cinder_blockstorage_version: "v3" cinder_blockstorage_version: "v3"
cinder_csi_controller_replicas: 1 cinder_csi_controller_replicas: 1
\ No newline at end of file
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
- name: Cinder CSI Driver | check cinder_tenant_id value - name: Cinder CSI Driver | check cinder_tenant_id value
fail: fail:
msg: "one of cinder_tenant_id or cinder_trust_id must be specified" msg: "one of cinder_tenant_id or cinder_tenant_name must be specified"
when: when:
- cinder_tenant_id is not defined or not cinder_tenant_id - cinder_tenant_id is not defined or not cinder_tenant_id
- cinder_trust_id is not defined - cinder_tenant_name is not defined
- name: Cinder CSI Driver | check cinder_trust_id value - name: Cinder CSI Driver | check cinder_tenant_name value
fail: fail:
msg: "one of cinder_tenant_id or cinder_trust_id must be specified" msg: "one of cinder_tenant_id or cinder_tenant_name must be specified"
when: when:
- cinder_trust_id is not defined or not cinder_trust_id - cinder_tenant_name is not defined or not cinder_tenant_name
- cinder_tenant_id is not defined - cinder_tenant_id is not defined
...@@ -3,9 +3,7 @@ auth-url="{{ cinder_auth_url }}" ...@@ -3,9 +3,7 @@ auth-url="{{ cinder_auth_url }}"
username="{{ cinder_username }}" username="{{ cinder_username }}"
password="{{ cinder_password }}" password="{{ cinder_password }}"
region="{{ cinder_region }}" region="{{ cinder_region }}"
{% if cinder_trust_id is defined and cinder_trust_id != "" %} {% if cinder_tenant_id is defined and cinder_tenant_id != "" %}
trust-id="{{ cinder_trust_id }}"
{% else %}
tenant-id="{{ cinder_tenant_id }}" tenant-id="{{ cinder_tenant_id }}"
{% endif %} {% endif %}
{% if cinder_tenant_name is defined and cinder_tenant_name != "" %} {% if cinder_tenant_name is defined and cinder_tenant_name != "" %}
......
...@@ -90,7 +90,7 @@ spec: ...@@ -90,7 +90,7 @@ spec:
- name: secret-cinderplugin - name: secret-cinderplugin
mountPath: /etc/config mountPath: /etc/config
readOnly: true readOnly: true
{% if cinder_cacert is defined %} {% if cinder_cacert is defined and cinder_cacert != "" %}
- name: cinder-cacert - name: cinder-cacert
mountPath: {{ kube_config_dir }}/cinder-cacert.pem mountPath: {{ kube_config_dir }}/cinder-cacert.pem
readOnly: true readOnly: true
...@@ -101,7 +101,7 @@ spec: ...@@ -101,7 +101,7 @@ spec:
- name: secret-cinderplugin - name: secret-cinderplugin
secret: secret:
secretName: cloud-config secretName: cloud-config
{% if cinder_cacert is defined %} {% if cinder_cacert is defined and cinder_cacert != "" %}
- name: cinder-cacert - name: cinder-cacert
hostPath: hostPath:
path: {{ kube_config_dir }}/cinder-cacert.pem path: {{ kube_config_dir }}/cinder-cacert.pem
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment