Skip to content

Comments

NE-2376: Remove restriction of unmanaged x-k8s.io#1336

Open
rikatz wants to merge 2 commits intoopenshift:masterfrom
rikatz:ne-2376
Open

NE-2376: Remove restriction of unmanaged x-k8s.io#1336
rikatz wants to merge 2 commits intoopenshift:masterfrom
rikatz:ne-2376

Conversation

@rikatz
Copy link
Member

@rikatz rikatz commented Jan 7, 2026

Previously, cluster-ingress-operator would manage and block any updates to CRDs that were from group gateway.networking.x-k8s.io.

After some analysis we identified that OSSM/Istio does filter these resources in case it does not have a flag to enable alpha APIs, which means it is safe to allow users to deploy these CRDs.

This way, this change removes any restriction on x-k8s.io group, and removes any further reconciliation from CIO on x-k8s.io group.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 7, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 7, 2026

@rikatz: This pull request references NE-2376 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Previously, cluster-ingress-operator would manage and block any updates to CRDs that were from group gateway.networking.x-k8s.io.

After some analysis we identified that OSSM/Istio does filter these resources in case it does not have a flag to enable alpha APIs, which means it is safe to allow users to deploy these CRDs.

This way, this change removes any restriction on x-k8s.io group, and removes any further reconciliation from CIO on x-k8s.io group.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Member Author

rikatz commented Jan 7, 2026

/hold
discussing with @shaneutt about the implications here

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2026
@rikatz
Copy link
Member Author

rikatz commented Jan 8, 2026

/test okd-scos-images

@rikatz
Copy link
Member Author

rikatz commented Jan 8, 2026

/hold

merge it after openshift/origin#30658 is merged and has a new release, otherwise this may break openshift/origin

@rikatz
Copy link
Member Author

rikatz commented Jan 22, 2026

/retest

@rikatz
Copy link
Member Author

rikatz commented Jan 22, 2026

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2026
@davidesalerno
Copy link
Contributor

Changes looks good to me, I've got only one question: should we consider adding a release note or documentation about this change?

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 23, 2026
@rikatz
Copy link
Member Author

rikatz commented Jan 23, 2026

/retest-required

@davidesalerno we will add docs about it, it will be its own Jira. Also this will be backported from 4.19 to 4.21

@rikatz
Copy link
Member Author

rikatz commented Jan 23, 2026

/cc @rhamini3

How to test:

@openshift-ci openshift-ci bot requested a review from rhamini3 January 23, 2026 17:29
@rhamini3
Copy link
Contributor

marking PR as verified as pre-merge is successful. the xlistener set CRD is successfully installed while the tlsRoutes CRD is blocked by the VAP

% oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-01-26-185026-test-ci-ln-irn5cfb-latest   True        False         76m     Cluster version is 4.22.0-0-2026-01-26-185026-test-ci-ln-irn5cfb-latest

% oc apply -f config/crd/experimental/gateway.networking.x-k8s.io_xlistenersets.yaml 
customresourcedefinition.apiextensions.k8s.io/xlistenersets.gateway.networking.x-k8s.io created
iamin@iamin-mac gateway-api % oc apply -f config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml 
Error from server (Forbidden): error when creating "config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml": customresourcedefinitions.apiextensions.k8s.io "tlsroutes.gateway.networking.k8s.io" is forbidden: ValidatingAdmissionPolicy 'openshift-ingress-operator-gatewayapi-crd-admission' with binding 'openshift-ingress-operator-gatewayapi-crd-admission' denied request: Gateway API Custom Resource Definitions are managed by the Ingress Operator and may not be modified

@rhamini3
Copy link
Contributor

/verified by @rhamini3

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 26, 2026
@openshift-ci-robot
Copy link
Contributor

@rhamini3: This PR has been marked as verified by @rhamini3.

Details

In response to this:

/verified by @rhamini3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jan 27, 2026
@rikatz
Copy link
Member Author

rikatz commented Jan 27, 2026

/verified by @rikatz re-adding, last commit was just a rebase over master

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 27, 2026
@openshift-ci-robot
Copy link
Contributor

@rikatz: This PR has been marked as verified by @rikatz re-adding,last commit was just a rebase over master.

Details

In response to this:

/verified by @rikatz re-adding, last commit was just a rebase over master

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Miciah
Copy link
Contributor

Miciah commented Jan 27, 2026

/assign

@rikatz
Copy link
Member Author

rikatz commented Jan 27, 2026

/assign @davidesalerno @alebedev87

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Feb 6, 2026
@rikatz
Copy link
Member Author

rikatz commented Feb 9, 2026

/retest

@rikatz
Copy link
Member Author

rikatz commented Feb 9, 2026

/verified by @rikatz re-adding, last commit was just a rebase over master

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 9, 2026
@openshift-ci-robot
Copy link
Contributor

@rikatz: This PR has been marked as verified by @rikatz re-adding,last commit was just a rebase over master.

Details

