Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 1 | --- |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 2 | # 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 | |
| 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: nginx-ingress-controller |
| 20 | namespace: {{ .Values.global.namespace }} |
| 21 | spec: |
| 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" |
| 40 | image: alpine:3.6 |
Matteo Scandolo | e2965c9 | 2018-05-08 13:22:20 -0700 | [diff] [blame] | 41 | imagePullPolicy: Always |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 42 | name: sysctl |
| 43 | securityContext: |
| 44 | privileged: true |
| 45 | containers: |
| 46 | - name: nginx-ingress-controller |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 47 | image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller.repository }}:{{ tpl .Values.images.ingress_controller.tag . }} |
| 48 | imagePullPolicy: {{ .Values.images.ingress_controller.pullPolicy }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 49 | 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 |