Zack Williams | 41513bf | 2018-07-07 20:08:35 -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. |
Richard Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 14 | apiVersion: extensions/v1beta1 |
| 15 | kind: Deployment |
| 16 | metadata: |
| 17 | name: nginx-ingress-controller |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 18 | namespace: voltha |
Richard Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 19 | spec: |
| 20 | replicas: 1 |
| 21 | selector: |
| 22 | matchLabels: |
| 23 | app: ingress-nginx |
| 24 | template: |
| 25 | metadata: |
| 26 | labels: |
| 27 | app: ingress-nginx |
| 28 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 29 | cni: "calico" |
Richard Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 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 |
| 40 | imagePullPolicy: IfNotPresent |
| 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 |