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-07-05 02:34:12 -05:00
|
|
|
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- if .Values.manifests.deployment_scheduler }}
|
2017-01-16 10:47:43 +01:00
|
|
|
{{- $envAll := . }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
2017-07-14 10:44:35 -05:00
|
|
|
{{- $mounts_cinder_scheduler := .Values.pod.mounts.cinder_scheduler.cinder_scheduler }}
|
|
|
|
{{- $mounts_cinder_scheduler_init := .Values.pod.mounts.cinder_scheduler.init_container }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
|
|
|
{{- $serviceAccountName := "cinder-scheduler" }}
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "scheduler" $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-01-10 19:03:57 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cinder-scheduler
|
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 "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
spec:
|
2017-07-13 22:44:26 -05:00
|
|
|
replicas: {{ .Values.pod.replicas.scheduler }}
|
2018-06-11 21:52:18 -05:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{ tuple $envAll "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
2017-07-05 02:34:12 -05:00
|
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2017-07-01 12:00:56 -05:00
|
|
|
{{ tuple $envAll "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
annotations:
|
2019-02-12 12:31:27 -06:00
|
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
2017-05-30 18:16:25 -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" }}
|
2020-02-22 02:55:52 +00:00
|
|
|
{{ dict "envAll" $envAll "podName" "cinder-scheduler" "containerNames" (list "cinder-scheduler" "ceph-coordination-volume-perms" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
spec:
|
2017-12-20 12:21:42 -05:00
|
|
|
serviceAccountName: {{ $serviceAccountName }}
|
2019-07-03 21:51:30 -05:00
|
|
|
{{ dict "envAll" $envAll "application" "cinder_scheduler" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
2017-07-01 12:00:56 -05:00
|
|
|
affinity:
|
|
|
|
{{ tuple $envAll "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
nodeSelector:
|
2018-02-18 23:35:57 -06:00
|
|
|
{{ .Values.labels.scheduler.node_selector_key }}: {{ .Values.labels.scheduler.node_selector_value }}
|
2017-05-15 19:18:01 +00:00
|
|
|
initContainers:
|
2018-05-10 17:09:18 -05:00
|
|
|
{{ tuple $envAll "scheduler" $mounts_cinder_scheduler_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
2018-02-15 20:48:43 -05:00
|
|
|
{{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }}
|
|
|
|
- name: ceph-coordination-volume-perms
|
2018-05-18 10:41:48 -05:00
|
|
|
{{ tuple $envAll "cinder_scheduler" | include "helm-toolkit.snippets.image" | indent 10 }}
|
2019-07-03 21:51:30 -05:00
|
|
|
{{ dict "envAll" $envAll "application" "cinder_scheduler" "container" "ceph_coordination_volume_perms" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
2018-02-15 20:48:43 -05:00
|
|
|
command:
|
|
|
|
- chown
|
|
|
|
- -R
|
|
|
|
- "cinder:"
|
|
|
|
- {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }}
|
|
|
|
volumeMounts:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
mountPath: /tmp
|
2018-02-15 20:48:43 -05:00
|
|
|
- name: cinder-coordination
|
|
|
|
mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }}
|
|
|
|
{{ end }}
|
2017-01-10 19:03:57 +00:00
|
|
|
containers:
|
|
|
|
- name: cinder-scheduler
|
2018-05-18 10:41:48 -05:00
|
|
|
{{ tuple $envAll "cinder_scheduler" | include "helm-toolkit.snippets.image" | indent 10 }}
|
2017-07-11 13:02:23 -05:00
|
|
|
{{ tuple $envAll $envAll.Values.pod.resources.scheduler | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
2019-07-03 21:51:30 -05:00
|
|
|
{{ dict "envAll" $envAll "application" "cinder_scheduler" "container" "cinder_scheduler" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
2017-01-10 19:03:57 +00:00
|
|
|
command:
|
2017-05-31 09:16:23 -05:00
|
|
|
- /tmp/cinder-scheduler.sh
|
2017-01-10 19:03:57 +00:00
|
|
|
volumeMounts:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
mountPath: /tmp
|
2017-05-31 09:16:23 -05:00
|
|
|
- name: cinder-bin
|
|
|
|
mountPath: /tmp/cinder-scheduler.sh
|
|
|
|
subPath: cinder-scheduler.sh
|
|
|
|
readOnly: true
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: cinder-etc
|
2017-05-31 09:16:23 -05:00
|
|
|
mountPath: /etc/cinder/cinder.conf
|
2017-01-10 19:03:57 +00:00
|
|
|
subPath: cinder.conf
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- if .Values.conf.cinder.DEFAULT.log_config_append }}
|
2018-06-17 16:12:25 -05:00
|
|
|
- name: cinder-etc
|
|
|
|
mountPath: {{ .Values.conf.cinder.DEFAULT.log_config_append }}
|
|
|
|
subPath: {{ base .Values.conf.cinder.DEFAULT.log_config_append }}
|
|
|
|
readOnly: true
|
2019-06-17 13:51:21 -05:00
|
|
|
{{- end }}
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: cinder-etc
|
2017-01-10 19:03:57 +00:00
|
|
|
mountPath: /etc/cinder/api-paste.ini
|
|
|
|
subPath: api-paste.ini
|
|
|
|
readOnly: true
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: cinder-etc
|
2020-02-13 14:02:17 +00:00
|
|
|
mountPath: /etc/cinder/policy.yaml
|
|
|
|
subPath: policy.yaml
|
2017-01-10 19:03:57 +00:00
|
|
|
readOnly: true
|
2018-02-15 20:48:43 -05:00
|
|
|
{{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }}
|
|
|
|
- name: cinder-coordination
|
|
|
|
mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }}
|
|
|
|
{{- end }}
|
2020-08-19 21:52:11 +00:00
|
|
|
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.volume.api.internal "path" "/etc/cinder/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
|
2020-07-01 00:25:27 +00:00
|
|
|
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal "path" "/etc/mysql/certs" | include "helm-toolkit.snippets.tls_volume_mount" | indent 12 }}
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_cinder_scheduler.volumeMounts }}{{ toYaml $mounts_cinder_scheduler.volumeMounts | indent 12 }}{{ end }}
|
2017-01-10 19:03:57 +00:00
|
|
|
volumes:
|
2019-04-19 18:06:06 -05:00
|
|
|
- name: pod-tmp
|
|
|
|
emptyDir: {}
|
2017-05-31 09:16:23 -05:00
|
|
|
- name: cinder-bin
|
|
|
|
configMap:
|
|
|
|
name: cinder-bin
|
2017-06-12 00:22:30 -05:00
|
|
|
defaultMode: 0555
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: cinder-etc
|
2018-08-08 14:56:30 -05:00
|
|
|
secret:
|
|
|
|
secretName: cinder-etc
|
2017-06-29 14:36:44 -05:00
|
|
|
defaultMode: 0444
|
2018-02-15 20:48:43 -05:00
|
|
|
{{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }}
|
2020-07-06 14:19:39 -05:00
|
|
|
# NOTE (portdirect): this will need to be set to a shared mount amongst all cinder
|
2018-02-15 20:48:43 -05:00
|
|
|
# pods for the coordination backend to be fully functional.
|
|
|
|
- name: cinder-coordination
|
|
|
|
emptyDir: {}
|
|
|
|
{{- end }}
|
2020-08-19 21:52:11 +00:00
|
|
|
{{- dict "enabled" .Values.manifests.certificates "name" .Values.secrets.tls.volume.api.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
|
2020-07-01 00:25:27 +00:00
|
|
|
{{- dict "enabled" $envAll.Values.manifests.certificates "name" $envAll.Values.endpoints.oslo_db.auth.admin.secret.tls.internal | include "helm-toolkit.snippets.tls_volume" | indent 8 }}
|
2017-08-24 02:54:28 -04:00
|
|
|
{{ if $mounts_cinder_scheduler.volumes }}{{ toYaml $mounts_cinder_scheduler.volumes | indent 8 }}{{ end }}
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|