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

Adopt ASO-specific label to replace default control-plane: controller-manager #4465

Closed
wants to merge 1 commit into from

Conversation

bingikarthik
Copy link
Contributor

@bingikarthik bingikarthik commented Nov 22, 2024

What this PR does

Closes #4277

Current Behavior:
The kubebuilder default label control-plane: controller-manager is currently used. This label is common across many projects, which can lead to potential conflicts, especially when multiple deployments or webhooks exist in the same namespace. Such conflicts may cause misrouting of resources and selectors, impacting functionality.

Improvement:
This PR introduces a unique label specific to ASO, ensuring better namespace coexistence and reducing the risk of conflicts with other deployments. By aligning with best practices, this change improves ASO's compatibility and coexistence within shared Kubernetes environments.

Impact:

  • Avoids label conflicts with other projects.
  • Supports installation alongside other controllers in the same namespace.
  • Enhances stability and maintainability of deployments using ASO.

This update addresses potential selector misconfigurations and promotes more robust operations in multi-controller setups.

How does this PR make you feel?

gif

Checklist

  • this PR contains documentation
  • this PR contains tests
  • this PR contains YAML Samples

@matthchr
Copy link
Member

We are interested in doing something like this, but as called out in the linked issue #4277, just making this doesn't work I don't think because it can't be changed on existing deployments. I think we'll need something more involved, though I also need to check if changing the deployment mode to Recreate makes this any easier.

@bingikarthik
Copy link
Contributor Author

Yes, agree this won't apply on existing deployments! To apply probably deployment strategy to have: Recreate(i.e., need to rollout following PR: #4466)

@matthchr
Copy link
Member

matthchr commented Nov 26, 2024

I tested with strategy Recreate and it still doesn't work. The only way is to delete and recreate the deployment. See discussion on #4277.

I would like to do this, but we'll need to be careful about it, and I think the change is more involved than what you have done because the change as-proposed won't allow for Helm chart upgrades.

This means that (for now) we can't take this change as-is.

Can you expand more on where you ran into this issue? Even though I'd like to see this get fixed, in practice it shouldn't cause much issue if you install ASO into its own namespace (which is recommended anyway). Can you expand more on what you had it collide with? Was the issue ASOv1?

@bingikarthik
Copy link
Contributor Author

in practice it shouldn't cause much issue if you install ASO into its own namespace (which is recommended anyway)

Agreed on this point! We're already following a similar approach. This is more of a nice-to-have feature than a must-have. In case someone deploys a controller with control-plane: controller-manager labels in the same namespace where ASO is running, it could lead to a conflict. We can address this issue in the future. Closing the PR for now.

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 this pull request may close these issues.

Use a more specific selector than control-plane: controller-manager
2 participants