Create kubectl rollout restart deployment/$deployment to do a rolling restart

This commit is contained in:
Antoine Pelisse
2019-04-02 17:02:28 -07:00
parent b274fb3570
commit 1bf99e2e4e
7 changed files with 282 additions and 1 deletions

View File

@@ -106,3 +106,10 @@ type RollbackerFunc func(restClientGetter genericclioptions.RESTClientGetter, ma
// RollbackerFn gives a way to easily override the function for unit testing if needed
var RollbackerFn RollbackerFunc = rollbacker
// ObjectRestarterFunc is a function type that updates an annotation in a deployment to restart it..
type ObjectRestarterFunc func(runtime.Object) ([]byte, error)
// ObjectRestarterFn gives a way to easily override the function for unit testing if needed.
// Returns the patched object in bytes and any error that occurred during the encoding.
var ObjectRestarterFn ObjectRestarterFunc = defaultObjectRestarter