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

The ODH operator deployment should use non-overlapping label selector #230

Closed
astefanutti opened this issue May 30, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working rhods-2.6

Comments

@astefanutti
Copy link

astefanutti commented May 30, 2023

Describe the bug

The operator deployment is configured with the default label selector, as generated by the kubebuilder scaffolding, i.e.:

spec:
  selector:
    matchLabels:
      control-plane: controller-manager

This selector can intersect with other deployments, for instance the CodeFlare operator, which leads to issues where selection based on this selector returns more than expected.

To Reproduce

Steps to reproduce the behavior:

  1. Install the Open Data Hub operator
  2. Install the CodeFlare operator
  3. Go to the Open Data Hub operator deployment details page > Pods tab

Expected behavior

Pods other than that of the ODH operator are listed.

Screenshots

Screenshot 2023-05-30 at 16 06 51

Additional context

This also affect the metrics service pod selections:

Screenshot 2023-06-08 at 12 09 04

The selector should be changed, so it's disjunct from any other deployments, ideally following Kubernetes recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

The main challenge is that deployment label selector is immutable once created, which will break the rollout deployment performed during the next OLM upgrade: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates. With some more background available at kubernetes/kubernetes#50808.

A possible work-around is to renamed the operator deployment, according to OLM recommendation: operator-framework/operator-lifecycle-manager#952 (comment).

@astefanutti astefanutti added the bug Something isn't working label May 30, 2023
@ajaypratap003 ajaypratap003 self-assigned this Nov 8, 2023
@zdtsw
Copy link
Member

zdtsw commented Nov 9, 2023

@astefanutti is this still a valid issue?

@astefanutti
Copy link
Author

@zdtsw I think so yes. The operator still uses the default control-plane: controller-manager label selector.

@zdtsw
Copy link
Member

zdtsw commented Nov 9, 2023

@zdtsw I think so yes. The operator still uses the default control-plane: controller-manager label selector.

thanks! got confused when checking the description of "how to reproduce".

@astefanutti
Copy link
Author

thanks! got confused when checking the description of "how to reproduce".

Ah yes, the description is out-dated now with v2, and we fixed it on the CodeFlare operator side, still it'd be valuable the ODH operator fixes it, as chances are the default label selector can intersect with other deployments / pods.

@AjayJagan
Copy link
Contributor

here is the JIRA counterpart for the same issue : https://issues.redhat.com/browse/RHOAIENG-405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rhods-2.6
Projects
Status: Done
Status: No status
Status: Done
Development

No branches or pull requests

5 participants