Make nodepool external_config mount more generic

This instead mounts every key under externalConfig to /etc/<key>

Change-Id: I6d95a7c71e7da4807cfe5621fc427c6762c58ecf
This commit is contained in:
Albin Vass 2021-07-14 15:00:52 +02:00 committed by James E. Blair
parent 40f13b5ca9
commit 5c3eca7d7f

View File

@ -38,16 +38,11 @@ spec:
- name: zookeeper-client-tls
mountPath: /tls/client
readOnly: true
{%- if 'openstack' in external_config %}
- name: openstack
mountPath: /etc/openstack
{%- for name, c in external_config.items() %}
- name: {{ name }}
mountPath: /etc/{{ name }}
readOnly: true
{%- endif %}
{%- if 'kubernetes' in external_config %}
- name: kubernetes
mountPath: /etc/kubernetes
readOnly: true
{%- endif %}
{%- endfor %}
volumes:
- name: nodepool-config
secret:
@ -55,13 +50,8 @@ spec:
- name: zookeeper-client-tls
secret:
secretName: zookeeper-client-tls
{%- if 'openstack' in external_config %}
- name: openstack
{%- for name, c in external_config.items() %}
- name: {{ name }}
secret:
secretName: {{ external_config['openstack']['secretName'] }}
{%- endif %}
{%- if 'kubernetes' in external_config %}
- name: kubernetes
secret:
secretName: {{ external_config['kubernetes']['secretName'] }}
{%- endif %}
secretName: {{ c['secretName'] }}
{%- endfor %}