blob: f449245f5d8906d424f193b21640873ea94ec34f [file] [log] [blame]
efiacor2123fec2022-12-09 13:40:55 +00001{{/*
2 # ============LICENSE_START===================================================
3 # Copyright (C) 2022 Nordix Foundation
4 # ============================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=====================================================
19*/}}
efiacorc75eacb2020-04-24 14:29:17 +010020apiVersion: batch/v1
21kind: Job
22metadata:
23 name: {{ include "common.fullname" . }}-dmaap-provisioning
24 namespace: {{ include "common.namespace" . }}
25 labels: {{- include "common.labels" . | nindent 4 }}
26spec:
efiacorea800572020-08-12 14:29:25 +010027 backoffLimit: 20
efiacorc75eacb2020-04-24 14:29:17 +010028 template:
29 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
30 spec:
31 restartPolicy: Never
32 initContainers:
33 - name: {{ include "common.name" . }}-init-readiness
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010034 image: {{ include "repositoryGenerator.image.readiness" . }}
efiacorc75eacb2020-04-24 14:29:17 +010035 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
36 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020037 - /app/ready.py
efiacorc75eacb2020-04-24 14:29:17 +010038 args:
39 - --container-name
efiacor2123fec2022-12-09 13:40:55 +000040 - {{ include "common.name" . }}
efiacorc75eacb2020-04-24 14:29:17 +010041 env:
42 - name: NAMESPACE
43 valueFrom:
44 fieldRef:
45 apiVersion: v1
46 fieldPath: metadata.namespace
47 containers:
48 - name: dmaap-provisioning-job
efiacor2123fec2022-12-09 13:40:55 +000049 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbcClientImage }}
efiacorc75eacb2020-04-24 14:29:17 +010050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 env:
52 - name: DELAY
53 value: "0"
efiacorc75eacb2020-04-24 14:29:17 +010054 - name: PROTO
55 value: "http"
56 - name: PORT
57 value: "8080"
efiacorc75eacb2020-04-24 14:29:17 +010058 - name: REQUESTID
59 value: "{{.Chart.Name}}-dmaap-provisioning"
60 volumeMounts:
61 - mountPath: /etc/localtime
62 name: localtime
63 readOnly: true
64# NOTE: on the following several configMaps, careful to include / at end
65# since there may be more than one file in each mountPath
66# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI
67 - name: {{ include "common.fullname" . }}-dbc-dmaap
68 mountPath: /opt/app/config/dmaap/
69 - name: {{ include "common.fullname" . }}-dbc-dcaelocations
70 mountPath: /opt/app/config/dcaeLocations/
71 - name: {{ include "common.fullname" . }}-dr-nodes
efiacor79148d12020-06-17 15:06:21 +010072 mountPath: /opt/app/config/dr_nodes/
efiacorc75eacb2020-04-24 14:29:17 +010073 - name: {{ include "common.fullname" . }}-feeds
74 mountPath: /opt/app/config/feeds/
75 - name: {{ include "common.fullname" . }}-mr-clusters
efiacor79148d12020-06-17 15:06:21 +010076 mountPath: /opt/app/config/mr_clusters/
efiacorc75eacb2020-04-24 14:29:17 +010077 - name: {{ include "common.fullname" . }}-topics
78 mountPath: /opt/app/config/topics/
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010079 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler0d5c9172022-04-19 18:10:52 +020080 {{ include "common.waitForJobContainer" . | indent 6 | trim }}
efiacorc75eacb2020-04-24 14:29:17 +010081 {{- if .Values.nodeSelector }}
82 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
83 {{- end -}}
84 {{- if .Values.affinity }}
85 affinity: {{ toYaml .Values.affinity | nindent 8 }}
86 {{- end }}
vladimir turokd8044182023-07-27 16:28:36 +020087 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
efiacorc75eacb2020-04-24 14:29:17 +010088 volumes:
89 - name: localtime
90 hostPath:
91 path: /etc/localtime
92 - name: {{ include "common.fullname" . }}-dbc-dmaap
93 configMap:
94 name: {{ include "common.fullname" . }}-dbc-dmaap
95 - name: {{ include "common.fullname" . }}-dbc-dcaelocations
96 configMap:
97 name: {{ include "common.fullname" . }}-dbc-dcaelocations
98 - name: {{ include "common.fullname" . }}-dr-nodes
99 configMap:
100 name: {{ include "common.fullname" . }}-dr-nodes
101 - name: {{ include "common.fullname" . }}-feeds
102 configMap:
103 name: {{ include "common.fullname" . }}-feeds
104 - name: {{ include "common.fullname" . }}-mr-clusters
105 configMap:
106 name: {{ include "common.fullname" . }}-mr-clusters
107 - name: {{ include "common.fullname" . }}-topics
108 configMap:
109 name: {{ include "common.fullname" . }}-topics
110 imagePullSecrets:
111 - name: "{{ include "common.namespace" . }}-docker-registry-key"