d863bf65f9614eb98f2ce2b35673f056659e5fb2
[nonrtric.git] / helm-manager / charts / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2021 Nordix Foundation.                                      #
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
17 kind: Deployment
18 apiVersion: apps/v1
19 metadata:
20   name: {{ template "helmmanager.name" . }}
21   namespace: {{ template "helmmanager.namespace" . }}
22   labels:
23     {{- include "helmmanager.labels" . | nindent 4 }}
24 spec:
25   replicas: {{ .Values.replicaCount }}
26   selector:
27     matchLabels:
28       {{- include "helmmanager.selectorLabels" . | nindent 6 }}
29   template:
30     metadata:
31       labels:
32         {{- include "helmmanager.selectorLabels" . | nindent 8 }}
33     spec:
34       serviceAccountName: {{ template "helmmanager.name" . }}-sa
35       containers:
36         - name: helmmanager
37           image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
38           imagePullPolicy: {{ .Values.image.pullPolicy }}
39           ports:
40           - containerPort: {{ .Values.service.http.containerPort }}
41             protocol: TCP
42           volumeMounts:
43             - name: {{ template "helmmanager.name" . }}-pv
44               mountPath: /var/helm-manager-service
45           readinessProbe:
46 {{ toYaml .Values.readinessProbe | indent 12 }}
47           livenessProbe:
48 {{ toYaml .Values.livenessProbe | indent 12 }}
49           resources:
50 {{ toYaml .Values.resources | indent 12 }}
51       volumes:
52       - name: {{ template "helmmanager.name" . }}-pv
53         persistentVolumeClaim:
54           claimName: {{ template "helmmanager.name" . }}-pvc