Skip to content

working example of patch deployment #187

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 2 commits into from
Feb 17, 2018
Merged

working example of patch deployment #187

merged 2 commits into from
Feb 17, 2018

Conversation

karthikkondapally
Copy link
Contributor

@karthikkondapally karthikkondapally commented Feb 15, 2018

as this library doesn't support strategic merge patch(application/strategic-merge-patch+json) yet (issue #127), following example demonstrates patching of deployment using Json Patch (application/json-patch+json). this can also be extended to patching of other k8 objects

For generating Json Patches, http://jsonpatch.com.

PatchExample does following:

  • Creates deployment hello-node with terminationGracePeriodSeconds value as 30.
  • Patches deployment hello-node with terminationGracePeriodSeconds value as 27.

@@ -0,0 +1,85 @@
/*
Copyright 2017 The Kubernetes Authors.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: 2018

@brendandburns
Copy link
Contributor

one little nit, but I'm ok to merge anyway...

@brendandburns
Copy link
Contributor

LGTM, thanks!

@brendandburns brendandburns merged commit 85a0258 into kubernetes-client:master Feb 17, 2018
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.

2 participants