blob: 7e938cbac12c6522148c8597c9d2054c0b3eb48c [file] [log] [blame]
Zack Williams2749ae52018-09-28 09:43:43 -07001---
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Matteo Scandolo5628d4b2021-01-11 11:46:12 -080016apiVersion: apps/v1
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070017kind: Deployment
18metadata:
19 name: nginx-ingress-controller
20 namespace: {{ .Values.global.namespace }}
21spec:
22 replicas: 1
23 selector:
24 matchLabels:
25 app: ingress-nginx
26 template:
27 metadata:
28 labels:
29 app: ingress-nginx
30 annotations:
31 prometheus.io/port: '10254'
32 prometheus.io/scrape: 'true'
33 spec:
34 serviceAccountName: nginx-ingress-serviceaccount
35 initContainers:
36 - command:
37 - sh
38 - -c
39 - sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535"
Luca Prete2d3049c2018-11-20 14:54:14 -080040 image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller_base.repository }}:{{ tpl .Values.images.ingress_controller_base.tag . }}
41 imagePullPolicy: {{ .Values.images.ingress_controller_base.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070042 name: sysctl
43 securityContext:
44 privileged: true
45 containers:
46 - name: nginx-ingress-controller
Zack Williams2749ae52018-09-28 09:43:43 -070047 image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller.repository }}:{{ tpl .Values.images.ingress_controller.tag . }}
48 imagePullPolicy: {{ .Values.images.ingress_controller.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070049 args:
50 - /nginx-ingress-controller
51 - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
52 - --configmap=$(POD_NAMESPACE)/nginx-configuration
53 - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
54 - --udp-services-configmap=$(POD_NAMESPACE)/udp-services
55 - --annotations-prefix=nginx.ingress.kubernetes.io
56 env:
57 - name: POD_NAME
58 valueFrom:
59 fieldRef:
60 fieldPath: metadata.name
61 - name: POD_NAMESPACE
62 valueFrom:
63 fieldRef:
64 fieldPath: metadata.namespace
65 ports:
66 - name: http
67 containerPort: 80
68 - name: https
69 containerPort: 443
70 livenessProbe:
71 failureThreshold: 3
72 httpGet:
73 path: /healthz
74 port: 10254
75 scheme: HTTP
76 initialDelaySeconds: 10
77 periodSeconds: 10
78 successThreshold: 1
79 timeoutSeconds: 1
80 readinessProbe:
81 failureThreshold: 3
82 httpGet:
83 path: /healthz
84 port: 10254
85 scheme: HTTP
86 periodSeconds: 10
87 successThreshold: 1
88 timeoutSeconds: 1