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 20:57:24 -05:00
|
|
|
|
2018-05-03 16:42:20 -05:00
|
|
|
{{- if .Values.manifests.deployment_engine }}
|
2017-04-20 20:57:24 -05:00
|
|
|
{{- $envAll := . }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
2017-07-14 10:44:35 -05:00
|
|
|
{{- $mounts_senlin_engine := .Values.pod.mounts.senlin_engine.senlin_engine }}
|
|
|
|
{{- $mounts_senlin_engine_init := .Values.pod.mounts.senlin_engine.init_container }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
|
|
|
{{- $serviceAccountName := "senlin-engine" }}
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "engine" $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
|
2018-05-03 16:42:20 -05:00
|
|
|
kind: Deployment
|
2017-04-20 20:57:24 -05:00
|
|
|
metadata:
|
|
|
|
name: senlin-engine
|
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 "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
2017-04-20 20:57:24 -05:00
|
|
|
spec:
|
2017-07-13 22:44:26 -05:00
|
|
|
replicas: {{ .Values.pod.replicas.engine }}
|
2018-06-11 21:52:18 -05:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{ tuple $envAll "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
2017-04-20 20:57:24 -05:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-07-01 12:00:56 -05:00
|
|
|
{{ tuple $envAll "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
2018-05-03 16:42:20 -05:00
|
|
|
annotations:
|
2019-02-12 12:31:27 -06:00
|
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
2018-05-03 16:42:20 -05: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 20:57:24 -05:00
|
|
|
spec:
|
2017-12-20 12:21:42 -05:00
|
|
|
serviceAccountName: {{ $serviceAccountName }}
|
2017-07-01 12:00:56 -05:00
|
|
|
affinity:
|
|
|
|
{{ tuple $envAll "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
2017-04-20 20:57:24 -05:00
|
|
|
nodeSelector:
|
2018-02-18 23:35:57 -06:00
|
|
|
{{ .Values.labels.engine.node_selector_key }}: {{ .Values.labels.engine.node_selector_value }}
|
2017-05-15 19:18:01 +00:00
|
|
|
initContainers:
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "engine" $mounts_senlin_engine_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
2017-04-20 20:57:24 -05:00
|
|
|
containers:
|
|
|
|
- name: senlin-engine
|
2018-05-18 10:41:48 -05:00
|
|
|
{{ tuple $envAll "senlin_engine" | include "helm-toolkit.snippets.image" | indent 10 }}
|
2017-07-11 13:02:23 -05:00
|
|
|
{{ tuple $envAll $envAll.Values.pod.resources.engine | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
2017-08-24 22:03:51 -05:00
|
|
|
securityContext:
|
|
|
|
runAsUser: {{ .Values.pod.user.senlin.uid }}
|
2017-04-20 20:57:24 -05:00
|
|
|
command:
|
|
|
|
- /tmp/senlin-engine.sh
|
|
|
|
volumeMounts:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
mountPath: /tmp
|
2017-04-20 20:57:24 -05:00
|
|
|
- name: senlin-bin
|
|
|
|
mountPath: /tmp/senlin-engine.sh
|
|
|
|
subPath: senlin-engine.sh
|
|
|
|
readOnly: true
|
|
|
|
- name: pod-etc-senlin
|
|
|
|
mountPath: /etc/senlin
|
|
|
|
- name: senlin-etc
|
|
|
|
mountPath: /etc/senlin/senlin.conf
|
|
|
|
subPath: senlin.conf
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- if .Values.conf.senlin.DEFAULT.log_config_append }}
|
2018-06-17 16:12:25 -05:00
|
|
|
- name: senlin-etc
|
|
|
|
mountPath: {{ .Values.conf.senlin.DEFAULT.log_config_append }}
|
|
|
|
subPath: {{ base .Values.conf.senlin.DEFAULT.log_config_append }}
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- end }}
|
2017-04-20 20:57:24 -05:00
|
|
|
- name: senlin-etc
|
2021-05-17 19:16:54 -03:00
|
|
|
mountPath: /etc/senlin/policy.yaml
|
|
|
|
subPath: policy.yaml
|
2017-04-20 20:57:24 -05:00
|
|
|
readOnly: true
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_senlin_engine.volumeMounts }}{{ toYaml $mounts_senlin_engine.volumeMounts | indent 12 }}{{ end }}
|
2017-04-20 20:57:24 -05:00
|
|
|
volumes:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
emptyDir: {}
|
2017-04-20 20:57:24 -05:00
|
|
|
- name: pod-etc-senlin
|
|
|
|
emptyDir: {}
|
|
|
|
- name: senlin-bin
|
|
|
|
configMap:
|
|
|
|
name: senlin-bin
|
2017-06-12 00:22:30 -05:00
|
|
|
defaultMode: 0555
|
2017-04-20 20:57:24 -05:00
|
|
|
- name: senlin-etc
|
2018-08-08 14:56:30 -05:00
|
|
|
secret:
|
|
|
|
secretName: senlin-etc
|
2017-06-29 14:36:44 -05:00
|
|
|
defaultMode: 0444
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_senlin_engine.volumes }}{{ toYaml $mounts_senlin_engine.volumes | indent 8 }}{{ end }}
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|