From 64d8c738d02609846deff43081786ba487b35bfa Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Wed, 11 Apr 2018 16:04:44 -0500 Subject: [PATCH] Update htk-manifest with entrypoint updates This updates the htk-manifests with the updates required to use the updated dependency checking for dynamic dependencies Change-Id: I696459ca8b29a80a3096a9d33c1a68b1543534c9 --- helm-toolkit/templates/manifests/_job-bootstrap.yaml | 5 ++--- helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-ks-endpoints.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-ks-service.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl | 5 ++--- helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl | 5 ++--- 8 files changed, 16 insertions(+), 24 deletions(-) diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.yaml b/helm-toolkit/templates/manifests/_job-bootstrap.yaml index 754ff217a..f9b6453d5 100644 --- a/helm-toolkit/templates/manifests/_job-bootstrap.yaml +++ b/helm-toolkit/templates/manifests/_job-bootstrap.yaml @@ -23,7 +23,6 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.bootstrap -}} {{- $podVolMounts := index . "podVolMounts" | default false -}} {{- $podVols := index . "podVols" | default false -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} @@ -35,7 +34,7 @@ limitations under the License. {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "bootstrap" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "bootstrap" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -52,7 +51,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "bootstrap" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: bootstrap image: {{ $envAll.Values.images.tags.bootstrap }} diff --git a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl index 753ff8bd2..43cae950b 100644 --- a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl @@ -28,7 +28,6 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.db_drop -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} {{- $dbToDrop := index . "dbToDrop" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} @@ -37,7 +36,7 @@ limitations under the License. {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "db-drop" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "db_drop" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -57,7 +56,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "db_drop" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: {{- range $key1, $dbToDrop := $dbsToDrop }} {{ $dbToDropType := default "oslo" $dbToDrop.inputType }} diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl index c325ccf92..1656729cf 100644 --- a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl @@ -28,7 +28,6 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.db_init -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} {{- $dbToInit := index . "dbToInit" | default ( dict "adminSecret" $envAll.Values.secrets.oslo_db.admin "configFile" (printf "/etc/%s/%s.conf" $serviceName $serviceName ) "configDbSection" "database" "configDbKey" "connection" ) -}} @@ -37,7 +36,7 @@ limitations under the License. {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "db-init" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "db_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -54,7 +53,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "db_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: {{- range $key1, $dbToInit := $dbsToInit }} {{ $dbToInitType := default "oslo" $dbToInit.inputType }} diff --git a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl index 9ce476268..9ce6aafd3 100644 --- a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl @@ -23,7 +23,6 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := $envAll.Values.dependencies.static.db_sync }} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $configMapEtc := index . "configMapEtc" | default (printf "%s-%s" $serviceName "etc" ) -}} {{- $podVolMounts := index . "podVolMounts" | default false -}} @@ -34,7 +33,7 @@ limitations under the License. {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "db-sync" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "db_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -51,7 +50,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "db_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: {{ printf "%s-%s" $serviceNamePretty "db-sync" | quote }} image: {{ $dbToSync.image | quote }} diff --git a/helm-toolkit/templates/manifests/_job-ks-endpoints.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-endpoints.yaml.tpl index 303816149..f07cb630b 100644 --- a/helm-toolkit/templates/manifests/_job-ks-endpoints.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-endpoints.yaml.tpl @@ -24,12 +24,11 @@ limitations under the License. {{- $serviceName := index . "serviceName" -}} {{- $serviceTypes := index . "serviceTypes" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.ks_endpoints -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-endpoints" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "ks_endpoints" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -46,7 +45,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "ks_endpoints" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: {{- range $key1, $osServiceType := $serviceTypes }} {{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }} diff --git a/helm-toolkit/templates/manifests/_job-ks-service.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-service.yaml.tpl index 9a7c4e932..628b24cac 100644 --- a/helm-toolkit/templates/manifests/_job-ks-service.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-service.yaml.tpl @@ -24,12 +24,11 @@ limitations under the License. {{- $serviceName := index . "serviceName" -}} {{- $serviceTypes := index . "serviceTypes" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.ks_service -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $serviceNamePretty := $serviceName | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceNamePretty "ks-service" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "ks_service" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -46,7 +45,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "ks_service" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: {{- range $key1, $osServiceType := $serviceTypes }} - name: {{ printf "%s-%s" $osServiceType "ks-service-registration" | quote }} diff --git a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl index c4908637c..1a79094cc 100644 --- a/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl @@ -23,13 +23,12 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.ks_user -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $serviceUser := index . "serviceUser" | default $serviceName -}} {{- $serviceUserPretty := $serviceUser | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceUserPretty "ks-user" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "ks_user" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -46,7 +45,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "ks_user" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: ks-user image: {{ $envAll.Values.images.tags.ks_user }} diff --git a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl index bbbde4f8b..53365289a 100644 --- a/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl +++ b/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl @@ -18,13 +18,12 @@ limitations under the License. {{- $envAll := index . "envAll" -}} {{- $serviceName := index . "serviceName" -}} {{- $nodeSelector := index . "nodeSelector" | default ( dict $envAll.Values.labels.job.node_selector_key $envAll.Values.labels.job.node_selector_value ) -}} -{{- $dependencies := index . "dependencies" | default $envAll.Values.dependencies.static.rabbit_init -}} {{- $configMapBin := index . "configMapBin" | default (printf "%s-%s" $serviceName "bin" ) -}} {{- $serviceUser := index . "serviceUser" | default $serviceName -}} {{- $serviceUserPretty := $serviceUser | replace "_" "-" -}} {{- $serviceAccountName := printf "%s-%s" $serviceUserPretty "rabbit-init" }} -{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{ tuple $envAll "rabbit_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- apiVersion: batch/v1 kind: Job @@ -41,7 +40,7 @@ spec: nodeSelector: {{ toYaml $nodeSelector | indent 8 }} initContainers: -{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "rabbit_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: rabbit-init image: {{ $envAll.Values.images.tags.rabbit_init | quote }}