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

suggest a --replace flag for play kube #11481

Closed
chenzhiwei opened this issue Sep 8, 2021 · 9 comments · Fixed by #11671
Closed

suggest a --replace flag for play kube #11481

chenzhiwei opened this issue Sep 8, 2021 · 9 comments · Fixed by #11671
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@chenzhiwei
Copy link
Contributor

/kind feature

Description

  • podman kube create -f k8s-manifests.yaml
  • podman kube apply -f k8s-manifests.yaml
  • podman kube delete -f k8s-manifests.yaml
@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 8, 2021
@rhatdan
Copy link
Member

rhatdan commented Sep 8, 2021

Please further explain or open PRs to examine.
@haircommander @mrunalp WDYT?

@haircommander
Copy link
Collaborator

haircommander commented Sep 8, 2021

the create and apply commands are done with podman play kube, and delete was just recently added with podman play kube --down

are you just looking for an alias between the two sets of commands?

@chenzhiwei
Copy link
Contributor Author

@haircommander something similar.

  • create just creates the manifests, return error if already exist
  • apply pulls the images in the manifests, if new images or containers detected, apply the new images to the manifests
  • delete means deleting the manifests

@haircommander
Copy link
Collaborator

Ah so you'd like podman behaving like api server/etcd, rather than kubelet/runtime which is closer to how it's behaving now. What use case are you looking to fill? I can't think of a use of keeping track of the underlying manifest if the pod/containers is what podman typically thinks about

@chenzhiwei
Copy link
Contributor Author

one of the container use latest tag image, can podman now support update the image to the real latest one?

@flouthoc
Copy link
Collaborator

flouthoc commented Sep 9, 2021

@chenzhiwei I dont think that even k8s supports that, you can have a image pull policy as always on deployment and k8s will only update image if pod is restarted. You can have similar pull policy on podman pods but afaik they need to be restarted as well.

@chenzhiwei
Copy link
Contributor Author

@flouthoc Thank you.

What about introducing a new flag --replace to play kube?

I think my core requirement is apply the new changes from both my manifest file and the images inside it.

If the pod already exists, delete and re-create it, this can trigger the image refresh if the pull policy is always or image tag is latest. If no pod found, create one.

@rhatdan
Copy link
Member

rhatdan commented Sep 9, 2021

That makes some sense to me. @baude @mheon WDYT?

@mheon
Copy link
Member

mheon commented Sep 9, 2021

A --replace flag SGTM

@chenzhiwei chenzhiwei changed the title suggest new command with k8s manifests suggest a --replace flag for play kube Sep 21, 2021
chenzhiwei added a commit to chenzhiwei/podman that referenced this issue Oct 8, 2021
With this flag, users can easily sync up the yaml content with the existing pods.

Fixes containers#11481

Signed-off-by: Chen Zhiwei <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants