Skip to content

Commit

Permalink
BC-5546 - add Keda namespace activator for the ingresses
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Oct 24, 2023
1 parent 3e785f1 commit 90a640b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ metadata:
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 @@ -17,6 +17,14 @@ metadata:
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
8 changes: 8 additions & 0 deletions ansible/roles/schulcloud-server-core/templates/ingress.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ metadata:
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 @@ -17,6 +17,14 @@ metadata:
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 90a640b

Please sign in to comment.