Skip to content

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Apr 9, 2025

status: Omit istios namespace in relatedObjects

Omit the namespace for the istios resource in relatedObjects as the istios resource is cluster-scoped.

status: Omit gateways namespace in relatedObjects

Omit the namespace for the gateways resource in relatedObjects as Istio manages gateways in all namespaces.

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO().

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Watch customresourcedefinitions in the status controller so that it updates relatedObjects as these CRDs are created.

Check the "GatewayAPIController" featuregate to determine whether to add the gatewayclasses, gateways, istios, and subscriptions resources to relatedObjects, in addition to checking the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 9, 2025
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-54745, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO()`.

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Also, use the "GatewayAPIController" featuregate for the gateways and istios resources, rather than the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

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 openshift-ci bot requested review from alebedev87 and rfredette April 9, 2025 00:25
@Miciah
Copy link
Contributor Author

Miciah commented Apr 9, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 9, 2025
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-54745, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @lihongan

In response to this:

/jira refresh

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 openshift-ci bot requested a review from lihongan April 9, 2025 00:30
@candita
Copy link
Contributor

candita commented Apr 9, 2025

/assign @alebedev87
/assign

)

if err := r.cache.Get(ctx, gatewaysResourceNamespacedName, &crd); err != nil {
if !errors.IsNotFound(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it matter much if there was a prior resource, then it was deleted? E.g. someone removed the Istio or other CRDs we're checking here - do we then need to remove these from relatedObjects? Or is it okay because this is reconciled periodically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The watch on CRDs should trigger reconciliation if the istios CRD is deleted:

if err := c.Watch(source.Kind[client.Object](operatorCache, &apiextensionsv1.CustomResourceDefinition{}, handler.EnqueueRequestsFromMapFunc(toDefaultIngressController), predicate.Funcs{
CreateFunc: func(e event.CreateEvent) bool {
return relatedObjectsCRDs.Has(e.Object.GetName())
},
UpdateFunc: func(e event.UpdateEvent) bool {
return false
},
DeleteFunc: func(e event.DeleteEvent) bool {
return relatedObjectsCRDs.Has(e.Object.GetName())

getOperatorState intializes operatorState leaving haveIstiosResource false and only sets it to true if a Get on the istios CRD returns a nil error value, meaning the CRD is present:

func (r *reconciler) getOperatorState(ctx context.Context, ingressNamespace, canaryNamespace string) (operatorState, error) {
state := operatorState{}

if err := r.cache.Get(ctx, istiosResourceNamespacedName, &crd); err != nil {
if !errors.IsNotFound(err) {
return state, fmt.Errorf("failed to get CRD %q: %v", istiosResourceName, err)
}
} else {
state.haveIstiosResource = true
}

Then Reconcile only adds istios to relatedObjects if haveIstiosResource is true:

if state.haveIstiosResource {
related = append(related, configv1.ObjectReference{
Group: sailv1.GroupVersion.Group,
Resource: "istios",
})
}

So we should be fine.

@candita
Copy link
Contributor

candita commented Apr 9, 2025

Cluster install failure
/test e2e-aws-operator-techpreview

@Miciah
Copy link
Contributor Author

Miciah commented Apr 10, 2025

/test all
since #1214 merged.

@candita
Copy link
Contributor

candita commented Apr 11, 2025

/retest-required

@candita
Copy link
Contributor

candita commented Apr 11, 2025

E2E Test failure:
operator_test.go:254:
Expected [{Group: Resource:namespaces Namespace: Name:openshift-ingress-operator}
{Group:operator.openshift.io Resource:ingresscontrollers Namespace:openshift-ingress-operator Name:} {Group:ingress.operator.openshift.io Resource:dnsrecords Namespace:openshift-ingress-operator Name:}
{Group: Resource:namespaces Namespace: Name:openshift-ingress}
{Group:ingress.operator.openshift.io Resource:dnsrecords Namespace:openshift-ingress Name:}
{Group: Resource:namespaces Namespace: Name:openshift-ingress-canary}
{Group:gateway.networking.k8s.io Resource:gatewayclasses Namespace: Name:}],

found [{Group: Resource:namespaces Namespace: Name:openshift-ingress-operator}
{Group:operator.openshift.io Resource:ingresscontrollers Namespace:openshift-ingress-operator Name:} {Group:ingress.operator.openshift.io Resource:dnsrecords Namespace:openshift-ingress-operator Name:}
{Group: Resource:namespaces Namespace: Name:openshift-ingress}
{Group:ingress.operator.openshift.io Resource:dnsrecords Namespace:openshift-ingress Name:}
{Group: Resource:namespaces Namespace: Name:openshift-ingress-canary}
{Group:gateway.networking.k8s.io Resource:gatewayclasses Namespace: Name:}
{Group:gateway.networking.k8s.io Resource:gateways Namespace:openshift-ingress Name:}]
operator_test.go:264: Did not get expected status related objects: timed out waiting for the condition

@Miciah Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch from 0fa1281 to c7db35d Compare April 11, 2025 17:19
@Miciah
Copy link
Contributor Author

Miciah commented Apr 11, 2025

https://github.com/openshift/cluster-ingress-operator/compare/0fa1281ffd86f48464e2f09c302f47f41bc4a8d6..c7db35d125f750f799fe98bf48a850089b1b09e2 makes two changes:

  • Only add the "subscriptions" resource to relatedObjects if the "GatewayAPIController" featuregate is enabled.
  • Adjust TestClusterOperatorStatusRelatedObjects to expect "gateways" in relatedObjects if the "GatewayAPIController" featuregate is enabled.

@candita
Copy link
Contributor

candita commented Apr 11, 2025

/test e2e-aws-gatewayapi

@candita
Copy link
Contributor

candita commented Apr 11, 2025

/retest

@candita
Copy link
Contributor

candita commented Apr 15, 2025

/retest-required

expected = append(expected, configv1.ObjectReference{
Group: "gateway.networking.k8s.io",
Resource: "gateways",
Namespace: "openshift-ingress",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the namespace be blank here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly. My thinking was that we were telling people to create gateways in the "openshift-ingress" namespace, so the platform-managed ones should be there, we're allowing gateways in other namespaces as well (we just won't manage DNS for them). Based on that, I suppose it makes sense to leave the namespace blank.

})
// This test runs before TestGatewayAPI, so we do *not* expect
// to see subscriptions, istios, or gateways in relatedObjects.
if gatewayAPIControllerEnabled, err := isFeatureGateEnabled(features.FeatureGateGatewayAPIController); err != nil {
Copy link
Contributor

@candita candita Apr 15, 2025

Choose a reason for hiding this comment

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

Based on the test output, gateways is never appended to expected. Does anything enable FeatureGateGatewayAPIController before this test is run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The featuregate should be enabled in the techpreview jobs and not currently enabled in any other jobs.

@Miciah Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch 2 times, most recently from 07e8fef to 4ca2f3e Compare April 15, 2025 23:20
@Miciah
Copy link
Contributor Author

Miciah commented Apr 15, 2025

https://github.com/openshift/cluster-ingress-operator/compare/c7db35d125f750f799fe98bf48a850089b1b09e2..4ca2f3ee05bcafa57afef7ab12e18e29f934db4b makes these changes:

  • Update the status controller to add "gatewayclasses" to relatedObjects if, and only if, both the "GatewayAPI" and "GatewayAPIController" featuregates are enabled.
  • Omit the namespace for gateways in relatedObjects as Istio manages gateways in any namespace.
  • Update TestClusterOperatorStatusRelatedObjects accordingly.

@Miciah Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch from 4ca2f3e to 570e600 Compare April 15, 2025 23:49
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 24, 2025

@rhamini3: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test e2e-aws-operator
/test e2e-aws-ovn
/test e2e-aws-ovn-serial
/test e2e-aws-ovn-upgrade
/test e2e-azure-operator
/test e2e-gcp-operator
/test e2e-hypershift
/test hypershift-e2e-aks
/test images
/test unit
/test verify

The following commands are available to trigger optional jobs:

/test e2e-aws-gatewayapi
/test e2e-aws-gatewayapi-conformance
/test e2e-aws-operator-techpreview
/test e2e-aws-ovn-single-node
/test e2e-aws-ovn-techpreview
/test e2e-azure-manual-oidc
/test e2e-azure-ovn
/test e2e-gcp-ovn
/test e2e-ibmcloud-operator
/test e2e-openstack-operator
/test okd-scos-e2e-aws-ovn
/test okd-scos-images

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-gatewayapi
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-operator
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-operator-techpreview
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-ovn
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-ovn-serial
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-ovn-single-node
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-ovn-techpreview
pull-ci-openshift-cluster-ingress-operator-master-e2e-aws-ovn-upgrade
pull-ci-openshift-cluster-ingress-operator-master-e2e-azure-operator
pull-ci-openshift-cluster-ingress-operator-master-e2e-azure-ovn
pull-ci-openshift-cluster-ingress-operator-master-e2e-gcp-operator
pull-ci-openshift-cluster-ingress-operator-master-e2e-gcp-ovn
pull-ci-openshift-cluster-ingress-operator-master-e2e-hypershift
pull-ci-openshift-cluster-ingress-operator-master-hypershift-e2e-aks
pull-ci-openshift-cluster-ingress-operator-master-images
pull-ci-openshift-cluster-ingress-operator-master-okd-scos-e2e-aws-ovn
pull-ci-openshift-cluster-ingress-operator-master-unit
pull-ci-openshift-cluster-ingress-operator-master-verify

In response to this:

/test e2e-gcp-ovn-techpreview

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.

@rhamini3
Copy link
Contributor

Valid related objects test is now passing with the proposed changes in AWS Tech Preview
Marking bug as verified
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 30, 2025
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-54745, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO()`.

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Also, use the "GatewayAPIController" featuregate for the gateways and istios resources, rather than the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

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 added 3 commits May 14, 2025 14:55
Omit the namespace for the istios resource in relatedObjects as the istios
resource is cluster-scoped.

