From 170ef74eea50fa1b8c0aa8012f23b40c522137e4 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sat, 16 Feb 2019 14:13:08 -0800 Subject: [PATCH] Remove Nginx Ingress default backend * nginx-ingress no longer requires a configured default-backend, it will respond with its own 404 page starting in v0.21.0 * https://github.com/kubernetes/ingress-nginx/pull/3196 --- CHANGES.md | 2 + .../aws/default-backend/deployment.yaml | 42 ------------------- .../aws/default-backend/service.yaml | 15 ------- addons/nginx-ingress/aws/deployment.yaml | 1 - .../azure/default-backend/deployment.yaml | 42 ------------------- .../azure/default-backend/service.yaml | 15 ------- addons/nginx-ingress/azure/deployment.yaml | 1 - .../default-backend/deployment.yaml | 42 ------------------- .../bare-metal/default-backend/service.yaml | 15 ------- .../nginx-ingress/bare-metal/deployment.yaml | 1 - .../digital-ocean/daemonset.yaml | 1 - .../default-backend/deployment.yaml | 42 ------------------- .../default-backend/service.yaml | 15 ------- .../default-backend/deployment.yaml | 42 ------------------- .../google-cloud/default-backend/service.yaml | 15 ------- .../google-cloud/deployment.yaml | 1 - 16 files changed, 2 insertions(+), 290 deletions(-) delete mode 100644 addons/nginx-ingress/aws/default-backend/deployment.yaml delete mode 100644 addons/nginx-ingress/aws/default-backend/service.yaml delete mode 100644 addons/nginx-ingress/azure/default-backend/deployment.yaml delete mode 100644 addons/nginx-ingress/azure/default-backend/service.yaml delete mode 100644 addons/nginx-ingress/bare-metal/default-backend/deployment.yaml delete mode 100644 addons/nginx-ingress/bare-metal/default-backend/service.yaml delete mode 100644 addons/nginx-ingress/digital-ocean/default-backend/deployment.yaml delete mode 100644 addons/nginx-ingress/digital-ocean/default-backend/service.yaml delete mode 100644 addons/nginx-ingress/google-cloud/default-backend/deployment.yaml delete mode 100644 addons/nginx-ingress/google-cloud/default-backend/service.yaml diff --git a/CHANGES.md b/CHANGES.md index e2cb82c1..32ffcf31 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,8 @@ Notable changes between versions. #### Addons * Raise nginx-ingress liveness/readiness timeout to 5 seconds +* Remove nginx-ingess default-backend ([#401](https://github.com/poseidon/typhoon/pull/401)) + * nginx-ingress now responds with its own 404 page by default * Improve Prometheus metrics labels and drop extraneous metrics ([#397](https://github.com/poseidon/typhoon/pull/397)) * Add `pod` name label to metrics discovered via service endpoints * Rename `kubernetes_namespace` label to `namespace` diff --git a/addons/nginx-ingress/aws/default-backend/deployment.yaml b/addons/nginx-ingress/aws/default-backend/deployment.yaml deleted file mode 100644 index ce640189..00000000 --- a/addons/nginx-ingress/aws/default-backend/deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: default-backend - namespace: ingress -spec: - replicas: 1 - selector: - matchLabels: - name: default-backend - phase: prod - template: - metadata: - labels: - name: default-backend - phase: prod - annotations: - seccomp.security.alpha.kubernetes.io/pod: 'docker/default' - spec: - containers: - - name: default-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: k8s.gcr.io/defaultbackend:1.4 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - terminationGracePeriodSeconds: 60 diff --git a/addons/nginx-ingress/aws/default-backend/service.yaml b/addons/nginx-ingress/aws/default-backend/service.yaml deleted file mode 100644 index 87997aba..00000000 --- a/addons/nginx-ingress/aws/default-backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: ingress -spec: - type: ClusterIP - selector: - name: default-backend - phase: prod - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/addons/nginx-ingress/aws/deployment.yaml b/addons/nginx-ingress/aws/deployment.yaml index cd841eb5..1f537e25 100644 --- a/addons/nginx-ingress/aws/deployment.yaml +++ b/addons/nginx-ingress/aws/deployment.yaml @@ -27,7 +27,6 @@ spec: image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-backend - --ingress-class=public # use downward API env: diff --git a/addons/nginx-ingress/azure/default-backend/deployment.yaml b/addons/nginx-ingress/azure/default-backend/deployment.yaml deleted file mode 100644 index ce640189..00000000 --- a/addons/nginx-ingress/azure/default-backend/deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: default-backend - namespace: ingress -spec: - replicas: 1 - selector: - matchLabels: - name: default-backend - phase: prod - template: - metadata: - labels: - name: default-backend - phase: prod - annotations: - seccomp.security.alpha.kubernetes.io/pod: 'docker/default' - spec: - containers: - - name: default-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: k8s.gcr.io/defaultbackend:1.4 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - terminationGracePeriodSeconds: 60 diff --git a/addons/nginx-ingress/azure/default-backend/service.yaml b/addons/nginx-ingress/azure/default-backend/service.yaml deleted file mode 100644 index 87997aba..00000000 --- a/addons/nginx-ingress/azure/default-backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: ingress -spec: - type: ClusterIP - selector: - name: default-backend - phase: prod - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/addons/nginx-ingress/azure/deployment.yaml b/addons/nginx-ingress/azure/deployment.yaml index cd841eb5..1f537e25 100644 --- a/addons/nginx-ingress/azure/deployment.yaml +++ b/addons/nginx-ingress/azure/deployment.yaml @@ -27,7 +27,6 @@ spec: image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-backend - --ingress-class=public # use downward API env: diff --git a/addons/nginx-ingress/bare-metal/default-backend/deployment.yaml b/addons/nginx-ingress/bare-metal/default-backend/deployment.yaml deleted file mode 100644 index ce640189..00000000 --- a/addons/nginx-ingress/bare-metal/default-backend/deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: default-backend - namespace: ingress -spec: - replicas: 1 - selector: - matchLabels: - name: default-backend - phase: prod - template: - metadata: - labels: - name: default-backend - phase: prod - annotations: - seccomp.security.alpha.kubernetes.io/pod: 'docker/default' - spec: - containers: - - name: default-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: k8s.gcr.io/defaultbackend:1.4 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - terminationGracePeriodSeconds: 60 diff --git a/addons/nginx-ingress/bare-metal/default-backend/service.yaml b/addons/nginx-ingress/bare-metal/default-backend/service.yaml deleted file mode 100644 index 87997aba..00000000 --- a/addons/nginx-ingress/bare-metal/default-backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: ingress -spec: - type: ClusterIP - selector: - name: default-backend - phase: prod - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/addons/nginx-ingress/bare-metal/deployment.yaml b/addons/nginx-ingress/bare-metal/deployment.yaml index 7ba6b866..8c61aa0f 100644 --- a/addons/nginx-ingress/bare-metal/deployment.yaml +++ b/addons/nginx-ingress/bare-metal/deployment.yaml @@ -25,7 +25,6 @@ spec: image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-backend - --ingress-class=public # use downward API env: diff --git a/addons/nginx-ingress/digital-ocean/daemonset.yaml b/addons/nginx-ingress/digital-ocean/daemonset.yaml index e733b3b5..29885d6a 100644 --- a/addons/nginx-ingress/digital-ocean/daemonset.yaml +++ b/addons/nginx-ingress/digital-ocean/daemonset.yaml @@ -27,7 +27,6 @@ spec: image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-backend - --ingress-class=public # use downward API env: diff --git a/addons/nginx-ingress/digital-ocean/default-backend/deployment.yaml b/addons/nginx-ingress/digital-ocean/default-backend/deployment.yaml deleted file mode 100644 index ce640189..00000000 --- a/addons/nginx-ingress/digital-ocean/default-backend/deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: default-backend - namespace: ingress -spec: - replicas: 1 - selector: - matchLabels: - name: default-backend - phase: prod - template: - metadata: - labels: - name: default-backend - phase: prod - annotations: - seccomp.security.alpha.kubernetes.io/pod: 'docker/default' - spec: - containers: - - name: default-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: k8s.gcr.io/defaultbackend:1.4 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - terminationGracePeriodSeconds: 60 diff --git a/addons/nginx-ingress/digital-ocean/default-backend/service.yaml b/addons/nginx-ingress/digital-ocean/default-backend/service.yaml deleted file mode 100644 index 87997aba..00000000 --- a/addons/nginx-ingress/digital-ocean/default-backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: ingress -spec: - type: ClusterIP - selector: - name: default-backend - phase: prod - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/addons/nginx-ingress/google-cloud/default-backend/deployment.yaml b/addons/nginx-ingress/google-cloud/default-backend/deployment.yaml deleted file mode 100644 index ce640189..00000000 --- a/addons/nginx-ingress/google-cloud/default-backend/deployment.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: default-backend - namespace: ingress -spec: - replicas: 1 - selector: - matchLabels: - name: default-backend - phase: prod - template: - metadata: - labels: - name: default-backend - phase: prod - annotations: - seccomp.security.alpha.kubernetes.io/pod: 'docker/default' - spec: - containers: - - name: default-backend - # Any image is permissable as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: k8s.gcr.io/defaultbackend:1.4 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - terminationGracePeriodSeconds: 60 diff --git a/addons/nginx-ingress/google-cloud/default-backend/service.yaml b/addons/nginx-ingress/google-cloud/default-backend/service.yaml deleted file mode 100644 index 87997aba..00000000 --- a/addons/nginx-ingress/google-cloud/default-backend/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: ingress -spec: - type: ClusterIP - selector: - name: default-backend - phase: prod - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/addons/nginx-ingress/google-cloud/deployment.yaml b/addons/nginx-ingress/google-cloud/deployment.yaml index cd841eb5..1f537e25 100644 --- a/addons/nginx-ingress/google-cloud/deployment.yaml +++ b/addons/nginx-ingress/google-cloud/deployment.yaml @@ -27,7 +27,6 @@ spec: image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.22.0 args: - /nginx-ingress-controller - - --default-backend-service=$(POD_NAMESPACE)/default-backend - --ingress-class=public # use downward API env: