-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdeployment.yaml
More file actions
86 lines (86 loc) · 3.16 KB
/
Copy pathdeployment.yaml
File metadata and controls
86 lines (86 loc) · 3.16 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
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {{- include "o-neko-catnip.labels" . | nindent 4 }}
name: {{ include "o-neko-catnip.fullname" . }}
spec:
replicas: 1
selector:
matchLabels: {{- include "o-neko-catnip.selectorLabels" . | nindent 6 }}
minReadySeconds: 5
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
revisionHistoryLimit: 10
template:
metadata:
labels: {{- include "o-neko-catnip.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases: {{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: o-neko-catnip
image: {{ (printf "%s:%s" .Values.oneko.image.name .Values.oneko.image.tag) | quote }}
imagePullPolicy: {{ .Values.oneko.image.imagePullPolicy }}
env:
- name: ONEKO_API_BASEURL
value: {{ required "The O-Neko base URL needs to be configured." .Values.oneko.api.baseUrl }}
- name: ONEKO_CATNIPURL
value: {{ required "The O-Neko Catnip URL needs to be configured." .Values.oneko.catnipUrl }}
- name: ONEKO_API_AUTH_USERNAME
valueFrom:
secretKeyRef:
name: {{ required "The oneko credential secret is required" .Values.oneko.api.auth.secretName }}
key: "username"
optional: false
- name: ONEKO_API_AUTH_PASSWORD
valueFrom:
secretKeyRef:
name: {{ required "The oneko credential secret is required" .Values.oneko.api.auth.secretName }}
key: "password"
optional: false
{{- if .Values.oneko.env -}}
{{- toYaml .Values.oneko.env | nindent 12 }}
{{- end }}
ports:
- containerPort: 8080
name: http
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: /up
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: /up
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- with .Values.startupProbe }}
startupProbe:
httpGet:
path: /up
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
resources: {{- toYaml .Values.resources | nindent 12 }}
restartPolicy: Always