-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathapi-rest-deployment.yaml
More file actions
89 lines (89 loc) · 4.26 KB
/
Copy pathapi-rest-deployment.yaml
File metadata and controls
89 lines (89 loc) · 4.26 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-api-rest
labels:
app: api-rest
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
spec:
replicas: {{ .Values.apis.rest.replicaCount }}
selector:
matchLabels:
app: api-rest
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
template:
metadata:
labels:
app: api-rest
{{ include "label_prefix" . }}/release: {{ .Release.Name }}
{{ include "label_prefix" . }}/version: {{ .Chart.Version }}
{{ include "label_prefix" . }}/logging: "true"
spec:
imagePullSecrets:
{{- include "base_pull_secrets" . }}
initContainers:
{{- include "base_init_containers" . }}
{{- if $pcName := include "priority_class_with_default" (dict "template" . "localPriorityClass" .Values.apis.rest.priorityClassName) }}
priorityClassName: {{ $pcName }}
{{- end }}
{{- if $nodeSelector := include "node_selector" (dict "template" . "localNodeSelector" .Values.apis.rest.nodeSelector) }}
nodeSelector: {{ $nodeSelector }}
{{- end }}
{{- if $tolerations := include "_tolerations_with_early_eviction" (dict "template" . "localTolerations" .Values.apis.rest.tolerations) }}
tolerations: {{ $tolerations }}
{{- end }}
containers:
- name: api-rest
resources:
limits:
cpu: {{ .Values.apis.rest.resources.limits.cpu | quote }}
memory: {{ .Values.apis.rest.resources.limits.memory | quote }}
requests:
cpu: {{ .Values.apis.rest.resources.requests.cpu | quote }}
memory: {{ .Values.apis.rest.resources.requests.memory | quote }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repo }}/{{ include "image_prefix" . }}-api-rest:{{ default .Values.image.tag .Values.image.repoTags.controlPlane }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "--dummy-certificates"
- "--no-auth"
- "--https={{ include "bind_address" . }}:8080"
- "--http={{ include "bind_address" . }}:8081"
- "--request-timeout={{ .Values.base.default_req_timeout }}"{{ if .Values.base.jaeger.enabled }}
- "--jaeger={{ include "jaeger_url" . }}"{{ end }}
- "--core-grpc=https://{{ .Release.Name }}-agent-core:50051"
- "--ansi-colors={{ .Values.base.logging.color }}"
- "--fmt-style={{ include "logFormat" . }}"
{{- if .Values.apis.rest.healthProbes.readiness.enabled }}
- "--core-health-freq={{ .Values.apis.rest.healthProbes.readiness.agentCoreProbeFreq }}"
{{- end }}
ports:
- containerPort: 8080
- containerPort: 8081
env:
- name: RUST_LOG
value: {{ .Values.apis.rest.logLevel }}
{{- if default .Values.base.logging.silenceLevel .Values.apis.rest.logSilenceLevel }}
- name: RUST_LOG_SILENCE
value: {{ default .Values.base.logging.silenceLevel .Values.apis.rest.logSilenceLevel }}
{{- end }}
{{- if .Values.apis.rest.healthProbes.readiness.enabled }}
readinessProbe:
httpGet:
path: /ready
port: 8081
failureThreshold: {{ .Values.apis.rest.healthProbes.readiness.failureThreshold }}
initialDelaySeconds: {{ .Values.apis.rest.healthProbes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.apis.rest.healthProbes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.apis.rest.healthProbes.readiness.timeoutSeconds }}
{{- end }}
{{- if .Values.apis.rest.healthProbes.liveness.enabled }}
livenessProbe:
httpGet:
path: /live
port: 8081
failureThreshold: {{ .Values.apis.rest.healthProbes.liveness.failureThreshold }}
initialDelaySeconds: {{ .Values.apis.rest.healthProbes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.apis.rest.healthProbes.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.apis.rest.healthProbes.liveness.timeoutSeconds }}
{{- end }}