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

Merge CRD objects into each other #1107

Closed
TrayserCassa opened this issue Dec 20, 2024 · 4 comments
Closed

Merge CRD objects into each other #1107

TrayserCassa opened this issue Dec 20, 2024 · 4 comments

Comments

@TrayserCassa
Copy link

TrayserCassa commented Dec 20, 2024

Hi,

I’m currently working on reusing a struct that defines a container configuration for both jobs and deployments. Since these configurations can have different values (e.g., the image field), I structured it like this:

Container                                        ContainerSpec `json:"container"`
AdminDeploymentContainer      ContainerSpec `json:"adminDeploymentContainer"`
MigrationJobContainer                ContainerSpec `json:"migrationJobContainer"`

The goal is as follows:

If Container specifies image:abc and AdminDeploymentContainer specifies image: xyz, the admin deployment should run with xyz, while everything else uses abc.

I was considering adding a Merge function to handle these cases, in addition to the existing DeepCopyInto function.
Does this approach make sense, or is there an existing PR or issue I might have overlooked?

@TrayserCassa TrayserCassa changed the title Merg e CRD objects into each other Merge CRD objects into each other Dec 20, 2024
@sbueringer
Copy link
Member

sbueringer commented Dec 27, 2024

I'm not aware of anything in controller-tools that would help here

@camilamacedo86
Copy link
Member

IHMO it should be closed as won't to do

@sbueringer
Copy link
Member

sbueringer commented Dec 27, 2024

Agree. I think there is nothing we can/should implement in controller-tools
/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closing this issue.

In response to this:

Agree. I think there is nothing we can do in CT
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

No branches or pull requests

4 participants