From 53bc80bb59f5aca5548217051978ac37ce3b7e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=AD?= Date: Thu, 15 Aug 2019 17:34:33 +0800 Subject: [PATCH] Ingress nginx (#5066) * remove svc-default-backend * update ingress-nginx clusterrole --- .../ingress_nginx/tasks/main.yml | 1 - .../templates/clusterrole-ingress-nginx.yml.j2 | 4 ++-- .../templates/svc-default-backend.yml.j2 | 16 ---------------- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-default-backend.yml.j2 diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml b/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml index 6858426f2..b8c575817 100644 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml +++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/tasks/main.yml @@ -14,7 +14,6 @@ set_fact: ingress_nginx_templates: - { name: 00-namespace, file: 00-namespace.yml, type: ns } - - { name: svc-default-backend, file: svc-default-backend.yml, type: svc } - { name: cm-ingress-nginx, file: cm-ingress-nginx.yml, type: cm } - { name: cm-tcp-services, file: cm-tcp-services.yml, type: cm } - { name: cm-udp-services, file: cm-udp-services.yml, type: cm } diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/clusterrole-ingress-nginx.yml.j2 b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/clusterrole-ingress-nginx.yml.j2 index 7cc6870e5..bbb577760 100644 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/clusterrole-ingress-nginx.yml.j2 +++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/clusterrole-ingress-nginx.yml.j2 @@ -16,12 +16,12 @@ rules: - apiGroups: [""] resources: ["services"] verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] + - apiGroups: ["extensions","networking.k8s.io"] resources: ["ingresses"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["events"] verbs: ["create", "patch"] - - apiGroups: ["extensions"] + - apiGroups: ["extensions","networking.k8s.io"] resources: ["ingresses/status"] verbs: ["update"] diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-default-backend.yml.j2 b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-default-backend.yml.j2 deleted file mode 100644 index 9c95e8701..000000000 --- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/svc-default-backend.yml.j2 +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: default-backend - namespace: {{ ingress_nginx_namespace }} - labels: - app.kubernetes.io/name: default-backend - app.kubernetes.io/part-of: ingress-nginx -spec: - ports: - - port: 80 - targetPort: 8080 - selector: - app.kubernetes.io/name: default-backend - app.kubernetes.io/part-of: ingress-nginx