Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 1 | # 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 | |
| 15 | apiVersion: extensions/v1beta1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: nginx-ingress-controller |
| 19 | namespace: {{ .Values.global.namespace }} |
| 20 | spec: |
| 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 Scandolo | e2965c9 | 2018-05-08 13:22:20 -0700 | [diff] [blame] | 40 | imagePullPolicy: Always |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 41 | name: sysctl |
| 42 | securityContext: |
| 43 | privileged: true |
| 44 | containers: |
| 45 | - name: nginx-ingress-controller |
| 46 | image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2 |
| 47 | 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 |