This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Adding support for DaemonSets, StatefulSets#19
Open
lcnuance wants to merge 5 commits intofabric8io:masterfrom
Open
Adding support for DaemonSets, StatefulSets#19lcnuance wants to merge 5 commits intofabric8io:masterfrom
lcnuance wants to merge 5 commits intofabric8io:masterfrom
Conversation
bgagnon
reviewed
Mar 28, 2018
| glog.Infof("About to run patch: %s %s with %s", objectKind, objectId, yamlPatch) | ||
| attemptDelay := 30 | ||
| for attempt := 1; attempt < 3; attempt++ { | ||
| err := exec.Command("/kubectl", "patch", objectKind, objectId, "--patch", yamlPatch).Run() |
There was a problem hiding this comment.
Is running kubectl in a subprocess the only way? Doesn't the Go client support patching operations?
Author
There was a problem hiding this comment.
Not the only way. The client doesn't do patches well (Update replaces the content, not only patches and this yields to raise conditions). I didn't find any way through the client but any ideas welcome. The only other way I thought about was to use the rest api directly (http requests to the rest api). We could do that too and change the implementation of that function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proof of concept adding support for DaemonSets, StatefulSets. It also uses patch instead of Update, hence reducing problems introduced by different api versions trying to change the contents of the resource.