-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
introduce --replace flag for play kube #11671
Conversation
This is not a docs only change. You need to add tests. Just make sure the second run does not fail, would be simplest, with containers being different. |
24c23cb
to
071d007
Compare
is their an objection to using |
/approve Change itself looks fine to me. If there's a serious desire for a one-command solution to deploy, I see no reason not to include it. |
071d007
to
281c7f3
Compare
@@ -150,6 +155,11 @@ func kube(cmd *cobra.Command, args []string) error { | |||
if kubeOptions.Down { | |||
return teardown(yamlfile) | |||
} | |||
if kubeOptions.Replace { | |||
if err := teardown(yamlfile); err != nil && !errorhandling.Contains(err, define.ErrNoSuchPod) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the delete pod API of podman remote service returns untyped errors, so use string compare here.
The
I think this is a common use case when play with Kubernetes YAML file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chenzhiwei, Luap99, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
6d43e20
to
8925547
Compare
LGTM but tests are unhappy |
With this flag, users can easily sync up the yaml content with the existing pods. Fixes containers#11481 Signed-off-by: Chen Zhiwei <zhiweik@gmail.com>
8925547
to
6fc73ea
Compare
/retest |
@chenzhiwei: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
/ok-to-test |
CI is green. |
/lgtm |
[NO TESTS NEEDED] With this flag, users can easily sync up
the yaml content with the existing pods.
Fixes #11481