4479a0d93f
This work is dependant on the Common Chart elements introduced with the Heat PR, and should not be merged prior to https://github.com/att-comdev/openstack-helm/pull/77
60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
{{- $envAll := . }}
|
|
{{- $ksAdminSecret := .Values.keystone.admin_secret | default "cinder-env-keystone-admin" }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: cinder-ks-service
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
pod.beta.kubernetes.io/init-containers: '[
|
|
{
|
|
"name": "init",
|
|
"image": {{ .Values.images.dep_check | quote }},
|
|
"imagePullPolicy": {{ .Values.images.pull_policy | quote }},
|
|
"env": [
|
|
{
|
|
"name": "NAMESPACE",
|
|
"value": "{{ .Release.Namespace }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_SERVICE",
|
|
"value": "{{ include "joinListWithColon" .Values.dependencies.ks_service.service }}"
|
|
},
|
|
{
|
|
"name": "COMMAND",
|
|
"value": "echo done"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
{{- range $key1, $osServiceName := tuple "cinder" "cinderv2" "cinderv3" }}
|
|
- name: {{ $osServiceName }}-ks-service-registration
|
|
image: {{ $envAll.Values.images.ks_service }}
|
|
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
|
|
command:
|
|
- bash
|
|
- /tmp/ks-service.sh
|
|
volumeMounts:
|
|
- name: ks-service-sh
|
|
mountPath: /tmp/ks-service.sh
|
|
subPath: ks-service.sh
|
|
readOnly: true
|
|
env:
|
|
{{- with $env := dict "ksUserSecret" $ksAdminSecret }}
|
|
{{- include "env_ks_openrc_tpl" $env | indent 12 }}
|
|
{{- end }}
|
|
- name: OS_SERVICE_NAME
|
|
value: {{ $osServiceName }}
|
|
- name: OS_SERVICE_TYPE
|
|
value: {{ tuple $osServiceName $envAll | include "endpoint_type_lookup" }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: ks-service-sh
|
|
configMap:
|
|
name: cinder-bin
|