Skip to content

H4HIP: Server Side Apply support #312

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

Merged
merged 3 commits into from
Apr 25, 2025

Conversation

gjenkins8
Copy link
Member

@gjenkins8 gjenkins8 commented Aug 10, 2023

HIP for Helm to support SSA (chart object/resources)

@gjenkins8 gjenkins8 force-pushed the server_side_apply_hip branch from 95e4e59 to 3c11723 Compare August 10, 2023 05:00
@gjenkins8 gjenkins8 changed the title HIP: Server side apply support HIP: Server Side Apply support Aug 10, 2023
@morremeyer
Copy link

@gjenkins8 I think this HIP as written would apply to the release secret itself, too. Am I correct with this understanding?

We're running into the issue that the release secret is > 1MB in https://github.com/community-tooling/charts because of the kubectl.kubernetes.io/last-applied-configuration containing the whole config again. Using SSA, that would/could be avoided as far as I'm aware.

hips/hip-00XX.md Outdated
Allowing Helm to update objects which have been modified by other processes.
Kubernetes now offers a similar server-side process that has several advantages over the client-side apply (CSA) methods that Helm and `kubectl` (for example) have traditionally utilized.

## Motivation
Copy link
Member Author

@gjenkins8 gjenkins8 Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps also include that client-side validation is now largely unsupported (need to read up on the details):

kubernetes/kubectl#1625

hips/hip-00XX.md Outdated

- `--dry-run=client` won't work with SSA enabled
- If the user attempts to use SSA with a cluster which does not support it (unlikely: SSA [went GA](https://kubernetes.io/blog/2021/08/06/server-side-apply-ga/) in Kubernetes v1.22), Helm should error
- Client-side API object validation isn't applicable when SSA enabled (`helm install|upgrade --disable-openapi-validation`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we still do this using the SSA with a dry-run?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just means dry run won't be able to accurately show the results of server side apply without connecting to the server. This is already often true with the current merge strategy, but it's especially true of server side apply strategy. We could do this though with --dry-run=server.

From the docs:

--dry-run string[="client"] simulate an install. If --dry-run is set with no option being specified or as '--dry-run=client', it will not attempt cluster connections. Setting '--dry-run=server' allows attempting cluster connections.

Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any modern Kubernetes tool should use SSA. Great work. Just added a few suggestions.

Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. LGTM 👍

Copy link

@joejulian joejulian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@gjenkins8 gjenkins8 force-pushed the server_side_apply_hip branch from aa9a1e8 to 0043acc Compare April 25, 2025 19:51
Signed-off-by: George Jenkins <[email protected]>
@gjenkins8 gjenkins8 force-pushed the server_side_apply_hip branch from 0043acc to 3a5705a Compare April 25, 2025 19:52
Signed-off-by: George Jenkins <[email protected]>
Signed-off-by: George Jenkins <[email protected]>
@scottrigby scottrigby merged commit dd5fe78 into helm:main Apr 25, 2025
1 check passed
@gjenkins8 gjenkins8 deleted the server_side_apply_hip branch April 26, 2025 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants