Skip to content

Get GatewayClass name from cluster#685

Merged
trepel merged 1 commit intoKuadrant:mainfrom
trepel:get-gw-class-name-from-cluster
Jun 10, 2025
Merged

Get GatewayClass name from cluster#685
trepel merged 1 commit intoKuadrant:mainfrom
trepel:get-gw-class-name-from-cluster

Conversation

@trepel
Copy link
Copy Markdown
Contributor

@trepel trepel commented Jun 6, 2025

Description

Instead of using hard-coded 'istio' the proper name of GatewayClass CR is used based on what is actually present in cluster.

Reason: in OCP v4.19 the GatewayClass CR won't be called 'istio' but 'openshift-default' by default. Also we might need to support other names - users can create GatewayClasse CR with arbitrary name and Kuadrant supports that so our test suite should be ready for that too.

Verification Steps

I don't think that we have OCP v4.19 cluster with 'openshift-default' GatewayClass CR so the simplest way of verification is to run some test against some cluster:
make testsuite/tests/singlecluster/gateway/test_basic.py::test_gateway_readiness

  • it should pass with 'istio' being the name for GatewayClass used in Gateway CR that got created

Then change the 'openshift-default' in code to 'istio-remote' (that is another GatewayClass custom resource present on clusters), run the test again and validate that Gateway CR that gets created uses 'istio-remote' as a GatewayClass name

@trepel trepel requested a review from azgabur June 6, 2025 12:55
@trepel trepel force-pushed the get-gw-class-name-from-cluster branch from 2a0b387 to 9fd0890 Compare June 6, 2025 13:41
Copy link
Copy Markdown
Member

@azgabur azgabur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current state the testsuite/tests/singlecluster/gateway/test_basic.py test passes and all seems to be working in order

Comment thread testsuite/gateway/gateway_api/gateway.py Outdated
Comment thread testsuite/gateway/gateway_api/gateway.py Outdated
@trepel trepel force-pushed the get-gw-class-name-from-cluster branch from 380f6d0 to 636e110 Compare June 9, 2025 14:00
Signed-off-by: Tomas Repel <trepel@redhat.com>
@trepel trepel force-pushed the get-gw-class-name-from-cluster branch from 636e110 to 7be6156 Compare June 9, 2025 14:55
@trepel trepel merged commit 6c1a541 into Kuadrant:main Jun 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants