-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathdeployment.yaml
More file actions
79 lines (79 loc) · 2.36 KB
/
deployment.yaml
File metadata and controls
79 lines (79 loc) · 2.36 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}
namespace: {{ .Values.global.namespace }}
labels:
{{ include "api-service.labels" . | nindent 4 }}
spec:
{{ if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{ end }}
selector:
matchLabels:
{{ include "api-service.selectorLabels" . | nindent 6 }}
template:
metadata:
{{ with .Values.podAnnotations }}
annotations:
{{ toYaml . | nindent 8 }}
{{ end }}
labels:
{{ include "api-service.labels" . | nindent 8 }}
spec:
{{ with .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml . | nindent 8 }}
{{ end }}
serviceAccountName: default
securityContext:
{{ toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Values.name }}
securityContext:
{{ toYaml .Values.securityContext | nindent 12 }}
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- --backend-addr
- {{ include "api-service.backendAddr" . }}
- --schedule-addr
- {{ include "api-service.scheduleAddr" . }}
- --schedule-type
- {{ include "api-service.scheduleType" . }}
- --qps
- {{ include "api-service.qps" . | quote }}
- --cleanup-interval
- {{ .Values.cleanupInterval }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
- name: mcp-proxy
containerPort: {{ .Values.service.mcpProxyPort }}
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: mcp-proxy
resources:
{{ toYaml .Values.resources | nindent 12 }}
{{ with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{ end }}
{{ with .Values.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{ end }}
{{ with .Values.global.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{ end }}
{{ with .Values.global.dns }}
{{ toYaml . | nindent 6 }}
{{ end }}