Copy the dex configmap before running kubectl_appy_dir_template.
Otherwise there can be a different ordering, in which the configmap file has not
been copied before the 20-deployment.yaml file is rendered by jinja.
@@ -16,9 +16,9 @@ include:
cn = 'Dex',
extra_alt_names = alt_master_names(dex_alt_names)) }}
-# This file needs to be explicitly copied over *before*
-# kubectL_apply_dir_templates run. Otherwise one of the templates attempts to
-# access the file, and it does not exist yet, breaking the orchestration.
+# The following files need to be explicitly copied over *before*
+# kubectl_apply_dir_templates runs. Otherwise one of the templates attempts to
+# access the files, and it does not exist yet, breaking the orchestration.
/etc/kubernetes/addons/dex/15-secret.yaml:
file.managed:
- source: "salt://addons/dex/manifests/15-secret.yaml"
@@ -28,6 +28,15 @@ include:
- template: jinja
- makedirs: true
+/etc/kubernetes/addons/dex/15-configmap.yaml:
+ file.managed:
+ - source: "salt://addons/dex/manifests/15-configmap.yaml"
+ - user: root
+ - group: root
+ - mode: 0600
+ - template: jinja
+ - makedirs: true
+
{{ kubectl_apply_dir_template("salt://addons/dex/manifests/",
"/etc/kubernetes/addons/dex/",
watch=[pillar['ssl']['dex_crt'], pillar['ssl']['dex_key']]) }}
