Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index named input for NAD, unify across Watches and return nil error in case NAD not found to use RequeueAfter #600

Closed
wants to merge 2 commits into from

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Aug 6, 2024

  • Adds to watch NADs so that the controller reconciles when the configured NAD changes on the GlanceAPI.
  • Also unifies the Watches across the named input parameters.
  • Currently the reconciler returned both a non-zero result and a non-nil error.
    The result will always be ignored if the error is non-nil and the non-nil error causes reqeueuing with exponential backoff.
    In case of NotFound return nil that the ReqeueAfter is used. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler
2024-08-05T15:55:35Z    INFO    Warning: Reconciler returned both a non-zero result and a non-nil error. The result will always be ignored if the error is non-nil and the non-nil error causes reqeueuing with exponential backoff. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler   {"controller": "glance", "controllerGroup": "glance.openstack.org", "controllerKind": "Glance", "Glance": {"name":"glance","namespace":"openstack"}, "namespace": "openstack", "name": "glance", "reconcileID": "d615ee4e-7b07-44d3-a9e8-160540927609"}

Adds to watch NADs so that the controller reconciles when the
configured NAD changes on the GlanceAPI.

Also unifies the Watches across the named input parameters.

Signed-off-by: Martin Schuppert <[email protected]>
@openshift-ci openshift-ci bot requested review from fmount and viroel August 6, 2024 06:05
@openshift-ci openshift-ci bot added the approved label Aug 6, 2024
Copy link
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

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

Just a minor comment on the usage of the existing const to return RequeueAfter but in general I'm +1 to this change.
@stuggi I can approve and follow up on that part, let me know your thoughts around that.

controllers/glance_common.go Show resolved Hide resolved
controllers/glance_common.go Outdated Show resolved Hide resolved
Currently the reconciler returned both a non-zero result and a
non-nil error.
The result will always be ignored if the error is non-nil and the
non-nil error causes reqeueuing with exponential backoff.

In case of NotFound return nil that the ReqeueAfter is used.

For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler

Signed-off-by: Martin Schuppert <[email protected]>
Copy link
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Aug 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, stuggi

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

@stuggi
Copy link
Contributor Author

stuggi commented Aug 6, 2024

NAD annotations won't change on NAD details. so it does not make sense right now to watch them. closing in favor of #601

@stuggi stuggi closed this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants