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 operator deployment should use non-overlapping label selector #112

Closed
astefanutti opened this issue May 30, 2023 · 0 comments · Fixed by #119
Closed

The operator deployment should use non-overlapping label selector #112

astefanutti opened this issue May 30, 2023 · 0 comments · Fixed by #119
Assignees

Comments

@astefanutti
Copy link
Contributor

astefanutti commented May 30, 2023

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 Open Data Hub operator, which leads to issues where selection based on this selector returns more than expected, e.g., in the OpenShift Web console:

Screenshot 2023-05-30 at 12 33 32

This 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 in kubernetes/kubernetes#50808.

As the project is in its early phase, the simplest approach would be to document in the release note manual deletion of the previous deployment is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

1 participant