Skip to content

Commit

Permalink
Add missing annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomach committed Nov 21, 2024
1 parent 7aea516 commit 55ddfb1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Unreleased

* Bump ``sql_exporter`` to ``0.16.0``

* Set ``Access-Control-Allow-Origin`` header in ``grand-central`` ingress.
* Set CORS annotations in ``grand-central`` ingress.

2.42.0 (2024-10-02)
-------------------
Expand Down
1 change: 1 addition & 0 deletions crate/operator/grand_central.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ def get_grand_central_ingress(
),
"nginx.ingress.kubernetes.io/proxy-buffer-size": "64k",
"nginx.ingress.kubernetes.io/ssl-redirect": "true",
"nginx.ingress.kubernetes.io/enable-cors": "true",
"nginx.ingress.kubernetes.io/cors-allow-credentials": "true",
"nginx.ingress.kubernetes.io/cors-allow-origin": allow_origin,
"nginx.ingress.kubernetes.io/cors-allow-methods": (
Expand Down
4 changes: 4 additions & 0 deletions tests/test_create_grand_central.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ async def test_create_grand_central(faker, namespace, kopf_runner, api_client):
]
== "true"
)
assert (
ingress.metadata.annotations["nginx.ingress.kubernetes.io/enable-cors"]
== "true"
)
assert (
ingress.metadata.annotations["nginx.ingress.kubernetes.io/cors-allow-origin"]
== "$http_origin"
Expand Down

0 comments on commit 55ddfb1

Please sign in to comment.