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

[Feature request] Support modification of pre-existing resources from CompositeController #539

Open
gavin-nia opened this issue May 28, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@gavin-nia
Copy link

I'm not sure exactly how to express this feature request, but I have a use case like the following:

  1. We have an existing deployment that is created by some other system.
  2. We'd like to modify some parts of the spec of that existing deployment from our CompositeController.

This is conceptually similar to things like HorizontalPodAutoscaler which can modify "spec.replicas" of deployments, but doesn't take ownership of those resources.

I've used CompositeController to partially achieve what I want (created a new CRD and parent resource, and made the existing deployment a child of the parent via label selectors). The problem with this approach is that when I delete the parent, it will also delete the child which is not what I want to happen (would be quite a big problem if someone does this by accident).

Happy to hear if you've got any ideas on this. I know we can specify "orphan" mode when deleting the resource, but it is tricky to remember about that (and we would ideally like to have a mix of owned and non-owned child objects).

@grzesuav grzesuav added the enhancement New feature or request label Jun 14, 2022
@grzesuav
Copy link
Contributor

It is reasonable thing to request.

@rolandkool
Copy link

What about using the Open Policy Agent to modify the deployment before it gets submitted to the Kubernetes API?

@grzesuav
Copy link
Contributor

@rolandkool I think @gavin-nia want to updates those fields based on some logic in its own controller.

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

No branches or pull requests

3 participants