From 8908a2bf541f2a6170772d47c9bf0a1937ae0ac7 Mon Sep 17 00:00:00 2001 From: mamutmk5 <3045922+mamutmk5@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:53:00 +0200 Subject: [PATCH] BC-5546 - ingress snippes only one time add --- ansible/roles/schulcloud-server-core/tasks/main.yml | 3 +++ .../templates/api-files-ingress.yml.j2 | 11 ----------- .../templates/api-fwu-ingress.yml.j2 | 11 ----------- .../schulcloud-server-core/templates/ingress.yml.j2 | 11 ----------- ansible/roles/schulcloud-server-h5p/tasks/main.yml | 1 + .../templates/api-h5p-ingress.yml.j2 | 11 ----------- 6 files changed, 4 insertions(+), 44 deletions(-) diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index f6307001964..a0eedb029f8 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -64,6 +64,7 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: ingress.yml.j2 + apply: yes - name: FileStorageDeployment kubernetes.core.k8s: @@ -82,6 +83,7 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: api-files-ingress.yml.j2 + apply: yes - name: FwuLearningContentsDeployment kubernetes.core.k8s: @@ -95,6 +97,7 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: api-fwu-ingress.yml.j2 + apply: yes 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-files-ingress.yml.j2 b/ansible/roles/schulcloud-server-core/templates/api-files-ingress.yml.j2 index 41e4a301124..a1264b52001 100644 --- a/ansible/roles/schulcloud-server-core/templates/api-files-ingress.yml.j2 +++ b/ansible/roles/schulcloud-server-core/templates/api-files-ingress.yml.j2 @@ -14,17 +14,6 @@ metadata: 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 - nginx.ingress.kubernetes.io/server-snippet: | - client_header_buffer_size 100k; - large_client_header_buffers 4 100k; -{% if KEDA_NAMESPACE_ACTIVATOR_ENABLED is defined %} - proxy_intercept_errors on; - error_page 503 = @errorpages; - - location @errorpages { - return 302 'https://activate.cd.dbildungscloud.dev/namespace?namespace={{ NAMESPACE }}&redirected-from-503=true'; - } -{% endif %} {% if CLUSTER_ISSUER is defined %} cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }} {% endif %} 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 index 411c365bdd8..f42c322e45b 100644 --- a/ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 +++ b/ansible/roles/schulcloud-server-core/templates/api-fwu-ingress.yml.j2 @@ -14,17 +14,6 @@ metadata: 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 - nginx.ingress.kubernetes.io/server-snippet: | - client_header_buffer_size 100k; - large_client_header_buffers 4 100k; -{% if KEDA_NAMESPACE_ACTIVATOR_ENABLED is defined %} - proxy_intercept_errors on; - error_page 503 = @errorpages; - - location @errorpages { - return 302 'https://activate.cd.dbildungscloud.dev/namespace?namespace={{ NAMESPACE }}&redirected-from-503=true'; - } -{% endif %} {% if CLUSTER_ISSUER is defined %} cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }} {% endif %} diff --git a/ansible/roles/schulcloud-server-core/templates/ingress.yml.j2 b/ansible/roles/schulcloud-server-core/templates/ingress.yml.j2 index eb6951c3c92..b2dd208765f 100644 --- a/ansible/roles/schulcloud-server-core/templates/ingress.yml.j2 +++ b/ansible/roles/schulcloud-server-core/templates/ingress.yml.j2 @@ -14,17 +14,6 @@ metadata: 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 - nginx.ingress.kubernetes.io/server-snippet: | - client_header_buffer_size 100k; - large_client_header_buffers 4 100k; -{% if KEDA_NAMESPACE_ACTIVATOR_ENABLED is defined %} - proxy_intercept_errors on; - error_page 503 = @errorpages; - - location @errorpages { - return 302 'https://activate.cd.dbildungscloud.dev/namespace?namespace={{ NAMESPACE }}&redirected-from-503=true'; - } -{% endif %} {% if CLUSTER_ISSUER is defined %} cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }} {% endif %} diff --git a/ansible/roles/schulcloud-server-h5p/tasks/main.yml b/ansible/roles/schulcloud-server-h5p/tasks/main.yml index ed54a896f18..368e97a216e 100644 --- a/ansible/roles/schulcloud-server-h5p/tasks/main.yml +++ b/ansible/roles/schulcloud-server-h5p/tasks/main.yml @@ -17,5 +17,6 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: api-h5p-ingress.yml.j2 + apply: yes when: WITH_H5P_EDITOR is defined and WITH_H5P_EDITOR|bool \ No newline at end of file diff --git a/ansible/roles/schulcloud-server-h5p/templates/api-h5p-ingress.yml.j2 b/ansible/roles/schulcloud-server-h5p/templates/api-h5p-ingress.yml.j2 index 8b472c3e26d..ec68641bfa2 100644 --- a/ansible/roles/schulcloud-server-h5p/templates/api-h5p-ingress.yml.j2 +++ b/ansible/roles/schulcloud-server-h5p/templates/api-h5p-ingress.yml.j2 @@ -14,17 +14,6 @@ metadata: 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 - nginx.ingress.kubernetes.io/server-snippet: | - client_header_buffer_size 100k; - large_client_header_buffers 4 100k; -{% if KEDA_NAMESPACE_ACTIVATOR_ENABLED is defined %} - proxy_intercept_errors on; - error_page 503 = @errorpages; - - location @errorpages { - return 302 'https://activate.cd.dbildungscloud.dev/namespace?namespace={{ NAMESPACE }}&redirected-from-503=true'; - } -{% endif %} {% if CLUSTER_ISSUER is defined %} cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }} {% endif %}