From 798abcd2b1c8c6ea21f9c1d4ce589ca61269f014 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:30:29 +0100 Subject: [PATCH 1/3] BC-5705 - Remove fwu ingress --- .../schulcloud-server-core/tasks/main.yml | 8 ++-- .../templates/api-fwu-ingress.yml.j2 | 41 ------------------- 2 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index 1b58c8a5413..fa24c38f61e 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -92,12 +92,14 @@ template: api-fwu-deployment.yml.j2 when: FEATURE_FWU_CONTENT_ENABLED is defined and FEATURE_FWU_CONTENT_ENABLED|bool - - name: Fwu Learning Contents Ingress + - name: Fwu Learning Contents Ingress Remove kubernetes.core.k8s: kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" - template: api-fwu-ingress.yml.j2 - apply: yes + state: absent + api_version: networking.k8s.io/v1 + kind: Ingress + name: {{ NAMESPACE }}-api-files-ingress when: FEATURE_FWU_CONTENT_ENABLED is defined and FEATURE_FWU_CONTENT_ENABLED|bool - name: Delete Files CronJob diff --git a/ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 b/ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 deleted file mode 100644 index f42c322e45b..00000000000 --- a/ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ NAMESPACE }}-api-fwu-ingress - namespace: {{ NAMESPACE }} - annotations: - nginx.ingress.kubernetes.io/ssl-redirect: "{{ TLS_ENABELD|default("false") }}" - nginx.ingress.kubernetes.io/proxy-body-size: "{{ INGRESS_MAX_BODY_SIZE|default("2560") }}m" - nginx.org/client-max-body-size: "{{ INGRESS_MAX_BODY_SIZE|default("2560") }}m" - # The following properties added with BC-3606. - # The header size of the request is too big. For e.g. state and the permanent growing jwt. - # Nginx throws away the Location header, resulting in the 502 Bad Gateway. - nginx.ingress.kubernetes.io/client-header-buffer-size: 100k - nginx.ingress.kubernetes.io/http2-max-header-size: 96k - nginx.ingress.kubernetes.io/large-client-header-buffers: 4 100k - nginx.ingress.kubernetes.io/proxy-buffer-size: 96k -{% if CLUSTER_ISSUER is defined %} - cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }} -{% endif %} - -spec: - ingressClassName: nginx -{% if CLUSTER_ISSUER is defined or (TLS_ENABELD is defined and TLS_ENABELD|bool) %} - tls: - - hosts: - - {{ DOMAIN }} -{% if CLUSTER_ISSUER is defined %} - secretName: {{ DOMAIN }}-tls -{% endif %} -{% endif %} - rules: - - host: {{ DOMAIN }} - http: - paths: - - path: /api/v3/fwu/ - backend: - service: - name: api-fwu-svc - port: - number: {{ PORT_FWU_LEARNING_CONTENTS }} - pathType: Prefix From 75982ebf3975acc247fe208f0a29d2e9e8c37ac1 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:56:40 +0100 Subject: [PATCH 2/3] BC-5705 - fix missing " --- ansible/roles/schulcloud-server-core/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index fa24c38f61e..3d402c79d6c 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -99,7 +99,7 @@ state: absent api_version: networking.k8s.io/v1 kind: Ingress - name: {{ NAMESPACE }}-api-files-ingress + name: "{{ NAMESPACE }}-api-files-ingress" when: FEATURE_FWU_CONTENT_ENABLED is defined and FEATURE_FWU_CONTENT_ENABLED|bool - name: Delete Files CronJob From 186bc01cda8a2c523b6c4e08e6ad5c1b8c93b4f7 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:20:04 +0100 Subject: [PATCH 3/3] BC-5705 - fix wrong ingress delete --- ansible/roles/schulcloud-server-core/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index 3d402c79d6c..64e257c5f59 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -99,7 +99,7 @@ state: absent api_version: networking.k8s.io/v1 kind: Ingress - name: "{{ NAMESPACE }}-api-files-ingress" + name: "{{ NAMESPACE }}-api-fwu-ingress" when: FEATURE_FWU_CONTENT_ENABLED is defined and FEATURE_FWU_CONTENT_ENABLED|bool - name: Delete Files CronJob