|
1 | 1 | apiVersion: apps/v1 |
2 | 2 | kind: Deployment |
3 | 3 | metadata: |
4 | | - name: {{ include "helm.fullname" . }} |
5 | | - labels: |
6 | | - {{- include "helm.labels" . | nindent 4 }} |
| 4 | + name: {{ .Release.Name }} |
7 | 5 | spec: |
8 | | - {{- if not .Values.autoscaling.enabled }} |
9 | 6 | replicas: {{ .Values.replicaCount }} |
10 | | - {{- end }} |
11 | 7 | selector: |
12 | 8 | matchLabels: |
13 | | - {{- include "helm.selectorLabels" . | nindent 6 }} |
| 9 | + app: {{ .Release.Name }} |
14 | 10 | template: |
15 | 11 | metadata: |
16 | | - {{- with .Values.podAnnotations }} |
17 | | - annotations: |
18 | | - {{- toYaml . | nindent 8 }} |
19 | | - {{- end }} |
20 | 12 | labels: |
21 | | - {{- include "helm.labels" . | nindent 8 }} |
22 | | - {{- with .Values.podLabels }} |
23 | | - {{- toYaml . | nindent 8 }} |
24 | | - {{- end }} |
| 13 | + app: {{ .Release.Name }} |
25 | 14 | spec: |
26 | | - {{- with .Values.imagePullSecrets }} |
27 | | - imagePullSecrets: |
28 | | - {{- toYaml . | nindent 8 }} |
29 | | - {{- end }} |
30 | | - serviceAccountName: {{ include "helm.serviceAccountName" . }} |
31 | | - {{- with .Values.podSecurityContext }} |
32 | | - securityContext: |
33 | | - {{- toYaml . | nindent 8 }} |
34 | | - {{- end }} |
35 | 15 | containers: |
36 | | - - name: {{ .Chart.Name }} |
37 | | - {{- with .Values.securityContext }} |
38 | | - securityContext: |
39 | | - {{- toYaml . | nindent 12 }} |
40 | | - {{- end }} |
41 | | - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 16 | + - name: {{ .Release.Name }} |
| 17 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
42 | 18 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
43 | 19 | ports: |
44 | | - - name: http |
45 | | - containerPort: {{ .Values.service.port }} |
46 | | - protocol: TCP |
47 | | - {{- with .Values.livenessProbe }} |
48 | | - livenessProbe: |
49 | | - {{- toYaml . | nindent 12 }} |
50 | | - {{- end }} |
51 | | - {{- with .Values.readinessProbe }} |
52 | | - readinessProbe: |
53 | | - {{- toYaml . | nindent 12 }} |
54 | | - {{- end }} |
55 | | - {{- with .Values.resources }} |
56 | | - resources: |
57 | | - {{- toYaml . | nindent 12 }} |
58 | | - {{- end }} |
59 | | - {{- with .Values.volumeMounts }} |
60 | | - volumeMounts: |
61 | | - {{- toYaml . | nindent 12 }} |
62 | | - {{- end }} |
63 | | - {{- with .Values.volumes }} |
64 | | - volumes: |
65 | | - {{- toYaml . | nindent 8 }} |
66 | | - {{- end }} |
67 | | - {{- with .Values.nodeSelector }} |
68 | | - nodeSelector: |
69 | | - {{- toYaml . | nindent 8 }} |
70 | | - {{- end }} |
71 | | - {{- with .Values.affinity }} |
72 | | - affinity: |
73 | | - {{- toYaml . | nindent 8 }} |
74 | | - {{- end }} |
75 | | - {{- with .Values.tolerations }} |
76 | | - tolerations: |
77 | | - {{- toYaml . | nindent 8 }} |
78 | | - {{- end }} |
| 20 | + - containerPort: {{ .Values.service.targetPort }} |
0 commit comments