-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Expand file tree
/
Copy pathdeployment.yaml
More file actions
102 lines (102 loc) · 3.32 KB
/
Copy pathdeployment.yaml
File metadata and controls
102 lines (102 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "rollout-operator.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "rollout-operator.labels" . | nindent 4 }}
spec:
replicas: 1
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
minReadySeconds: {{ .Values.minReadySeconds }}
selector:
matchLabels:
{{- include "rollout-operator.selectorLabels" . | nindent 6 }}
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "rollout-operator.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "rollout-operator.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: rollout-operator
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "rollout-operator.imageName" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- -kubernetes.namespace={{ .Release.Namespace }}
{{- if .Values.webhooks.enabled }}
- -server-tls.enabled=true
- -server-tls.self-signed-cert.secret-name={{ .Values.webhooks.selfSignedCertSecretName | default (include "rollout-operator.fullname" . ) }}
- -server-tls.self-signed-cert.dns-name={{ include "rollout-operator.fullname" . }}.{{ .Release.Namespace }}.svc
{{- end }}
{{- range .Values.extraArgs }}
- {{ . }}
{{- end }}
{{- if .Values.extraEnv }}
env:
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.extraEnvFrom }}
envFrom:
{{- with .Values.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
ports:
- name: http-metrics
containerPort: 8001
protocol: TCP
{{- if .Values.webhooks.enabled }}
- name: https
containerPort: 8443
protocol: TCP
{{- end }}
readinessProbe:
httpGet:
path: /ready
port: http-metrics
initialDelaySeconds: 5
timeoutSeconds: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}