Skip to content

[WIP] [Operator] Add Route#2418

Draft
jankalinic wants to merge 8 commits intostreamshub:mainfrom
jankalinic:route-ingress
Draft

[WIP] [Operator] Add Route#2418
jankalinic wants to merge 8 commits intostreamshub:mainfrom
jankalinic:route-ingress

Conversation

@jankalinic
Copy link
Copy Markdown
Contributor

This PR is just for POC sharing purposes.

@jankalinic jankalinic self-assigned this Mar 16, 2026
@jankalinic jankalinic added the do not merge Do not merge just yet. Work is still in progress label Mar 16, 2026
@jankalinic jankalinic added this to the 0.12.1 milestone Mar 16, 2026
Comment thread operator/src/main/java/com/github/streamshub/console/dependents/ConsoleRoute.java Outdated
Comment thread operator/src/main/java/com/github/streamshub/console/ConsoleReconciler.java Outdated
@jankalinic
Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=KafkaNodePoolST#testFilterKafkaNodesByRole

2 similar comments
@jankalinic
Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=KafkaNodePoolST#testFilterKafkaNodesByRole

@jankalinic
Copy link
Copy Markdown
Contributor Author

/systemtests run --testcase=KafkaNodePoolST#testFilterKafkaNodesByRole

@streamshub-bot
Copy link
Copy Markdown

✅ Systemtests run finished - success ✅

Test Summary:

  • TOTAL: 1
  • PASS: 1
  • FAIL: 0
  • SKIP: 0

Used parameters:

  • TEST_CASE: KafkaNodePoolST#testFilterKafkaNodesByRole
  • PROFILE:
  • INSTALL_TYPE: olm
  • RETRY_COUNT: 0
  • ENVS:

@jankalinic
Copy link
Copy Markdown
Contributor Author

This seems to be working. Needed to add modifcation for OLM, because the quarkus reads the kubernetes.yaml -> for openshift there needs to be RBAC for routes.openshift, but for vanila k8s OLM checks fail. That is because the bundle contains the .spec.nativeAPIs[] which included the newly added routes api, which does not exist on vanila k8s thus the operator won't even attempt installation. The current state allows both of these (ingress & route) to co-exist. I only need to refactor the tests so that they reflect the changes.

@MikeEdgar MikeEdgar removed this from the 0.12.1 milestone Apr 2, 2026
Copy link
Copy Markdown
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

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

I'll spend some time to go through this more carefully once the 0.12.1 release is out. Like you've mentioned, I think the tests in the operator module need some adjustments.

Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
…enshift

Signed-off-by: jkalinic <jkalinic@redhat.com>
Copy link
Copy Markdown
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

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

I looked into the test failures and there are a few things that need to be adjusted to correct. The suggestions about adding readyPostcondition to the ingress and route is one part, and the other part is in the tests themselves.

Since the presence of the Route API will trigger the new logic, we need to make sure it is only present in the Kube server for the (single) test that needs it. In the ConsoleReconcilerTestBase class setUp method, add a JUnit TestInfo testInfo argument that you can use to conditionally create the Route CRD based on a tag. Something like:

if (testInfo.getTags().contains("requires:routes.route.openshift.io")) {
    // create the route CRD
} else {
    // delete any route instances and the CRD
    try {
        delete(client.resources(Route.class).inAnyNamespace());
        client.resources(CustomResourceDefinition.class).withName("routes.route.openshift.io").delete();
    } catch (KubernetesClientException e) {
        // Ignore
    }
}

Then you can tag the one test that needs a Route like this:

@Test
@Tag("requires:routes.route.openshift.io")
void testConsoleReconciliationWithOpenShiftMonitoring() {
    // the test
}

Future tests you add to check the new Route logic can use the same tag.

Comment on lines +39 to +41
throw new ReconciliationException(
"spec.hostname is required when running on plain Kubernetes vanila clusters. " +
"Please set a hostname in your Console resource.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should probably go in ConfigurationProcessor so that we can set an error condition in the status along with any other validation errors that could occur. It wouldn't be throwing an exception in there, but it blocks progress on reconciliation because the CR will be considered invalid.

Also, the @Required will need to be removed from the hostname in ConsoleSpec.

Signed-off-by: Michael Edgar <medgar@redhat.com>
@MikeEdgar MikeEdgar added this to the 0.13.0 milestone Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge just yet. Work is still in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants