Browse Source

add ingress.yaml

Dotbalo 4 years ago
parent
commit
2caf7e3620
32 changed files with 41 additions and 1152 deletions
  1. 0 8
      nginx-ingress/common/default-server-secret.yaml
  2. 0 6
      nginx-ingress/common/nginx-config.yaml
  3. 0 10
      nginx-ingress/common/ns-and-sa.yaml
  4. 0 53
      nginx-ingress/daemon-set/nginx-ingress-with-prometheus.yaml
  5. 0 41
      nginx-ingress/daemon-set/nginx-ingress.yaml
  6. 0 56
      nginx-ingress/daemon-set/nginx-plus-ingress-with-prometheus.yaml
  7. 0 42
      nginx-ingress/daemon-set/nginx-plus-ingress.yaml
  8. 0 54
      nginx-ingress/deployment/nginx-ingress-with-prometheus.yaml
  9. 0 40
      nginx-ingress/deployment/nginx-ingress.yaml
  10. 0 55
      nginx-ingress/deployment/nginx-plus-ingress-with-prometheus.yaml
  11. 0 41
      nginx-ingress/deployment/nginx-plus-ingress.yaml
  12. 0 15
      nginx-ingress/helm-chart/Chart.yaml
  13. 0 109
      nginx-ingress/helm-chart/README.md
  14. 0 1
      nginx-ingress/helm-chart/templates/NOTES.txt
  15. 0 13
      nginx-ingress/helm-chart/templates/controller-configmap.yaml
  16. 0 104
      nginx-ingress/helm-chart/templates/controller-daemonset.yaml
  17. 0 90
      nginx-ingress/helm-chart/templates/controller-deployment.yaml
  18. 0 15
      nginx-ingress/helm-chart/templates/controller-secret.yaml
  19. 0 40
      nginx-ingress/helm-chart/templates/controller-service.yaml
  20. 0 15
      nginx-ingress/helm-chart/templates/controller-serviceaccount.yaml
  21. 0 86
      nginx-ingress/helm-chart/templates/rbac.yaml
  22. 0 10
      nginx-ingress/helm-chart/values-icp.yaml
  23. 0 5
      nginx-ingress/helm-chart/values-plus.yaml
  24. 0 15
      nginx-ingress/helm-chart/values.yaml
  25. 41 17
      nginx-ingress/ingress.yaml
  26. 0 72
      nginx-ingress/rbac/rbac.yaml
  27. 0 21
      nginx-ingress/service/loadbalancer-aws-elb.yaml
  28. 0 19
      nginx-ingress/service/loadbalancer.yaml
  29. 0 32
      nginx-ingress/service/nginx-ingress-controller-metrics.yaml
  30. 0 22
      nginx-ingress/service/nginx-ingress-sm.yaml
  31. 0 27
      nginx-ingress/service/nginx-prom-role.yaml
  32. 0 18
      nginx-ingress/service/nodeport.yaml

File diff suppressed because it is too large
+ 0 - 8
nginx-ingress/common/default-server-secret.yaml


+ 0 - 6
nginx-ingress/common/nginx-config.yaml

@@ -1,6 +0,0 @@
-kind: ConfigMap
-apiVersion: v1
-metadata:
-  name: nginx-config
-  namespace: nginx-ingress
-data:

+ 0 - 10
nginx-ingress/common/ns-and-sa.yaml

@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: Namespace
-metadata:
-  name: nginx-ingress 
----
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: nginx-ingress 
-  namespace: nginx-ingress

+ 0 - 53
nginx-ingress/daemon-set/nginx-ingress-with-prometheus.yaml

@@ -1,53 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9113"
-    spec:
-      serviceAccountName: nginx-ingress
-      hostNetwork: true
-      containers:
-      - image: nginx/nginx-ingress:1.4.3
-        name: nginx-ingress
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election
-      - image: nginx/nginx-prometheus-exporter:0.2.0
-        name: nginx-prometheus-exporter
-        ports:
-        - name: prometheus
-          containerPort: 9113
-        args:
-          - -web.listen-address
-          - :9113
-          - -nginx.scrape-uri
-          - http://127.0.0.1:8080/stub_status

+ 0 - 41
nginx-ingress/daemon-set/nginx-ingress.yaml

@@ -1,41 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx/nginx-ingress:1.4.3
-        name: nginx-ingress
-        ports:
-        - name: http
-          containerPort: 80
-          hostPort: 80
-        - name: https
-          containerPort: 443
-          hostPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election

