2017-08-07 17:07:38 -05:00
|
|
|
{{/*
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/}}
|
2017-04-20 21:53:51 -05:00
|
|
|
|
2017-08-28 10:35:53 -05:00
|
|
|
{{- if .Values.manifests.statefulset_conductor }}
|
2017-04-20 21:53:51 -05:00
|
|
|
{{- $envAll := . }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
2017-07-14 10:44:35 -05:00
|
|
|
{{- $mounts_magnum_conductor := .Values.pod.mounts.magnum_conductor.magnum_conductor }}
|
|
|
|
{{- $mounts_magnum_conductor_init := .Values.pod.mounts.magnum_conductor.init_container }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
|
|
|
{{- $serviceAccountName := "magnum-conductor" }}
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "conductor" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
2017-07-01 12:00:56 -05:00
|
|
|
---
|
2018-06-11 21:52:18 -05:00
|
|
|
apiVersion: apps/v1
|
2017-04-20 21:53:51 -05:00
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
name: magnum-conductor
|
2018-09-13 06:29:14 -05:00
|
|
|
annotations:
|
|
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
2018-06-11 21:52:18 -05:00
|
|
|
labels:
|
|
|
|
{{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
2017-04-20 21:53:51 -05:00
|
|
|
spec:
|
|
|
|
serviceName: magnum-conductor
|
2018-05-03 20:02:06 -05:00
|
|
|
podManagementPolicy: "Parallel"
|
2017-07-13 22:44:26 -05:00
|
|
|
replicas: {{ .Values.pod.replicas.conductor }}
|
2018-06-11 21:52:18 -05:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
2017-04-20 21:53:51 -05:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-07-01 12:00:56 -05:00
|
|
|
{{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
2019-02-12 12:31:27 -06:00
|
|
|
annotations:
|
|
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
2021-07-03 16:16:10 -04:00
|
|
|
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
|
|
|
|
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
|
2017-04-20 21:53:51 -05:00
|
|
|
spec:
|
2017-12-20 12:21:42 -05:00
|
|
|
serviceAccountName: {{ $serviceAccountName }}
|
2017-07-01 12:00:56 -05:00
|
|
|
affinity:
|
|
|
|
{{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
2017-04-20 21:53:51 -05:00
|
|
|
nodeSelector:
|
2018-02-18 23:35:57 -06:00
|
|
|
{{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }}
|
2017-05-15 19:18:01 +00:00
|
|
|
initContainers:
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "conductor" $mounts_magnum_conductor_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
2018-05-03 20:02:06 -05:00
|
|
|
- name: magnum-conductor-init
|
2018-05-18 10:41:48 -05:00
|
|
|
{{ tuple $envAll "magnum_conductor" | include "helm-toolkit.snippets.image" | indent 10 }}
|
2018-05-03 20:02:06 -05:00
|
|
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ .Values.pod.user.magnum.uid }}
|
|
|
|
env:
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
command:
|
|
|
|
- /tmp/magnum-conductor-init.sh
|
|
|
|
volumeMounts:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
mountPath: /tmp
|
2018-05-03 20:02:06 -05:00
|
|
|
- name: magnum-bin
|
|
|
|
mountPath: /tmp/magnum-conductor-init.sh
|
|
|
|
subPath: magnum-conductor-init.sh
|
|
|
|
readOnly: true
|
|
|
|
- name: pod-shared
|
|
|
|
mountPath: /tmp/pod-shared
|
2017-04-20 21:53:51 -05:00
|
|
|
containers:
|
|
|
|
- name: magnum-conductor
|
2018-05-18 10:41:48 -05:00
|
|
|
{{ tuple $envAll "magnum_conductor" | include "helm-toolkit.snippets.image" | indent 10 }}
|
2017-07-11 13:02:23 -05:00
|
|
|
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
2017-08-24 22:03:51 -05:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ .Values.pod.user.magnum.uid }}
|
2017-04-20 21:53:51 -05:00
|
|
|
command:
|
|
|
|
- /tmp/magnum-conductor.sh
|
|
|
|
volumeMounts:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
mountPath: /tmp
|
2017-04-20 21:53:51 -05:00
|
|
|
- name: magnum-bin
|
|
|
|
mountPath: /tmp/magnum-conductor.sh
|
|
|
|
subPath: magnum-conductor.sh
|
|
|
|
readOnly: true
|
|
|
|
- name: pod-etc-magnum
|
|
|
|
mountPath: /etc/magnum
|
|
|
|
- name: magnum-etc
|
|
|
|
mountPath: /etc/magnum/magnum.conf
|
|
|
|
subPath: magnum.conf
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- if .Values.conf.magnum.DEFAULT.log_config_append }}
|
2018-06-17 16:12:25 -05:00
|
|
|
- name: magnum-etc
|
|
|
|
mountPath: {{ .Values.conf.magnum.DEFAULT.log_config_append }}
|
|
|
|
subPath: {{ base .Values.conf.magnum.DEFAULT.log_config_append }}
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- end }}
|
2017-04-20 21:53:51 -05:00
|
|
|
- name: magnum-etc
|
2021-05-17 19:16:54 -03:00
|
|
|
mountPath: /etc/magnum/policy.yaml
|
|
|
|
subPath: policy.yaml
|
2017-04-20 21:53:51 -05:00
|
|
|
readOnly: true
|
2018-05-03 20:02:06 -05:00
|
|
|
- name: pod-shared
|
|
|
|
mountPath: /tmp/pod-shared
|
|
|
|
- name: magnum-lock-path
|
|
|
|
mountPath: {{ .Values.conf.magnum.oslo_concurrency.lock_path }}
|
2021-12-02 12:43:32 +04:00
|
|
|
- name: magnum-certificate-cache
|
|
|
|
mountPath: {{ .Values.conf.magnum.cluster.temp_cache_dir }}
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_magnum_conductor.volumeMounts }}{{ toYaml $mounts_magnum_conductor.volumeMounts | indent 12 }}{{ end }}
|
2017-04-20 21:53:51 -05:00
|
|
|
volumes:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
emptyDir: {}
|
2017-04-20 21:53:51 -05:00
|
|
|
- name: pod-etc-magnum
|
|
|
|
emptyDir: {}
|
2018-05-03 20:02:06 -05:00
|
|
|
- name: pod-shared
|
2017-04-20 21:53:51 -05:00
|
|
|
emptyDir: {}
|
|
|
|
- name: magnum-bin
|
|
|
|
configMap:
|
|
|
|
name: magnum-bin
|
2017-06-12 00:22:30 -05:00
|
|
|
defaultMode: 0555
|
2017-04-20 21:53:51 -05:00
|
|
|
- name: magnum-etc
|
2018-08-08 14:56:30 -05:00
|
|
|
secret:
|
|
|
|
secretName: magnum-etc
|
2017-06-29 14:36:44 -05:00
|
|
|
defaultMode: 0444
|
2018-05-03 20:02:06 -05:00
|
|
|
- name: magnum-lock-path
|
|
|
|
emptyDir: {}
|
2021-12-02 12:43:32 +04:00
|
|
|
- name: magnum-certificate-cache
|
|
|
|
emptyDir: {}
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_magnum_conductor.volumes }}{{ toYaml $mounts_magnum_conductor.volumes | indent 8 }}{{ end }}
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|