blob: f974f446c281ca53e97715308d80f1dfb3e68b31 [file] [log] [blame]
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -04001{{/*
2# Copyright © 2019 Bell Canada
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16
17apiVersion: batch/v1
18kind: Job
19metadata:
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -040026 heritage: {{ .Release.Service }}
27spec:
28 backoffLimit: 5
29 template:
30 metadata:
31 labels:
32 app: {{ include "common.name" . }}-mgnt
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010033 release: {{ include "common.release" . }}
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -040034 spec:
35 serviceAccount: {{ include "common.fullname" . }}
36 serviceAccountName: {{ include "common.fullname" . }}
37 restartPolicy: Never
38 initContainers:
39 - name: {{ include "common.name" . }}-init-readiness
Sylvain Desbureaux5ee4dd42020-11-21 22:52:46 +010040 image: {{ include "repositoryGenerator.image.readiness" . }}
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -040041 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
42 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020043 - /app/ready.py
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -040044 args:
45 - --container-name
46 - awx-postgres
47 env:
48 - name: NAMESPACE
49 valueFrom:
50 fieldRef:
51 apiVersion: v1
52 fieldPath: metadata.namespace
53 containers:
54 - command: ["/bin/sh","-c"]
55 args: ["/etc/tower/job-entrypoint.sh"]
Sylvain Desbureaux5ee4dd42020-11-21 22:52:46 +010056 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.task }}
Alexis de Talhouëtf83449d2019-05-09 16:49:30 -040057 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
58 name: {{ include "common.name" . }}-mgnt
59 resources:
60 requests:
61 cpu: 1500m
62 memory: 2Gi
63 securityContext:
64 privileged: true
65 volumeMounts:
66 - mountPath: /etc/tower/job-entrypoint.sh
67 name: awx-mgnt
68 readOnly: true
69 subPath: job-entrypoint.py
70 - mountPath: /etc/tower/settings.py
71 name: awx-application-config
72 readOnly: true
73 subPath: settings.py
74 - mountPath: /etc/tower/conf.d/
75 name: awx-application-credentials
76 readOnly: true
77 - mountPath: /etc/tower/SECRET_KEY
78 name: awx-secret-key
79 readOnly: true
80 subPath: SECRET_KEY
81
82 volumes:
83 - configMap:
84 defaultMode: 0777
85 items:
86 - key: entrypoint
87 path: job-entrypoint.py
88 name: {{ include "common.fullname" . }}-init-mgnt
89 name: awx-mgnt
90 - configMap:
91 defaultMode: 420
92 items:
93 - key: awx_settings
94 path: settings.py
95 name: {{ include "common.fullname" . }}-settings
96 name: awx-application-config
97 - name: awx-application-credentials
98 secret:
99 defaultMode: 420
100 items:
101 - key: credentials_py
102 path: credentials.py
103 - key: environment_sh
104 path: environment.sh
105 secretName: {{ include "common.fullname" . }}-secrets
106 - name: awx-secret-key
107 secret:
108 defaultMode: 420
109 items:
110 - key: secret_key
111 path: SECRET_KEY
112 secretName: {{ include "common.fullname" . }}-secrets
113 - configMap:
114 defaultMode: 420
115 items:
116 - key: rabbitmq.conf
117 path: rabbitmq.conf
118 - key: enabled_plugins
119 path: enabled_plugins
120 - key: rabbitmq_definitions.json
121 path: rabbitmq_definitions.json
122 name: {{ include "common.fullname" . }}-rabbitmq
123 name: rabbitmq-config
124 imagePullSecrets:
Bartek Grzybowski2f098b02020-10-05 09:34:26 +0200125 - name: "{{ include "common.namespace" . }}-docker-registry-key"