+ 0 - 56
nginx-ingress/daemon-set/nginx-plus-ingress-with-prometheus.yaml

@@ -1,56 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9113"
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx-plus-ingress:1.4.3
-        name: nginx-plus-ingress
-        ports:
-        - name: http
-          containerPort: 80
-          hostPort: 80
-        - name: https
-          containerPort: 443
-          hostPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election
-      - image: nginx/nginx-prometheus-exporter:0.2.0
-        name: nginx-prometheus-exporter
-        ports:
-        - name: prometheus
-          containerPort: 9113
-        args:
-          - -web.listen-address
-          - :9113
-          - -nginx.plus
-          - -nginx.scrape-uri
-          - http://127.0.0.1:8080/api

+ 0 - 42
nginx-ingress/daemon-set/nginx-plus-ingress.yaml

@@ -1,42 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx-plus-ingress:1.4.3
-        name: nginx-plus-ingress
-        ports:
-        - name: http
-          containerPort: 80
-          hostPort: 80
-        - name: https
-          containerPort: 443
-          hostPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election

+ 0 - 54
nginx-ingress/deployment/nginx-ingress-with-prometheus.yaml

@@ -1,54 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9113"
-    spec:
-      serviceAccountName: nginx-ingress
-      hostNetwork: true
-      containers:
-      - image: nginx/nginx-ingress:1.4.3
-        name: nginx-ingress
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election
-      - image: nginx/nginx-prometheus-exporter:0.2.0
-        name: nginx-prometheus-exporter
-        ports:
-        - name: prometheus
-          containerPort: 9113
-        args:
-          - -web.listen-address
-          - :9113
-          - nginx.scrape-uri
-          - http://127.0.0.1:8080/stub_status

+ 0 - 40
nginx-ingress/deployment/nginx-ingress.yaml

@@ -1,40 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx/nginx-ingress:1.4.3
-        name: nginx-ingress
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election

+ 0 - 55
nginx-ingress/deployment/nginx-plus-ingress-with-prometheus.yaml

@@ -1,55 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "9113"
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx-plus-ingress:1.4.3
-        name: nginx-plus-ingress
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election
-      - image: nginx/nginx-prometheus-exporter:0.2.0
-        name: nginx-prometheus-exporter
-        ports:
-        - name: prometheus
-          containerPort: 9113
-        args:
-          - -web.listen-address
-          - :9113
-          - -nginx.plus
-          - -nginx.scrape-uri
-          - http://127.0.0.1:8080/api

+ 0 - 41
nginx-ingress/deployment/nginx-plus-ingress.yaml

@@ -1,41 +0,0 @@
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      app: nginx-ingress
-  template:
-    metadata:
-      labels:
-        app: nginx-ingress
-    spec:
-      serviceAccountName: nginx-ingress
-      containers:
-      - image: nginx-plus-ingress:1.4.3
-        name: nginx-plus-ingress
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-         #- -v=3 # Enables extensive logging. Useful for trooublshooting.
-         #- -report-ingress-status
-         #- -external-service=nginx-ingress
-         #- -enable-leader-election

+ 0 - 15
nginx-ingress/helm-chart/Chart.yaml

@@ -1,15 +0,0 @@
-name: nginx-ingress
-version: 0.2.0
-appVersion: 1.4.3
-description: NGINX Ingress Controller
-sources:
-  - https://github.com/nginxinc/kubernetes-ingress/tree/master/deployment/helm-chart
-keywords:
-  - ingress
-  - nginx
-maintainers:
-  - name: Damian Curry
-    email: damian.curry@nginx.com
-  - name: Dean Coakley
-    email: dean.coakley@nginx.com
-

+ 0 - 109
nginx-ingress/helm-chart/README.md

