-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapi-nginx-deployment.yaml
44 lines (44 loc) · 1.35 KB
/
api-nginx-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
{{- if and .Values.readonlyApi.enabled .Values.api.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.readonlyApi.noAuthName | quote }}
spec:
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
app: {{ .Values.readonlyApi.noAuthName | quote }}
replicas: 1
template:
metadata:
labels:
app: {{ .Values.readonlyApi.noAuthName | quote }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
containers:
- name: nginx
image: nginx:1.25.1
ports:
- name: "http"
containerPort: {{ .Values.api.containerPort }}
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d/default.conf
subPath: nginx.conf
readOnly: true
resources:
{{- toYaml .Values.readonlyApi.proxyContainer.resources | nindent 10 }}
volumes:
- name: nginx-conf
configMap:
name: {{ .Values.readonlyApi.noAuthName | quote }}
items:
- key: nginx.conf
path: nginx.conf
{{- end }}