From e29d826c4aaabd288d6394ca38d64a29bdac9725 Mon Sep 17 00:00:00 2001 From: "anthony.bellino" Date: Sun, 21 Jul 2019 19:54:55 +0000 Subject: [PATCH] [fix] Airflow Modified subpath configmap mount fails Because of a kubernetes bug [0] when a container which is mounted with the subpath option, the configmap is changed and then the container restarts the mounting of the configmap fails. This PS uses the projected key for volume definitions as a workaround. [0] https://github.com/kubernetes/kubernetes/issues/68211 Change-Id: I6820a0f963c5b28e1674ea58214ffc86009db4dd --- .../templates/statefulset-airflow-worker.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/charts/shipyard/templates/statefulset-airflow-worker.yaml b/charts/shipyard/templates/statefulset-airflow-worker.yaml index 63f59c11..cfbf9e48 100644 --- a/charts/shipyard/templates/statefulset-airflow-worker.yaml +++ b/charts/shipyard/templates/statefulset-airflow-worker.yaml @@ -183,13 +183,23 @@ spec: mountPath: {{ .Values.conf.airflow.core.base_log_folder }} volumes: - name: airflow-etc - configMap: - name: airflow-etc + projected: defaultMode: 0444 + sources: + - configMap: + name: airflow-etc + items: + - key: airflow.cfg + path: airflow.cfg - name: shipyard-etc - configMap: - name: shipyard-etc + projected: defaultMode: 0444 + sources: + - configMap: + name: shipyard-etc + items: + - key: shipyard.conf + path: shipyard.conf - name: airflow-bin configMap: name: airflow-bin