[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
This commit is contained in:
anthony.bellino 2019-07-21 19:54:55 +00:00
parent 9bf298fea7
commit e29d826c4a
1 changed files with 14 additions and 4 deletions

View File

@ -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