Skip to content

Commit

Permalink
BC-5546 - ingress snippes only one time add
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Oct 24, 2023
1 parent 90a640b commit 8908a2b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 44 deletions.
3 changes: 3 additions & 0 deletions ansible/roles/schulcloud-server-core/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: ingress.yml.j2
apply: yes

- name: FileStorageDeployment
kubernetes.core.k8s:
Expand All @@ -82,6 +83,7 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: api-files-ingress.yml.j2
apply: yes

- name: FwuLearningContentsDeployment
kubernetes.core.k8s:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
11 changes: 0 additions & 11 deletions ansible/roles/schulcloud-server-core/templates/ingress.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/schulcloud-server-h5p/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 8908a2b

Please sign in to comment.