blob: 6ed5dee8ee265bfb51bc7f54a779600b27818fb4 [file] [log] [blame]
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -07001{{/*
2# Copyright 2019 Intel Corporation, Inc
Andreas Geissler6fd28212024-10-22 11:33:38 +02003# Modifications Copyright © 2024 Deutsche Telekom
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -07004#
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
kwasield74d38f2020-07-23 10:09:57 +000018apiVersion: apps/v1
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070019kind: Deployment
Andreas Geissler718fb742023-03-09 09:44:02 +010020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070021spec:
Andreas Geissler718fb742023-03-09 09:44:02 +010022 selector: {{- include "common.selectors" . | nindent 4 }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070023 replicas: {{ .Values.replicaCount }}
24 template:
Andreas Geissler718fb742023-03-09 09:44:02 +010025 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070026 spec:
Andreas Geissler6fd28212024-10-22 11:33:38 +020027 {{ include "common.podSecurityContext" . | indent 6 | trim }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070028 containers:
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010029 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070030 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
31 name: {{ include "common.name" . }}
32 command: ["/opt/multicloud/k8splugin/k8plugin"]
33 workingDir: /opt/multicloud/k8splugin
Andreas Geissler718fb742023-03-09 09:44:02 +010034 ports: {{ include "common.containerPorts" . | nindent 10 }}
Andreas Geissler6fd28212024-10-22 11:33:38 +020035 {{ include "common.containerSecurityContext" . | indent 10 | trim }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070036 {{- if eq .Values.liveness.enabled true }}
37 livenessProbe:
38 tcpSocket:
39 port: {{ .Values.service.internalPort }}
40 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
41 periodSeconds: {{ .Values.liveness.periodSeconds }}
42 {{ end -}}
43 readinessProbe:
44 tcpSocket:
45 port: {{ .Values.service.internalPort }}
46 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
47 periodSeconds: {{ .Values.readiness.periodSeconds }}
48 volumeMounts:
Andreas Geisslera00b9032024-11-27 13:21:36 +010049 - mountPath: /tmp
50 name: tmp-dir-k8s
51 - mountPath: /opt/multicloud/k8splugin/k8sconfig.json
52 name: {{ include "common.name" .}}
53 subPath: k8sconfig.json
miroslavmasaryka7ac7f02023-03-01 14:12:26 +010054 resources: {{ include "common.resources" . | nindent 10 }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070055 {{- if .Values.nodeSelector }}
56 nodeSelector:
57{{ toYaml .Values.nodeSelector | indent 10 }}
58 {{- end -}}
59 {{- if .Values.affinity }}
60 affinity:
61{{ toYaml .Values.affinity | indent 10 }}
62 {{- end }}
Sylvain Desbureaux37dc40c2020-11-21 22:46:57 +010063 - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.artifactImage }}
Andreas Geisslerdfa23c82022-05-13 16:54:43 +020064 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
liboNet80f587a2019-05-17 01:30:16 +080065 name: framework-artifactbroker
66 command: ["/opt/app/distribution/bin/artifact-dist.sh"]
67 args: ["/opt/app/distribution/etc/mounted/config.json"]
Andreas Geissler6fd28212024-10-22 11:33:38 +020068 {{ include "common.containerSecurityContext" . | indent 10 | trim }}
69 resources: {{ include "common.resources" . | nindent 10 }}
liboNet80f587a2019-05-17 01:30:16 +080070 ports:
71 - containerPort: {{ .Values.artifactbroker.internalPort }}
72 protocol: TCP
Andreas Geissler6fd28212024-10-22 11:33:38 +020073 {{- if eq .Values.liveness.enabled true }}
74 livenessProbe:
75 tcpSocket:
76 port: {{ .Values.artifactbroker.internalPort }}
77 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.liveness.periodSeconds }}
79 {{ end -}}
80 readinessProbe:
81 tcpSocket:
82 port: {{ .Values.artifactbroker.internalPort }}
83 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
84 periodSeconds: {{ .Values.readiness.periodSeconds }}
liboNet80f587a2019-05-17 01:30:16 +080085 volumeMounts:
Andreas Geisslera00b9032024-11-27 13:21:36 +010086 - mountPath: /tmp
87 name: tmp-dir-broker
Andreas Geissler6fd28212024-10-22 11:33:38 +020088 - mountPath: "{{ .Values.log.path }}"
89 name: framework-log
liboNet80f587a2019-05-17 01:30:16 +080090 - mountPath: /opt/app/distribution/etc/mounted/config.json
91 name: {{ include "common.name" .}}
92 subPath: config.json
93 - mountPath: /data
94 name: artifact-data
efiacorc8c33162022-11-25 11:36:52 +000095 env:
efiacorc8c33162022-11-25 11:36:52 +000096 - name: SASL_JAAS_CONFIG
david.mcweeney2886a112023-02-10 12:35:20 +000097 valueFrom:
98 secretKeyRef:
99 name: {{ include "common.name" . }}-ku
100 key: sasl.jaas.config
farida azmy72513552021-10-12 18:55:21 +0200101 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -0700102 volumes:
Andreas Geisslera00b9032024-11-27 13:21:36 +0100103 - name: tmp-dir-k8s
104 emptyDir:
105 sizeLimit: {{ .Values.volumes.tmpK8SSizeLimit }}
106 - name: tmp-dir-broker
107 emptyDir:
108 sizeLimit: {{ .Values.volumes.tmpBrokerSizeLimit }}
Andreas Geissler6fd28212024-10-22 11:33:38 +0200109 - name: framework-log
110 emptyDir:
111 sizeLimit: {{ .Values.volumes.logSizeLimit }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -0700112 - name : {{ include "common.name" . }}
113 configMap:
114 name: {{ include "common.fullname" . }}
liboNet80f587a2019-05-17 01:30:16 +0800115 - name: artifact-data
Andreas Geissler6fd28212024-10-22 11:33:38 +0200116 emptyDir:
117 sizeLimit: {{ .Values.volumes.artifactDataSizeLimit }}
Andreas Geisslerbd0d31a2024-03-20 09:51:32 +0100118 {{- include "common.imagePullSecrets" . | nindent 6 }}