efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 1 | {{/* |
| 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 | */}} |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 20 | apiVersion: batch/v1 |
| 21 | kind: Job |
| 22 | metadata: |
| 23 | name: {{ include "common.fullname" . }}-dmaap-provisioning |
| 24 | namespace: {{ include "common.namespace" . }} |
| 25 | labels: {{- include "common.labels" . | nindent 4 }} |
| 26 | spec: |
efiacor | ea80057 | 2020-08-12 14:29:25 +0100 | [diff] [blame] | 27 | backoffLimit: 20 |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 28 | template: |
| 29 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
| 30 | spec: |
| 31 | restartPolicy: Never |
| 32 | initContainers: |
| 33 | - name: {{ include "common.name" . }}-init-readiness |
Sylvain Desbureaux | 6b09654 | 2020-11-21 22:51:24 +0100 | [diff] [blame] | 34 | image: {{ include "repositoryGenerator.image.readiness" . }} |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 35 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 36 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 37 | - /app/ready.py |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 38 | args: |
| 39 | - --container-name |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 40 | - {{ include "common.name" . }} |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 41 | env: |
| 42 | - name: NAMESPACE |
| 43 | valueFrom: |
| 44 | fieldRef: |
| 45 | apiVersion: v1 |
| 46 | fieldPath: metadata.namespace |
| 47 | containers: |
| 48 | - name: dmaap-provisioning-job |
efiacor | 2123fec | 2022-12-09 13:40:55 +0000 | [diff] [blame] | 49 | image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbcClientImage }} |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | env: |
| 52 | - name: DELAY |
| 53 | value: "0" |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 54 | - name: PROTO |
| 55 | value: "http" |
| 56 | - name: PORT |
| 57 | value: "8080" |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 58 | - 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 |
efiacor | 79148d1 | 2020-06-17 15:06:21 +0100 | [diff] [blame] | 72 | mountPath: /opt/app/config/dr_nodes/ |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 73 | - name: {{ include "common.fullname" . }}-feeds |
| 74 | mountPath: /opt/app/config/feeds/ |
| 75 | - name: {{ include "common.fullname" . }}-mr-clusters |
efiacor | 79148d1 | 2020-06-17 15:06:21 +0100 | [diff] [blame] | 76 | mountPath: /opt/app/config/mr_clusters/ |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 77 | - name: {{ include "common.fullname" . }}-topics |
| 78 | mountPath: /opt/app/config/topics/ |
miroslavmasaryk | a7ac7f0 | 2023-03-01 14:12:26 +0100 | [diff] [blame] | 79 | resources: {{ include "common.resources" . | nindent 10 }} |
Andreas Geissler | 0d5c917 | 2022-04-19 18:10:52 +0200 | [diff] [blame] | 80 | {{ include "common.waitForJobContainer" . | indent 6 | trim }} |
efiacor | c75eacb | 2020-04-24 14:29:17 +0100 | [diff] [blame] | 81 | {{- 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 }} |
| 87 | volumes: |
| 88 | - name: localtime |
| 89 | hostPath: |
| 90 | path: /etc/localtime |
| 91 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 92 | configMap: |
| 93 | name: {{ include "common.fullname" . }}-dbc-dmaap |
| 94 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 95 | configMap: |
| 96 | name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 97 | - name: {{ include "common.fullname" . }}-dr-nodes |
| 98 | configMap: |
| 99 | name: {{ include "common.fullname" . }}-dr-nodes |
| 100 | - name: {{ include "common.fullname" . }}-feeds |
| 101 | configMap: |
| 102 | name: {{ include "common.fullname" . }}-feeds |
| 103 | - name: {{ include "common.fullname" . }}-mr-clusters |
| 104 | configMap: |
| 105 | name: {{ include "common.fullname" . }}-mr-clusters |
| 106 | - name: {{ include "common.fullname" . }}-topics |
| 107 | configMap: |
| 108 | name: {{ include "common.fullname" . }}-topics |
| 109 | imagePullSecrets: |
| 110 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |