-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdeployment.yaml
82 lines (81 loc) · 2.68 KB
/
deployment.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-framework-deployment
labels:
{{- include "frontend-framework.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "frontend-framework.selectorLabels" . | nindent 6 }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
strategy:
{{- toYaml .Values.strategy | nindent 8 }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configMap.yaml") . | sha256sum }}
{{- if .Values.metricsEnabled }}
{{- include "common.grafanaAnnotations" . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "frontend-framework.selectorLabels" . | nindent 8 }}
{{- include "common.extraLabels" . | nindent 8 }}
public: "yes"
spec:
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken}}
containers:
- name: frontend-framework
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
httpGet:
{{- if eq "portal" .Values.global.frontendRoot }}
path: /ff
{{- else }}
path: /
{{- end }}
port: {{ .Values.port }}
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 30
readinessProbe:
httpGet:
{{- if eq "portal" .Values.global.frontendRoot }}
path: /ff
{{- else }}
path: /
{{- end }}
port: {{ .Values.port }}
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 30
resources:
{{- toYaml .Values.resources | nindent 12 }}
ports:
- containerPort: {{ .Values.port }}
name: http
protocol: TCP
envFrom:
- configMapRef:
name: {{ include "frontend-framework.fullname" . }}-configmap
optional: true
env:
- name: PORT
value: {{ .Values.port | quote }}
- name: HOSTNAME
value: "0.0.0.0"
{{- if eq "portal" .Values.global.frontendRoot }}
- name: BASE_PATH
value: /ff
{{- else}}
- name: NEXT_PUBLIC_PORTAL_BASENAME
value: /portal
{{- end }}