-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathportal-chatbot-deployment.yaml
More file actions
105 lines (105 loc) · 3.17 KB
/
Copy pathportal-chatbot-deployment.yaml
File metadata and controls
105 lines (105 loc) · 3.17 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
103
104
105
{{- if .Values.deployChatbot -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}-chatbot
namespace: {{ default "default" .Values.namespace }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- with .Values.deployments.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
service: {{ template "fullname" . }}-chatbot
wicked: "true"
template:
metadata:
labels:
service: {{ template "fullname" . }}-chatbot
wicked: "true"
{{- with .Values.deployments.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.useRbac }}
serviceAccountName: {{ template "fullname" . }}-role
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext:
{{ toYaml .Values.securityContext | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
initContainers:
- name: {{ template "fullname" . }}-chatbot-init
image: "{{ .Values.image.repository }}k8s-tool:{{ default "latest" .Values.image.tag }}"
imagePullPolicy: {{ default "Always" .Values.image.pullPolicy }}
args:
- "pod"
- "-lservice={{ template "fullname" . }}-api"
containers:
- name: {{ template "fullname" . }}-chatbot
image: "{{ .Values.image.repository }}chatbot:{{ default "latest" .Values.image.tag }}{{ if .Values.image.alpine }}-alpine{{ end }}"
imagePullPolicy: {{ default "Always" .Values.image.pullPolicy }}
env:
- name: DEBUG
valueFrom:
configMapKeyRef:
name: {{ template "fullname" . }}-apim-config
key: DEBUG
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: {{ template "fullname" . }}-apim-config
key: LOG_LEVEL
- name: PORTAL_API_URL
value: "http://{{ template "fullname" . }}-api.{{ default "default" .Values.namespace }}.svc.cluster.local:3001/"
ports:
- containerPort: 3004
protocol: TCP
readinessProbe:
httpGet:
path: /ping
port: 3004
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /ping
port: 3004
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 2
resources:
{{ toYaml .Values.resources.chatbot | indent 10 }}
{{- if .Values.chatbot }}
{{- if .Values.chatbot.securityContext }}
securityContext:
{{ toYaml .Values.chatbot.securityContext | indent 10 }}
{{- end }}
{{- end }}
restartPolicy: Always
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end -}}
{{- end -}}