* pkg/operator/controller/status/controller.go (Reconcile): Remove the namespace
for istios.
Omit the namespace for the gateways resource in relatedObjects as Istio manages
gateways in all namespaces.

* pkg/operator/controller/status/controller.go (Reconcile): Remove the namespace
for gateways.
* pkg/operator/controller/status/controller.go (Reconcile): Pass ctx to
getOperatorState.
* pkg/operator/controller/status/controller.go (getOperatorState): Add a
parameter for ctx, and use it instead of context.TODO().
@Miciah Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch from 1c68435 to 98b6246 Compare May 14, 2025 19:21
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels May 14, 2025
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-54745, which is invalid:

  • expected the bug to target either version "4.20." or "openshift-4.20.", but it targets "4.19.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

status: Omit istios namespace in relatedObjects

Omit the namespace for the istios resource in relatedObjects as the istios resource is cluster-scoped.

status: Omit gateways namespace in relatedObjects

Omit the namespace for the gateways resource in relatedObjects as Istio manages gateways in all namespaces.

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO()`.

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Watch customresourcedefinitions in the status controller so that it updates relatedObjects as these CRDs are created.

Check the "GatewayAPIController" featuregate to determine whether to add the gatewayclasses, gateways, istios, and subscriptions resources to relatedObjects, in addition to checking the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

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 Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch from 98b6246 to f304027 Compare May 14, 2025 19:26
Check whether the gatewayclasses, gateways, and istios CRDs actually
exist before adding them to relatedObjects.

Watch customresourcedefinitions in the status controller so that it
updates relatedObjects as these CRDs are created.

Check the "GatewayAPIController" featuregate to determine whether to add
the gatewayclasses, gateways, istios, and subscriptions resources to
relatedObjects, in addition to checking the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even
if the OSSM subscription failed to install.  By convention, an operator
should only add resources to relatedObjects if those resources exist.

This commit fixes OCPBUGS-54745.

https://issues.redhat.com/browse/OCPBUGS-54745

* pkg/operator/controller/status/controller.go
(gatewaysResourceName, gatewayclassesResourceName, istiosResourceName):
New consts for the CRD names.
(relatedObjectsCRDs): New var for a string set that contains
gatewaysResourceName, gatewayclassesResourceName, and
istiosResourceName.
(New): Check the GatewayAPIControllerEnabled field in the controller
config in addition to checking GatewayAPIEnabled to determine whether to
watch subscriptions and customresourcedefinitions.  Add a watch on
customresourcedefinitions, with a predicate for CRDs with names that are
in relatedObjectsCRDs.
(Config): Add GatewayAPIControllerEnabled.
(Reconcile): Check the GatewayAPIControllerEnabled field in the
controller config as well as the haveIstiosResource,
haveGatewayclassesResource, and haveGatewaysResource fields in the
operatorState object, and conditionally add the corresponding resources
to relatedObjects.
(operatorState): Add haveIstiosResource, haveGatewaysResource, and
haveGatewayclassesResource fields.
(getOperatorState): Check GatewayAPIControllerEnabled in addition to
GatewayAPIEnabled before checking for the OSSM subscription.  Set
haveGatewaysResource, haveGatewayclassesResource, and
haveIstiosResource.
* pkg/operator/operator.go (New): Specify GatewayAPIControllerEnabled in
the status controller config.
* test/e2e/operator_test.go (TestClusterOperatorStatusRelatedObjects):
Expect to see "gateways" and "gatewayclasses" in relatedObjects if the
"GatewayAPI" and "GatewayAPIController" featuregates are enabled.
@Miciah Miciah force-pushed the OCPBUGS-54745-status-conditionally-add-CRDs-to-relatedObjects branch from f304027 to 6f42089 Compare May 14, 2025 19:28
@Miciah
Copy link
Contributor Author

Miciah commented May 14, 2025

/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 May 14, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 15, 2025

@Miciah: all tests passed!

Full PR test history. Your PR dashboard.

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.

Comment on lines +436 to +442
if err := r.cache.Get(ctx, gatewayclassesResourceNamespacedName, &crd); err != nil {
if !errors.IsNotFound(err) {
return state, fmt.Errorf("failed to get CRD %q: %v", gatewayclassesResourceName, err)
}
} else {
state.haveGatewayclassesResource = true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

GatewayClasses and Gateways can be created even if OLM capabilities are not present. Should we move them up? Out of if r.config.GatewayAPIControllerEnabled && r.config.MarketplaceEnabled && r.config.OperatorLifecycleManagerEnabled condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've gone back and forth on this matter, and I think there are reasonable arguments either way. In my most recent update, I have conditionalized adding gatewayclasses and gateways to relatedObjects with the condition r.config.GatewayAPIControllerEnabled && r.config.MarketplaceEnabled && r.config.OperatorLifecycleManagerEnabled on the grounds that we are only adding these resources to relatedObjects as part of, and in support of, the controller feature. That is, if we didn't provide our own controller and were only providing the CRDs, then we wouldn't bother gathering gatewayclasses or gateways; we only need these resources in order to diagnose issues with the gateway controller.

If the operator could specify gateways and gatewayclasses by controller name in the relatedObjects specification, I would consider doing that. As it is, the operator would need to check the controller name on each gatewayclass and then check the gatewayclass name on each gateway in order to add each individual gatewayclass or gateway that our controller managed, and I don't think that that would be appropriate or worth the effort.

Copy link
Contributor

Choose a reason for hiding this comment

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

That is, if we didn't provide our own controller and were only providing the CRDs, then we wouldn't bother gathering gatewayclasses or gateways; we only need these resources in order to diagnose issues with the gateway controller.

Ack.

@alebedev87
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alebedev87

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2025
@Miciah
Copy link
Contributor Author

Miciah commented May 29, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 29, 2025
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-54745, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.20.0) matches configured target version for branch (4.20.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

/jira refresh

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-merge-bot openshift-merge-bot bot merged commit 21ac32d into openshift:master May 29, 2025
20 checks passed
@openshift-ci-robot
Copy link
Contributor

@Miciah: Jira Issue OCPBUGS-54745: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-54745 has been moved to the MODIFIED state.

In response to this:

status: Omit istios namespace in relatedObjects

Omit the namespace for the istios resource in relatedObjects as the istios resource is cluster-scoped.

status: Omit gateways namespace in relatedObjects

Omit the namespace for the gateways resource in relatedObjects as Istio manages gateways in all namespaces.

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO()`.

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Watch customresourcedefinitions in the status controller so that it updates relatedObjects as these CRDs are created.