In response to this:

/verified by @rikatz re-adding, last commit was just a rebase over master

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Member Author

rikatz commented Feb 9, 2026

/retest

@alebedev87
Copy link
Contributor

alebedev87 commented Feb 9, 2026

/unassign

Letting Miciah give the final ok.

Copy link
Contributor

@Miciah Miciah left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

Thanks!

crd := o.(*apiextensionsv1.CustomResourceDefinition)
return crd.Spec.Group == gatewayapiv1.GroupName || crd.Spec.Group == experimentalGatewayAPIGroupName
crd, ok := o.(*apiextensionsv1.CustomResourceDefinition)
return ok && crd.Spec.Group == gatewayapiv1.GroupName
Copy link
Contributor

Choose a reason for hiding this comment

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

There has been some debate about whether the type assertion needs to guard against panic: #1165 (comment)

In any case, the operator is already inconsistent in this respect across the various controllers, and I don't consider it to be a major issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I am in favor of trying to be as defensive as possible. I've seen weird panics happening on weird places, and I prefer to have 2 extra lines instead of having some misbehavior :D

olmEnabled: true,
existingObjects: []runtime.Object{
co("ingress"),
crd("listenersets.gateway.networking.x-k8s.io"),
Copy link
Contributor

Choose a reason for hiding this comment

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

It would make sense to have a test case with listenersets.gateway.networking.k8s.io (without x-) to represent a real CRD name which the current version of the operator should flag as problematic. (Also, it would be satisfying when we do add support for listenersets to correct all the tests that say "this shouldn't work" to say instead "this should work"!) However, it it isn't a major issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is a unit test. We do not really really on the CRD name, but more on the group as defined on https://github.com/openshift/cluster-ingress-operator/pull/1336/files#diff-bea9a36dd02f12bbe121fcd437437e64ffde3aadaf50872f7d259b4b023fa8f9R263 as you have commented below :)

So being listenerset or not here would not change once we really support it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand. managedCRDMap does not have listenersets, so a unit test with listenersets.gateway.networking.k8s.io would expect {"unmanagedGatewayAPICRDNames":"listenersets.gateway.networking.k8s.io"} right now, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see what you're saying—the test's fake indexer doesn't actually use managedCRDMap as the real indexer does; instead, the fake indexer checks for an artificial group-name to determine whether or not the CRD is managed, and so while using listenersets.gateway.networking.k8s.io might make for a more realistic test case, it wouldn't actually improve test coverage given the fake indexer.

Copy link
Member Author

Choose a reason for hiding this comment

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

exactly!

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough. Improving the test's fake indexer to be more realistic is out of scope for this PR.

Comment on lines 262 to 263
// Assume that all experimental CRDs are unmanaged.
if strings.Contains(o.GetName(), "gateway.networking.x-k8s.io") {
if strings.Contains(o.GetName(), "test.gateway.networking.k8s.io") {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure the code comment makes sense anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidesalerno, Miciah

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Miciah,davidesalerno]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Previously, cluster-ingress-operator would manage and block any
updates to CRDs that were from group gateway.networking.x-k8s.io.

After some analysis we identified that OSSM/Istio does filter these
resources in case it does not have a flag to enable alpha APIs, which means
it is safe to allow users to deploy these CRDs.

This way, this change removes any restriction on x-k8s.io group,
and removes any further reconciliation from CIO on x-k8s.io group.
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Feb 16, 2026
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2026
@rikatz
Copy link
Member Author

rikatz commented Feb 16, 2026

/verified by @rikatz re-adding, last commit was just a rebase over master

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 16, 2026
@openshift-ci-robot
Copy link
Contributor

@rikatz: This PR has been marked as verified by @rikatz re-adding,last commit was just a rebase over master.

Details

In response to this:

/verified by @rikatz re-adding, last commit was just a rebase over master

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Member Author

rikatz commented Feb 16, 2026

/retest-required

@Miciah
Copy link
Contributor

Miciah commented Feb 16, 2026

Thanks! Only change since my previous was a rebase and a fix to a code comment, so
/lgtm

I see the comment-fix is in a separate commit; if you like, you should be able to use /label tide/merge-method-squash to keep it in the same logical commit without needing to force-push (and trigger rerunning CI).

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2026
@rikatz
Copy link
Member Author

rikatz commented Feb 16, 2026

/label tide/merge-method-squash

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Feb 16, 2026
@rikatz
Copy link
Member Author

rikatz commented Feb 16, 2026

thanks. CI seems a bit flaky on other parts, I will keep an eye on it so we can get it merged :)

@rikatz
Copy link
Member Author

rikatz commented Feb 18, 2026

/retest-required

@rikatz
Copy link
Member Author

rikatz commented Feb 18, 2026

/test hypershift-e2e-aks

1 similar comment
@rikatz
Copy link
Member Author

rikatz commented Feb 18, 2026

/test hypershift-e2e-aks

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2026

@rikatz: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants