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

Use uniquely identifying labels selector for the operator deployment #119

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

astefanutti
Copy link
Contributor

@astefanutti astefanutti commented Jun 1, 2023

This PR changes the operator deployment to use a uniquely identifying labels selector.

In order to work-around the immutability of the labels selector field, the deployment has been renamed according to OLM recommendation: operator-framework/operator-lifecycle-manager#952 (comment).

This PR also leverages Kustomise commonLabels config, to apply Kubernetes recommended labels to all resources.

Fixes #112.

@astefanutti astefanutti changed the title Pr 03 Use uniquely identifying labels selector for the operator deployment Jun 1, 2023
@astefanutti
Copy link
Contributor Author

/assign @anishasthana @Maxusmusti

@astefanutti
Copy link
Contributor Author

I've tested the change, by building an updated OLM catalog image, containing a newer version (0.0.3-dev) of the operator OLM bundle with the fix, replacing the latest bundle (0.0.3) in the default channel, which has triggered an automated upgrade:

Screenshot 2023-06-07 at 18 43 09

I confirm renaming the operator deployment makes OLM performing a delete / create operation, instead of an update, which effectively by-passes the immutability of the deployment labels selector.

Before (version 0.0.3):

Screenshot 2023-05-30 at 12 33 32

After (version 0.0.3-dev):

Screenshot 2023-06-07 at 18 35 50

This also fixes the monitoring service pods selection:

Screenshot 2023-06-07 at 18 36 48

Copy link
Member

@anishasthana anishasthana 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 @astefanutti

@openshift-ci
Copy link

openshift-ci bot commented Jun 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anishasthana

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 label Jun 7, 2023
@openshift-merge-robot openshift-merge-robot merged commit a71303b into project-codeflare:main Jun 7, 2023
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.

The operator deployment should use non-overlapping label selector
5 participants