Skip to content
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

use kubectl replace --force for one-off pods #1099

Closed
balopat opened this issue Oct 4, 2018 · 2 comments
Closed

use kubectl replace --force for one-off pods #1099

balopat opened this issue Oct 4, 2018 · 2 comments

Comments

@balopat
Copy link
Contributor

balopat commented Oct 4, 2018

when a "one-off" (short lived) pod is defined with RestartPolicy: Never, the following happens with skaffold dev:

1.) image is built
2.) kubectl apply succeeds - pod is deployed, pod completes
3.) code change triggers loop
4.) image is built
5.) kubectl apply succeeds - pod does not restart, skaffold just says "Waiting for changes...", there are no logs, and the pod will still have the old version of the image

Proposed behavior:

1...4.. same
5.) kubectl apply succeeds, skaffold recognizes that pod's image is not the same tag as the latest build - prints warning, and runs a kubectl replace --force instead. Pod gets deleted and redeployed, skaffold streams new logs.

Open question(s):

  • should this be only for skaffold dev or skaffold run as well?

cc #891
cc #940
cc @coollog

@coollog
Copy link
Contributor

coollog commented Oct 4, 2018

I think it makes sense for skaffold run as well since a successful skaffold deployment should probably give the promise of the intended running pod(s) using the image built during the build stage.

@balopat
Copy link
Contributor Author

balopat commented Aug 20, 2019

With the --force flag this is covered I believe.

@balopat balopat closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants