zuul-operator/zuul_operator/templates/nodepool-launcher.yaml
Albin Vass 5c3eca7d7f Make nodepool external_config mount more generic
This instead mounts every key under externalConfig to /etc/<key>

Change-Id: I6d95a7c71e7da4807cfe5621fc427c6762c58ecf
2021-08-05 07:35:07 -07:00

58 lines
1.8 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nodepool-launcher-{{ provider_name }}
labels:
app.kubernetes.io/name: nodepool
app.kubernetes.io/instance: {{ instance_name }}
app.kubernetes.io/part-of: zuul
app.kubernetes.io/component: nodepool-launcher
operator.zuul-ci.org/nodepool-provider: {{ provider_name }}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: nodepool
app.kubernetes.io/instance: {{ instance_name }}
app.kubernetes.io/part-of: zuul
app.kubernetes.io/component: nodepool-launcher
operator.zuul-ci.org/nodepool-provider: {{ provider_name }}
template:
metadata:
labels:
app.kubernetes.io/name: nodepool
app.kubernetes.io/instance: {{ instance_name }}
app.kubernetes.io/part-of: zuul
app.kubernetes.io/component: nodepool-launcher
operator.zuul-ci.org/nodepool-provider: {{ provider_name }}
spec:
containers:
- name: launcher
image: {{ spec.imagePrefix }}/nodepool-launcher:{{ spec.nodepoolImageVersion }}
env: {{ spec.env | zuul_to_json }}
volumeMounts:
- name: nodepool-config
mountPath: /etc/nodepool
readOnly: true
- name: zookeeper-client-tls
mountPath: /tls/client
readOnly: true
{%- for name, c in external_config.items() %}
- name: {{ name }}
mountPath: /etc/{{ name }}
readOnly: true
{%- endfor %}
volumes:
- name: nodepool-config
secret:
secretName: {{ nodepool_config_secret_name }}
- name: zookeeper-client-tls
secret:
secretName: zookeeper-client-tls
{%- for name, c in external_config.items() %}
- name: {{ name }}
secret:
secretName: {{ c['secretName'] }}
{%- endfor %}