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

feat: Use server-side apply to create and patch owned resources #2039

Merged
merged 3 commits into from
Feb 18, 2021
Merged

feat: Use server-side apply to create and patch owned resources #2039

merged 3 commits into from
Feb 18, 2021

Conversation

astefanutti
Copy link
Member

@astefanutti astefanutti commented Feb 15, 2021

Server-side apply has been introduced to improve co-operation of controllers, in defining the desire state for shared resources.

We previously implemented a custom strategy, relying on a combination of merge patch and pruning of nil values, but that fails to leverage the semantic provided by the strategic merge patch field markers, as strategic merge patch is not supported by CRDs, like Knative Service.

With server-side apply, markers can be applied to data structures (Lists, Maps), to make valid and finer-grained merge strategies.

This particularly helps cooperation of the Camel K operator with its Knative counterpart, into updating the Knative service pod template fields, such as the Env []EnvVar field, that declares the +patchStrategy=merge marker, which translates into the server-side apply listType and +listMapKey markers.

Release Note

feat: Use server-side apply to create and patch owned resources

@astefanutti astefanutti changed the title feat: Use server-side apply to patch owned resources feat: Use server-side apply to create and patch owned resources Feb 16, 2021
Server-side apply has been introduced to improve co-operation
of controllers in defining the desire state for shared resources.

We implemented a custom strategy relying on a combination of merge
patch and pruning of nil values, but that fails to leverage the
semantic provided by the strategic merge patch field markers,
as strategic merge patch is not supported by CRDs, like Knative
Service.

With server-side apply, markers can be applied to data
structures (Lists, Maps), to make valid and finer-grained merge
strategies.

This particularly helps cooperation of the Camel K operator with
its Knative counterpart, into updating the Knative service pod
template fields concurrently, such as the `Env []EnvVar` field,
that declares the `+patchStrategy=merge` marker, which translates
into the server-side apply `listType` and `+listMapKey` markers.
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

Successfully merging this pull request may close these issues.

None yet

1 participant