-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add example about using server-side apply with this client #1093
Comments
Server-side apply has been beta since 1.15, we should add example/utility about how to use it with the 11.0 client. |
Hey @tdmalone & @roycaihw! |
@MoShitrit Welcome and thanks for looking into this issue! Yes I think the goal is to add an apply mode to the utility methods, either adding an To begin with, I think we can first add an example about how to use this API in the python client. According to the doc, a client requests a server-side apply by sending an API request to any PATCH endpoint with content type Did a little research and I think there are currently two blockers for using this API in the python client:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Hey there, |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
/reopen |
@themrmax: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
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/test-infra repository. |
@MoShitrit how did you go with this? i would very much like this feature |
Hey @themrmax /reopen |
@MoShitrit: Reopened this issue. In response to this:
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/test-infra repository. |
I believe this PR from 2019 would enable the use of server side apply? #959. It enables you to set the content type, and AIUI that means you can do |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
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/test-infra repository. |
Any idea if this is feature is still in plan ? |
It'd be great to know if this feature was available without subclassing the client. Are there any existing examples of using server-side apply from the Python client? |
I am still adding a subclass to every project, unfortunately. |
Anyone who lands here... there's an example within the tests: python/kubernetes/base/dynamic/test_client.py Lines 512 to 532 in 56eea10
|
2 years since Server-Side apply was introduced in Kubernetes 1.22. Would be great to get to use it fully in this kubernetes python client soon. |
What is the feature and why do you need it:
I would like to have an 'apply' (patch) mode for the helpful
create_from_yaml
/create_from_dict
utility methods.I currently use this to automate deployment of our application, however from time-to-time something goes wrong in the deployment and we need to deploy it again. At the moment we can't re-run the automation, because parts of it fail due to some objects having already been created.
I'm looking at catching the
FailToCreateError
and checking forreason: "AlreadyExists"
, but at this point it would be wonderful to be able to runcreate_from_yaml
in an 'apply'/patch mode, rather than have to build out the full request myself.Describe the solution you'd like to see:
Probably something as simple as an
apply=True
orpatch=True
argument on these methods could do the job?The text was updated successfully, but these errors were encountered: