From 5c3eca7d7fe7df23b0852e197c657806a4144517 Mon Sep 17 00:00:00 2001 From: Albin Vass Date: Wed, 14 Jul 2021 15:00:52 +0200 Subject: [PATCH] Make nodepool external_config mount more generic This instead mounts every key under externalConfig to /etc/ Change-Id: I6d95a7c71e7da4807cfe5621fc427c6762c58ecf --- .../templates/nodepool-launcher.yaml | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/zuul_operator/templates/nodepool-launcher.yaml b/zuul_operator/templates/nodepool-launcher.yaml index 81d1d27..f281196 100644 --- a/zuul_operator/templates/nodepool-launcher.yaml +++ b/zuul_operator/templates/nodepool-launcher.yaml @@ -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 %}