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

Support DaemonSet with podman kube play #18899

Closed
fwiesel opened this issue Jun 15, 2023 · 9 comments · Fixed by #19371
Closed

Support DaemonSet with podman kube play #18899

fwiesel opened this issue Jun 15, 2023 · 9 comments · Fixed by #19371
Labels
kind/feature Categorizes issue or PR as related to a new feature. kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@fwiesel
Copy link
Contributor

fwiesel commented Jun 15, 2023

Feature request description

The current command supports Pods and Deployments in the yaml file, it would be great, if it also supports a DaemonSet.

Suggest potential solution

If I provide a yaml containing a DaemonSet, instead of a Deployment it should generate the corresponding pod for it.

Have you considered any alternatives?

Currently, I simply replace the DaemonSet in the yaml with Deployment and that works.
Only it would improve the interoperability of the podman itself, if it would be done "properly".

Additional context

The field .spec.template of a DaemonSet is a PodTemplateSpec. The same as a Deployment.

Presumably, there is a large overlap in the functionality, so I hope it would be a rather low hanging fruit.

@fwiesel fwiesel added the kind/feature Categorizes issue or PR as related to a new feature. label Jun 15, 2023
@Luap99 Luap99 added the kube label Jun 15, 2023
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@danishprakash
Copy link
Contributor

If I provide a yaml containing a DaemonSet, instead of a Deployment it should generate the corresponding pod for it.

Are you suggesting it to be functionally equivalent to Deployments?

@fwiesel
Copy link
Contributor Author

fwiesel commented Jul 17, 2023

Yes, both Deployments as well as DaemonSets are having a PodTemplateSpec as .spec.template . I can already use podman to create pods from a daemonset yaml, I just have to textually replace the DaemonSet with Deployment.

@rhatdan
Copy link
Member

rhatdan commented Jul 22, 2023

@ygalblum @umohnani8 WDYT?
@fwiesel @danishprakash is this something you are interested in working on?

@ygalblum
Copy link
Contributor

@rhatdan Makes sense and from the looks of it, sounds simple to implement (Same path as for Deployment)

@danishprakash
Copy link
Contributor

Sure, I can take this up. The idea is to simply allow using DaemonSet in the Pod template but then follow through as if the user has created a Deployment, is that right?

@ygalblum
Copy link
Contributor

Seems so, yes

@danishprakash
Copy link
Contributor

danishprakash commented Jul 26, 2023

Just so that we're on the same page, when you say use the same path as for Deployment, do you really mean

case "Deployment", "DaemonSet":

which seems a tad bit misleading because we're missing out on handling certain non-overlapping attributes such as numReplicas and potentially others in the future.

I'm going in this direction for now - https://github.com/containers/podman/compare/main...danishprakash:podman:daemonset-support?expand=1 which looks like too much redundant work at first glance but looks more comprehensible for someone glancing over the source.

@ygalblum
Copy link
Contributor

Yes, you're right, that's what I meant. You can't really join the cases because of the objects passed.

About the TODO you have in the code, not sure what you mean. DS don't have numReplicas (https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#daemonsetspec-v1-apps) because the idea is that K8S will run a replica on each worker node

@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 Nov 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 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. kube 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