-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx-deployment.yaml
38 lines (38 loc) · 1.21 KB
/
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "nginx-lego.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
replicas: {{ .Values.nginx.replicaCount }}
template:
metadata:
labels:
app: {{ template "nginx-lego.fullname" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}"
imagePullPolicy: {{ .Values.nginx.image.pullPolicy }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 80
- containerPort: 443
{{- if .Values.nginx.monitoring }}
- containerPort: 8080
{{- end }}
resources:
{{ toYaml .Values.nginx.resources | indent 10 }}
args:
- /nginx-ingress-controller
- --default-backend-service={{ .Release.Namespace }}/{{ template "nginx-lego.fullname" . }}-default-backend
- --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-lego.fullname" . }}