# # ================================================================================== # Copyright (c) 2019 Nokia # ================================================================================== # apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "ricapp.fullname" . }} labels: app.kubernetes.io/name: {{ include "ricapp.name" . }} helm.sh/chart: {{ include "ricapp.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.ricapp.replicaCount }} selector: matchLabels: app.kubernetes.io/name: {{ include "ricapp.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app.kubernetes.io/name: {{ include "ricapp.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: hostname: {{ .Values.ricapp.hostname }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.global.repository }}/{{ .Values.ricapp.image.name }}:{{ .Values.ricapp.image.tag }}" imagePullPolicy: {{ .Values.global.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.ricapp.service.port }} protocol: TCP - name: rmr containerPort: {{ .Values.ricapp.service.rmrPort }} protocol: TCP volumeMounts: - name: config-volume mountPath: {{ .Values.ricapp.appconfig.path }} - name: cert-volume mountPath: {{ .Values.ricapp.cert.path }} livenessProbe: httpGet: path: {{ .Values.ricapp.probes.healthAliveCheckEndpoint }} port: 8080 initialDelaySeconds: 5 periodSeconds: 15 readinessProbe: httpGet: path: {{ .Values.ricapp.probes.healthReadyCheckEndpoint }} port: 8080 initialDelaySeconds: 5 periodSeconds: 15 restartPolicy: Always resources: {{- toYaml .Values.ricapp.resources | nindent 12 }} securityContext: # ubuntu #runAsUser: 1000 #allowPrivilegeEscalation: false {{- with .Values.ricapp.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.ricapp.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.ricapp.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: config-volume configMap: name: {{ if .Values.ricapp.appconfig.override }}{{ .Values.ricapp.appconfig.override }}{{ else }}{{ .Release.Name }}-appconfig{{ end }} - name: cert-volume emptyDir: {}