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