2017-08-07 17:07:38 -05:00
|
|
|
{{/*
|
|
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
|
|
|
|
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-02-17 13:05:32 -05:00
|
|
|
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- if .Values.manifests.job_db_sync }}
|
2017-01-22 05:39:25 +00:00
|
|
|
{{- $envAll := . }}
|
|
|
|
{{- $dependencies := .Values.dependencies.db_sync }}
|
2017-12-20 12:21:42 -05:00
|
|
|
|
|
|
|
{{- $serviceAccountName := "neutron-db-sync" }}
|
|
|
|
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
2017-07-05 02:34:12 -05:00
|
|
|
---
|
2017-01-03 12:28:44 -08:00
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: Job
|
|
|
|
metadata:
|
|
|
|
name: neutron-db-sync
|
|
|
|
spec:
|
|
|
|
template:
|
2017-08-05 14:29:32 -05:00
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
{{ tuple $envAll "neutron" "db-sync" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
2017-01-03 12:28:44 -08:00
|
|
|
spec:
|
2017-12-20 12:21:42 -05:00
|
|
|
serviceAccountName: {{ $serviceAccountName }}
|
2017-01-03 12:28:44 -08:00
|
|
|
restartPolicy: OnFailure
|
2017-01-11 15:01:58 +01:00
|
|
|
nodeSelector:
|
2018-02-07 10:15:21 -05:00
|
|
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
2017-05-15 19:18:01 +00:00
|
|
|
initContainers:
|
2017-12-20 12:21:42 -05:00
|
|
|
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
2017-01-03 12:28:44 -08:00
|
|
|
containers:
|
|
|
|
- name: neutron-db-sync
|
2017-12-01 11:14:30 -06:00
|
|
|
image: {{ .Values.images.tags.neutron_db_sync }}
|
2017-01-03 12:28:44 -08:00
|
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
2017-07-11 13:02:23 -05:00
|
|
|
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
|
|
{{- if .Values.pod.resources.enabled }}
|
2017-02-01 21:47:59 -06:00
|
|
|
resources:
|
|
|
|
limits:
|
2017-07-11 13:02:23 -05:00
|
|
|
cpu: {{ .Values.pod.resources.jobs.db_sync.limits.cpu | quote }}
|
|
|
|
memory: {{ .Values.pod.resources.jobs.db_sync.limits.memory | quote }}
|
2017-02-01 21:47:59 -06:00
|
|
|
requests:
|
2017-07-11 13:02:23 -05:00
|
|
|
cpu: {{ .Values.pod.resources.jobs.db_sync.requests.cpu | quote }}
|
|
|
|
memory: {{ .Values.pod.resources.jobs.db_sync.requests.memory | quote }}
|
2017-02-01 21:47:59 -06:00
|
|
|
{{- end }}
|
2017-04-04 10:34:25 -05:00
|
|
|
command:
|
|
|
|
- /tmp/db-sync.sh
|
2017-01-03 12:28:44 -08:00
|
|
|
volumeMounts:
|
2017-04-04 10:34:25 -05:00
|
|
|
- name: neutron-bin
|
|
|
|
mountPath: /tmp/db-sync.sh
|
|
|
|
subPath: db-sync.sh
|
|
|
|
readOnly: true
|
|
|
|
- name: etcneutron
|
2017-01-22 05:39:25 +00:00
|
|
|
mountPath: /etc/neutron
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: neutron-etc
|
2017-01-03 12:28:44 -08:00
|
|
|
mountPath: /etc/neutron/neutron.conf
|
|
|
|
subPath: neutron.conf
|
2017-04-04 10:34:25 -05:00
|
|
|
readOnly: true
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: neutron-etc
|
2017-04-10 13:14:10 -07:00
|
|
|
mountPath: /etc/neutron/plugins/ml2/ml2_conf.ini
|
|
|
|
subPath: ml2_conf.ini
|
2017-04-04 10:34:25 -05:00
|
|
|
readOnly: true
|
2017-01-03 12:28:44 -08:00
|
|
|
volumes:
|
2017-04-04 10:34:25 -05:00
|
|
|
- name: etcneutron
|
2017-01-22 05:39:25 +00:00
|
|
|
emptyDir: {}
|
2017-04-26 15:22:17 +00:00
|
|
|
- name: neutron-etc
|
2017-01-03 12:28:44 -08:00
|
|
|
configMap:
|
|
|
|
name: neutron-etc
|
2017-06-29 14:36:44 -05:00
|
|
|
defaultMode: 0444
|
2017-04-04 10:34:25 -05:00
|
|
|
- name: neutron-bin
|
2017-01-03 12:28:44 -08:00
|
|
|
configMap:
|
2017-04-04 10:34:25 -05:00
|
|
|
name: neutron-bin
|
2017-06-12 00:22:30 -05:00
|
|
|
defaultMode: 0555
|
2017-08-07 11:37:42 -05:00
|
|
|
{{- end }}
|