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

Only update namespaces when OperatorGroup labels need to change. #2809

Conversation

benluddy
Copy link
Contributor

@benluddy benluddy commented Jul 1, 2022

Even when the update request is a semantic no-op, it generates a
little apiserver and etcd load. Also, other controllers are watching
namespaces and will perform redundant work in response to the
generated watch event and resourceVersion bump.

@openshift-ci
Copy link

openshift-ci bot commented Jul 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy

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 Jul 1, 2022
return nil
}

namespace = namespace.DeepCopy()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should also fix informer cache corruption.

Even when the update request is a semantic no-op, it generates a
little apiserver and etcd load. Also, other controllers are watching
namespaces and will perform redundant work in response to the
generated watch event and resourceVersion bump.

Signed-off-by: Ben Luddy <bluddy@redhat.com>
@benluddy benluddy force-pushed the skip-redundant-namespace-updates branch from 2d1f5da to 97a48fc Compare July 1, 2022 15:42
@benluddy
Copy link
Contributor Author

benluddy commented Jul 6, 2022

/assign @awgreene

Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks @benluddy!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2022
@openshift-ci openshift-ci bot merged commit d3bfaf2 into operator-framework:master Jul 6, 2022
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants