{{- $searchPath := ":global.kolla.horizon.deployment:global.kolla.horizon.all:global.kolla.all" }} {{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }} {{- $containerConfigDirectory := include "kolla_val_get_str" (dict "key" "container_config_directory" "searchPath" $searchPath "Values" .Values ) }} {{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }} {{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }} {{- $replicas := include "kolla_val_get_str" (dict "key" "replicas" "searchPath" $searchPath "Values" .Values ) }} {{- $c := dict "searchPath" $searchPath "Values" .Values }} {{- $_ := set $c "contName" "horizon" }} {{- $_ := set $c "imageName" "image_full" }} {{- $_ := set $c "tagName" "image_tag" }} {{- $imageFull := include "kolla_build_image_full" $c }} {{- $resourceName := "horizon" }} {{- $netHostTrue := false }} {{- $podTypeBootstrap := false }} {{- $elementName := .Values.element_name | default $resourceName }} {{- with $env := dict "netHostTrue" $netHostTrue "podTypeBootstrap" $podTypeBootstrap "resourceName" $resourceName "Values" .Values "Release" .Release "searchPath" $searchPath }} apiVersion: extensions/v1beta1 kind: Deployment metadata: name: {{ $elementName }} spec: replicas: {{ $replicas }} selector: matchLabels: service: {{ $elementName }} template: metadata: labels: service: {{ $elementName }} spec: nodeSelector: {{ $selectorKey }}: {{ $selectorValue | quote }} initContainers: {{- include "common_dependency_container" $env | indent 8 }} containers: - name: main image: "{{ $imageFull }}" imagePullPolicy: {{ $imagePullPolicy | quote }} volumeMounts: {{- include "common_volume_mounts" $env | indent 10 }} - mountPath: {{ $containerConfigDirectory }} name: horizon-config env: {{- include "common_env_vars" $env | indent 10 }} {{- include "common_containers" $env | indent 6 }} volumes: {{- include "common_volumes" $env | indent 8 }} - name: horizon-config configMap: name: horizon items: - key: horizon.conf path: horizon.conf - key: config.json path: config.json - key: local-settings path: local_settings {{- end }}