@@ -1,109 +0,0 @@
-# NGINX Ingress Controller Helm Chart
-
-## Introduction
-
-This chart deploys the NGINX Ingress controller in your Kubernetes cluster.
-
-## Prerequisites
-
-  - Kubernetes 1.6+.
-  - Helm 2.8.x+.
-  - Git.
-  - If you’d like to use NGINX Plus:
-    - Build an Ingress controller image with NGINX Plus and push it to your private registry by following the instructions from [here](../../build/README.md).
-    - Update the `controller.image.repository` field of the `values-plus.yaml` accordingly.
-
-## Installing the Chart
-
-1. Clone the Ingress controller repo:
-    ```
-    $ git clone https://github.com/nginxinc/kubernetes-ingress/
-    $ git checkout v1.4.3
-    ```
-2. Change your working directory to /deployments/helm-chart:
-    ```
-    $ cd kubernetes-ingress/deployments/helm-chart
-    ```
-3. To install the chart with the release name my-release (my-release is the name that you choose):
-
-    For NGINX:
-    ```
-    $ helm install --name my-release .
-    ```
-
-    For NGINX Plus:
-    ```
-    $ helm install --name my-release -f values-plus.yaml .
-    ```
-
-    The command deploys the Ingress controller in your Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
-
-    When deploying the Ingress controller, make sure to use your own TLS certificate and key for the default server rather than the default pre-generated ones. Read the [Configuration](#Configuration) section below to see how to configure a TLS certificate and key for the default server. Note that the default server returns the Not Found page with the 404 status code for all requests for domains for which there are no Ingress rules defined.
-
-> **Tip**: List all releases using `helm list`
-
-## Uninstalling the Chart
-
-To uninstall/delete the release `my-release`
-
-```console
-$ helm delete my-release
-```
-
-The command removes all the Kubernetes components associated with the chart and deletes the release.
-
-## Configuration
-
-The following tables lists the configurable parameters of the NGINX Ingress controller chart and their default values.
-
-Parameter | Description | Default
---- | --- | ---
-`controller.name` | The name of the Ingress controller daemon set or deployment. | nginx-ingress
-`controller.kind` | The kind of the Ingress controller installation - deployment or daemonset. | deployment
-`controller.nginxplus` | Deploys the Ingress controller for NGINX Plus. | false
-`controller.hostNetwork` | Enables the Ingress controller pods to use the host's network namespace. | false
-`controller.nginxDebug` | Enables debugging for NGINX. Uses the `nginx-debug` binary. Requires `error-log-level: debug` in the ConfigMap via `controller.config.entries`. | false
-`controller.image.repository` | The image repository of the Ingress controller. | nginx/nginx-ingress
-`controller.image.tag` | The tag of the Ingress controller image. | 1.4.3
-`controller.image.pullPolicy` | The pull policy for the Ingress controller image. | IfNotPresent
-`controller.config.entries` | The entries of the ConfigMap for customizing NGINX configuration. | { }
-`controller.defaultTLS.cert` | The base64-encoded TLS certificate for the default HTTPS server. If not specified, a pre-generated self-signed certificate is used. **Note:** It is recommended that you specify your own certificate. | A pre-generated self-signed certificate.
-`controller.defaultTLS.key` | The base64-encoded TLS key for the default HTTPS server. **Note:** If not specified, a pre-generated key is used. It is recommended that you specify your own key. | A pre-generated key.
-`controller.defaultTLS.secret` | The secret with a TLS certificate and key for the default HTTPS server. The value must follow the following format: `<namespace>/<name>`. Used as an alternative to specifiying a certifcate and key using `controller.defaultTLS.cert` and `controller.defaultTLS.key` parameters. | None
-`controller.nodeSelector` | The node selector for pod assignment for the Ingress controller pods. | { }
-`controller.terminationGracePeriodSeconds` | The termination grace period of the Ingress controller pod. | 30
-`controller.tolerations` | The tolerations required for the IBM Cloud Private installation. | None
-`controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1
-`controller.service.create` | Creates a service to expose the Ingress controller pods. | true
-`controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer
-`controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local
-`controller.service.annotations` | The annotations of the Ingress controller service. | { }
-`controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`.  | None
-`controller.service.externalIPs` | The list of external IPs for the Ingress controller service. | []
-`controller.serviceAccount.name` | The name of the service account of the Ingress controller pods. Used for RBAC. | nginx-ingress
-`controller.serviceAccount.imagePullSecrets` | The names of the secrets containing docker registry credentials. | []
-`controller.ingressClass` | A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation `"kubernetes.io/ingress.class"` equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the "-use-ingress-class-only" flag. | nginx
-`controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. | false
-`controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""
-`controller.healthStatus` | Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller. | false
-`controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true
-`controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080
-`controller.nginxStatus.allowCidrs` | Whitelist IPv4 IP/CIDR blocks to allow access to NGINX stub_status or the NGINX Plus API. Separate multiple IP/CIDR by commas. | 127.0.0.1
-`controller.reportIngressStatus.enable` | Update the address field in the status of Ingresses resources with an external address of the Ingress controller. You must also specify the source of the external address either through an external service via `controller.reportIngressStatus.externalService` or the `external-status-address` entry in the ConfigMap via `controller.config.entries`. **Note:** `controller.config.entries.external-status-address` takes precedence if both are set. | true
-`controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller is exposed externally. The external address of the service is used when reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | nginx-ingress
-`controller.reportIngressStatus.enableLeaderElection` | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true
-`rbac.create` | Configures RBAC. | true
-`prometheues.create` | Deploys a Prometheus exporter container within the Ingress controller pod. Requires NGINX status enabled via `controller.nginxStatus.enable`. Note: the exporter will use the port specified by `controller.nginxStatus.port`.| false
-`prometheus.port` | Configures the port to scrape the metrics. | 9113
-`prometheus.image.repository` | The image repository of the Prometheus exporter. | nginx/nginx-prometheus-exporter
-`prometheus.image.tag` | The tag of the Prometheus exporter image. | 0.2.0
-`prometheus.image.pullPolicy` | The pull policy for the Prometheus exporter image. | IfNotPresent
-
-Example:
-```
-$ cd kubernetes-ingress/helm-chart
-$ helm install --name my-release . --set controller.replicaCount=5
-```
-
-## Notes
-* The values-icp.yaml file is used for deploying the Ingress controller on IBM Cloud Private. See the [blog post](https://www.nginx.com/blog/nginx-ingress-controller-ibm-cloud-private/) for more details.

+ 0 - 1
nginx-ingress/helm-chart/templates/NOTES.txt

@@ -1 +0,0 @@
-The NGINX Ingress Controller has been installed.

+ 0 - 13
nginx-ingress/helm-chart/templates/controller-configmap.yaml

@@ -1,13 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: nginx-config
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-data:
-{{- if .Values.controller.config.entries }}
-{{ toYaml .Values.controller.config.entries | indent 2 }}
-{{- end }}

+ 0 - 104
nginx-ingress/helm-chart/templates/controller-daemonset.yaml

@@ -1,104 +0,0 @@
-{{- if eq .Values.controller.kind "daemonset" }}
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
-  name: {{ .Values.controller.name | trunc 63 }}
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-spec:
-  selector:
-    matchLabels:
-      app: {{ .Values.controller.name | trunc 63 }}
-  template:
-    metadata:
-      labels:
-        app: {{ .Values.controller.name | trunc 63 }}
-{{- if .Values.prometheus.create }}
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "{{ .Values.prometheus.port }}"
-{{- end }}
-    spec:
-      serviceAccountName: {{ .Values.controller.serviceAccount.name }}
-      terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
-{{- if .Values.controller.nodeSelector }}
-      nodeSelector:
-{{ toYaml .Values.controller.nodeSelector | indent 8 }}
-{{- end }}
-{{- if eq .Values.controller.tolerations "icp" }}
-      tolerations:
-      - key: "dedicated"
-        operator: "Exists"
-        effect: "NoSchedule"
-      - key: "CriticalAddonsOnly"
-        operator: "Exists"
-{{- end }}
-      hostNetwork: {{ .Values.controller.hostNetwork }}
-      containers:
-      - name: {{ .Values.controller.name | trunc 63 }}
-        image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
-        imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
-        ports:
-        - name: http
-          containerPort: 80
-          hostPort: 80
-        - name: https
-          containerPort: 443
-          hostPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus={{ .Values.controller.nginxplus }}
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-{{- if .Values.controller.defaultTLS.secret }}
-          - -default-server-tls-secret={{ .Values.controller.defaultTLS.secret }}
-{{ else }}
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-{{- end }}
-          - -ingress-class={{ .Values.controller.ingressClass }}
-          - -use-ingress-class-only={{ .Values.controller.useIngressClassOnly }}
-{{- if .Values.controller.watchNamespace }}
-          - -watch-namespace={{ .Values.controller.watchNamespace }}
-{{- end }}
-          - -health-status={{ .Values.controller.healthStatus }}
-          - -nginx-debug={{ .Values.controller.nginxDebug }}
-          - -nginx-status={{ .Values.controller.nginxStatus.enable }}
-{{- if .Values.controller.nginxStatus.enable }}
-          - -nginx-status-port={{ .Values.controller.nginxStatus.port }}
-          - -nginx-status-allow-cidrs={{ .Values.controller.nginxStatus.allowCidrs }}
-{{- end }}
-{{- if .Values.controller.reportIngressStatus.enable }}
-          - -report-ingress-status
-          - -external-service={{ .Values.controller.reportIngressStatus.externalService }}
-          - -enable-leader-election={{ .Values.controller.reportIngressStatus.enableLeaderElection }}
-{{- end }}
-{{- if and .Values.prometheus.create .Values.controller.nginxStatus.enable }}
-      - image: "{{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}"
-        name: nginx-prometheus-exporter
-        imagePullPolicy: "{{ .Values.prometheus.image.pullPolicy }}"
-        ports:
-        - name: prometheus
-          containerPort: {{ .Values.prometheus.port }}
-        args:
-          - -web.listen-address
-          - :{{ .Values.prometheus.port }}
-{{- if .Values.controller.nginxplus }}
-          - -nginx.plus
-          - -nginx.scrape-uri
-          - http://127.0.0.1:{{ .Values.controller.nginxStatus.port }}/api
-{{ else }}
-          - -nginx.scrape-uri
-          - http://127.0.0.1:{{ .Values.controller.nginxStatus.port }}/stub_status
-{{- end }}
-{{- end }}
-{{- end }}

+ 0 - 90
nginx-ingress/helm-chart/templates/controller-deployment.yaml

@@ -1,90 +0,0 @@
-{{- if eq .Values.controller.kind "deployment" }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  name: {{ .Values.controller.name | trunc 63 }}
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-spec:
-  replicas: {{ .Values.controller.replicaCount }}
-  selector:
-    matchLabels:
-      app: {{ .Values.controller.name | trunc 63 }}
-  template:
-    metadata:
-      labels:
-        app: {{ .Values.controller.name | trunc 63 }}
-{{- if .Values.prometheus.create }}
-      annotations:
-        prometheus.io/scrape: "true"
-        prometheus.io/port: "{{ .Values.prometheus.port }}"
-{{- end }}
-    spec:
-      serviceAccountName: {{ .Values.controller.serviceAccount.name }}
-      hostNetwork: {{ .Values.controller.hostNetwork }}
-      containers:
-      - image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
-        name: {{ .Values.controller.name | trunc 63 }}
-        imagePullPolicy: "{{ .Values.controller.image.pullPolicy }}"
-        ports:
-        - name: http
-          containerPort: 80
-        - name: https
-          containerPort: 443
-        env:
-        - name: POD_NAMESPACE
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: POD_NAME
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.name
-        args:
-          - -nginx-plus={{ .Values.controller.nginxplus }}
-          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
-{{- if .Values.controller.defaultTLS.secret }}
-          - -default-server-tls-secret={{ .Values.controller.defaultTLS.secret }}
-{{ else }}
-          - -default-server-tls-secret=$(POD_NAMESPACE)/default-server-secret
-{{- end }}
-          - -ingress-class={{ .Values.controller.ingressClass }}
-          - -use-ingress-class-only={{ .Values.controller.useIngressClassOnly }}
-{{- if .Values.controller.watchNamespace }}
-          - -watch-namespace={{ .Values.controller.watchNamespace }}
-{{- end }}
-          - -health-status={{ .Values.controller.healthStatus }}
-          - -nginx-debug={{ .Values.controller.nginxDebug }}
-          - -nginx-status={{ .Values.controller.nginxStatus.enable }}
-{{- if .Values.controller.nginxStatus.enable }}
-          - -nginx-status-port={{ .Values.controller.nginxStatus.port }}
-          - -nginx-status-allow-cidrs={{ .Values.controller.nginxStatus.allowCidrs }}
-{{- end }}
-{{- if .Values.controller.reportIngressStatus.enable }}
-          - -report-ingress-status
-          - -external-service={{ .Values.controller.reportIngressStatus.externalService }}
-          - -enable-leader-election={{ .Values.controller.reportIngressStatus.enableLeaderElection }}
-{{- end }}
-{{- if and .Values.prometheus.create .Values.controller.nginxStatus.enable }}
-      - image: "{{ .Values.prometheus.image.repository }}:{{ .Values.prometheus.image.tag }}"
-        name: nginx-prometheus-exporter
-        imagePullPolicy: "{{ .Values.prometheus.image.pullPolicy }}"
-        ports:
-        - name: prometheus
-          containerPort: {{ .Values.prometheus.port }}
-        args:
-          - -web.listen-address
-          - :{{ .Values.prometheus.port }}
-{{- if .Values.controller.nginxplus }}
-          - -nginx.plus
-          - -nginx.scrape-uri
-          - http://127.0.0.1:{{ .Values.controller.nginxStatus.port }}/api
-{{ else }}
-          - -nginx.scrape-uri
-          - http://127.0.0.1:{{ .Values.controller.nginxStatus.port }}/stub_status
-{{- end }}
-{{- end }}
-{{- end }}

+ 0 - 15
nginx-ingress/helm-chart/templates/controller-secret.yaml

@@ -1,15 +0,0 @@
-{{ if not .Values.controller.defaultTLS.secret }}
-apiVersion: v1
-kind: Secret
-metadata:
-  name: default-server-secret
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-type: Opaque
-data:
-  tls.crt: {{ .Values.controller.defaultTLS.cert }}
-  tls.key: {{ .Values.controller.defaultTLS.key }}
-{{- end }}

+ 0 - 40
nginx-ingress/helm-chart/templates/controller-service.yaml

@@ -1,40 +0,0 @@
-{{- if .Values.controller.service.create }}
-apiVersion: v1
-kind: Service
-metadata:
-  name: nginx-ingress
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-{{- if .Values.controller.service.annotations }}
-  annotations:
-{{ toYaml .Values.controller.service.annotations | indent 4 }}
-{{- end }}
-spec:
-{{- if or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort") }}
-  {{- if .Values.controller.service.externalTrafficPolicy }}
-  externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy }}
-  {{- end }}
-  {{- if (eq .Values.controller.service.type "LoadBalancer") .Values.controller.service.loadBalancerIP }}
-  loadBalancerIP: {{ .Values.controller.service.loadBalancerIP }}
-  {{- end }}
-{{- end }}
-  type: {{ .Values.controller.service.type }}
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  - port: 443
-    targetPort: 443
-    protocol: TCP
-    name: https
-  selector:
-    app: {{ .Values.controller.name | trunc 63 }}
-  {{- if .Values.controller.service.externalIPs }}
-  externalIPs:
-{{ toYaml .Values.controller.service.externalIPs | indent 4 }}
-  {{- end }}
-{{- end }}

+ 0 - 15
nginx-ingress/helm-chart/templates/controller-serviceaccount.yaml

@@ -1,15 +0,0 @@
-{{- if .Values.rbac.create }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ .Values.controller.serviceAccount.name }}
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-{{- if .Values.controller.serviceAccount.imagePullSecrets }}
-imagePullSecrets:
-{{ toYaml .Values.controller.serviceAccount.imagePullSecrets }}
-{{- end }}
-{{- end }}

+ 0 - 86
nginx-ingress/helm-chart/templates/rbac.yaml

@@ -1,86 +0,0 @@
-{{- if .Values.rbac.create }}
-kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
-  name: nginx-ingress
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-rules:
-- apiGroups:
-  - ""
-  resources:
-  - services
-  - endpoints
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - secrets
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - configmaps
-  verbs:
-  - get
-  - list
-  - watch
-  - update
-  - create
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  verbs:
-  - list
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - patch
-- apiGroups:
-  - extensions
-  resources:
-  - ingresses
-  verbs:
-  - get
-  - list
-  - watch
-{{- if .Values.controller.reportIngressStatus.enable }}
-- apiGroups:
-  - "extensions"
-  resources:
-  - ingresses/status
-  verbs:
-  - update
-{{- end }}
----
-kind: ClusterRoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
-  name: nginx-ingress
-  labels:
-    app: {{ .Values.controller.name | trunc 63 }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
-    heritage: {{ .Release.Service }}
-    release: {{ .Release.Name }}
-subjects:
-- kind: ServiceAccount
-  name: {{ .Values.controller.serviceAccount.name }}
-  namespace: {{ .Release.Namespace }}
-roleRef:
-  kind: ClusterRole
-  name: nginx-ingress
-  apiGroup: rbac.authorization.k8s.io
-{{- end }}

+ 0 - 10
nginx-ingress/helm-chart/values-icp.yaml

@@ -1,10 +0,0 @@
-controller:
-  kind: daemonset
-  nginxplus: true
-  image:
-    repository: mycluster.icp:8500/kube-system/nginx-plus-ingress
-    tag: "1.4.3"
-  nodeSelector: { beta.kubernetes.io/arch: "amd64",
-                   proxy: "true" }
-  terminationGracePeriodSeconds: 60
-  tolerations: "icp"

+ 0 - 5
nginx-ingress/helm-chart/values-plus.yaml

@@ -1,5 +0,0 @@
-controller:
-  nginxplus: true
-  image:
-    repository: nginx-plus-ingress
-    tag: "1.4.3"

File diff suppressed because it is too large
+ 0 - 15
nginx-ingress/helm-chart/values.yaml


+ 41 - 17
nginx-ingress/deployment/mandatory.yaml → nginx-ingress/ingress.yaml

@@ -81,23 +81,25 @@ rules:
       - get
       - list
       - watch
+  - apiGroups:
+      - ""
+    resources:
+      - events
+    verbs:
+      - create
+      - patch
   - apiGroups:
       - "extensions"
+      - "networking.k8s.io"
     resources:
       - ingresses
     verbs:
       - get
       - list
       - watch
-  - apiGroups:
-      - ""
-    resources:
-      - events
-    verbs:
-      - create
-      - patch
   - apiGroups:
       - "extensions"
+      - "networking.k8s.io"
     resources:
       - ingresses/status
     verbs:
@@ -185,7 +187,7 @@ subjects:
 
 ---
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: DaemonSet
 metadata:
   name: nginx-ingress-controller
@@ -199,10 +201,6 @@ spec:
     matchLabels:
       app.kubernetes.io/name: ingress-nginx
       app.kubernetes.io/part-of: ingress-nginx
-  updateStrategy:
-    rollingUpdate:
-      maxUnavailable: 1
-    type: RollingUpdate
   template:
     metadata:
       labels:
@@ -212,11 +210,15 @@ spec:
         prometheus.io/port: "10254"
         prometheus.io/scrape: "true"
     spec:
+      # wait up to five minutes for the drain of connections
+      terminationGracePeriodSeconds: 300
       serviceAccountName: nginx-ingress-serviceaccount
+      nodeSelector:
+        kubernetes.io/os: linux
       hostNetwork: true
       containers:
         - name: nginx-ingress-controller
-          image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0
+          image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
           args:
             - /nginx-ingress-controller
             - --configmap=$(POD_NAMESPACE)/nginx-configuration
@@ -231,8 +233,8 @@ spec:
                 - ALL
               add:
                 - NET_BIND_SERVICE
-            # www-data -> 33
-            runAsUser: 33
+            # www-data -> 101
+            runAsUser: 101
           env:
             - name: POD_NAME
               valueFrom:
@@ -245,8 +247,10 @@ spec:
           ports:
             - name: http
               containerPort: 80
+              protocol: TCP
             - name: https
               containerPort: 443
+              protocol: TCP
           livenessProbe:
             failureThreshold: 3
             httpGet:
@@ -256,7 +260,7 @@ spec:
             initialDelaySeconds: 10
             periodSeconds: 10
             successThreshold: 1
-            timeoutSeconds: 1
+            timeoutSeconds: 10
           readinessProbe:
             failureThreshold: 3
             httpGet:
@@ -265,6 +269,26 @@ spec:
               scheme: HTTP
             periodSeconds: 10
             successThreshold: 1
-            timeoutSeconds: 1
+            timeoutSeconds: 10
+          lifecycle:
+            preStop:
+              exec:
+                command:
+                  - /wait-shutdown
 
 ---
+
+apiVersion: v1
+kind: LimitRange
+metadata:
+  name: ingress-nginx
+  namespace: ingress-nginx
+  labels:
+    app.kubernetes.io/name: ingress-nginx
+    app.kubernetes.io/part-of: ingress-nginx
+spec:
+  limits:
+  - min:
+      memory: 90Mi
+      cpu: 100m
+    type: Container

+ 0 - 72
nginx-ingress/rbac/rbac.yaml

@@ -1,72 +0,0 @@
-kind: ClusterRole
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
-  name: nginx-ingress
-rules:
-- apiGroups:
-  - ""
-  resources:
-  - services
-  - endpoints
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - secrets
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - ""
-  resources:
-  - configmaps
-  verbs:
-  - get
-  - list
-  - watch
-  - update
-  - create
-- apiGroups:
-  - ""
-  resources:
-  - pods
-  verbs:
-  - list
-- apiGroups:
-  - ""
-  resources:
-  - events
-  verbs:
-  - create
-  - patch
-- apiGroups:
-  - extensions
-  resources:
-  - ingresses
-  verbs:
-  - list
-  - watch
-  - get
-- apiGroups:
-  - "extensions"
-  resources:
-  - ingresses/status
-  verbs:
-  - update
----
-kind: ClusterRoleBinding
-apiVersion: rbac.authorization.k8s.io/v1beta1
-metadata:
-  name: nginx-ingress
-subjects:
-- kind: ServiceAccount
-  name: nginx-ingress
-  namespace: nginx-ingress
-roleRef:
-  kind: ClusterRole
-  name: nginx-ingress
-  apiGroup: rbac.authorization.k8s.io

+ 0 - 21
nginx-ingress/service/loadbalancer-aws-elb.yaml

@@ -1,21 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-  annotations:
-    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
-    service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
-spec:
-  type: LoadBalancer
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  - port: 443
-    targetPort: 443
-    protocol: TCP
-    name: https
-  selector:
-    app: nginx-ingress

+ 0 - 19
nginx-ingress/service/loadbalancer.yaml

@@ -1,19 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  externalTrafficPolicy: Local
-  type: LoadBalancer
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  - port: 443
-    targetPort: 443
-    protocol: TCP
-    name: https
-  selector:
-    app: nginx-ingress

+ 0 - 32
nginx-ingress/service/nginx-ingress-controller-metrics.yaml

@@ -1,32 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: ingress-nginx
-  namespace: ingress-nginx
-  labels:
-    k8s-app: ingress-nginx
-spec:
-  type: ClusterIP
-  ports:
-    - name: metrics
-      port: 10254
-      targetPort: 10254
-  selector:
-    app.kubernetes.io/name: ingress-nginx
-    app.kubernetes.io/part-of: ingress-nginx
-#---
-#apiVersion: v1
-#kind: Endpoints
-#metadata:
-#  labels:
-#    k8s-app: ingress-nginx
-#  name: ingress-nginx
-#  namespace: ingress-nginx
-#subsets:
-#- addresses:
-#  - ip: 192.168.20.31 # change to your node deployed ingress-nginx ip
-#  - ip: 192.168.20.30 # change to your node deployed ingress-nginx ip
-#  ports:
-#  - name: metrics
-#    port: 10254
-#    protocol: TCP

+ 0 - 22
nginx-ingress/service/nginx-ingress-sm.yaml

@@ -1,22 +0,0 @@
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
-  name: ingress-nginx
-  namespace: monitoring
-  labels:
-    k8s-app: ingress-nginx
-    component: ingress-nginx
-    heritage: Tiller
-    prometheus: kube-prometheus
-    release: kube-prometheus
-spec:
-  jobLabel: k8s-app
-  endpoints:
-  - interval: 30s
-    port: metrics
-  selector:
-    matchLabels:
-      k8s-app: ingress-nginx
-  namespaceSelector:
-    matchNames:
-    - ingress-nginx

+ 0 - 27
nginx-ingress/service/nginx-prom-role.yaml

@@ -1,27 +0,0 @@
----
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: Role
-metadata:
-  name: prometheus-k8s
-  namespace: ingress-nginx
-rules:
-- apiGroups: [""]
-  resources:
-  - services
-  - endpoints
-  - pods
-  verbs: ["get", "list", "watch"]
----
-apiVersion: rbac.authorization.k8s.io/v1beta1
-kind: RoleBinding
-metadata:
-  name: prometheus-k8s
-  namespace: ingress-nginx
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: Role
-  name: prometheus-k8s
-subjects:
-- kind: ServiceAccount
-  name: prometheus-k8s
-  namespace: monitoring

+ 0 - 18
nginx-ingress/service/nodeport.yaml

@@ -1,18 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: nginx-ingress
-  namespace: nginx-ingress
-spec:
-  type: NodePort 
-  ports:
-  - port: 80
-    targetPort: 80
-    protocol: TCP
-    name: http
-  - port: 443
-    targetPort: 443
-    protocol: TCP
-    name: https
-  selector:
-    app: nginx-ingress

Some files were not shown because too many files changed in this diff