Check the "GatewayAPIController" featuregate to determine whether to add the gatewayclasses, gateways, istios, and subscriptions resources to relatedObjects, in addition to checking the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

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-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-cluster-ingress-operator
This PR has been included in build ose-cluster-ingress-operator-container-v4.20.0-202505290511.p0.g21ac32d.assembly.stream.el9.
All builds following this will include this PR.

@openshift-ci-robot
Copy link
Contributor

@Miciah: Jira Issue OCPBUGS-54745 is in an unrecognized state (Verified) and will not be moved to the MODIFIED state.

In response to this:

status: Omit istios namespace in relatedObjects

Omit the namespace for the istios resource in relatedObjects as the istios resource is cluster-scoped.

status: Omit gateways namespace in relatedObjects

Omit the namespace for the gateways resource in relatedObjects as Istio manages gateways in all namespaces.

getOperatorState: Add context parameter

Pass ctx from the controller's Reconcile method to getOperatorState, and use it instead of context.TODO().

status: Conditionally add CRDs to relatedObjects

Check whether the gatewayclasses, gateways, and istios CRDs actually exist before adding them to relatedObjects.

Watch customresourcedefinitions in the status controller so that it updates relatedObjects as these CRDs are created.

Check the "GatewayAPIController" featuregate to determine whether to add the gatewayclasses, gateways, istios, and subscriptions resources to relatedObjects, in addition to checking the "GatewayAPI" featuregate.

Before this change, the operator could add istios to relatedObjects even if the OSSM subscription failed to install. By convention, an operator should only add resources to relatedObjects if those resources exist.

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.

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/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants