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

Make it possible to use --infra-name name feature in kube yaml #18312

Closed
Sani7 opened this issue Apr 23, 2023 · 12 comments · Fixed by #19568
Closed

Make it possible to use --infra-name name feature in kube yaml #18312

Sani7 opened this issue Apr 23, 2023 · 12 comments · Fixed by #19568
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

@Sani7
Copy link

Sani7 commented Apr 23, 2023

Feature request description

Currently, there is no real way to use the --infra-name feature in the Kubernetes yaml.
It would be nice to have this for the same reason as initial the feature.
This was being able to update the pod and not having to change the infra name in the systemd service.
#10794

@Sani7 Sani7 added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 23, 2023
@rhatdan
Copy link
Member

rhatdan commented Apr 24, 2023

The best way to handle this would be Add an annotation to the kubernetes.yaml and then have podman use that annotation to setup the infra container name.

@rhatdan
Copy link
Member

rhatdan commented Apr 24, 2023

Theoretically we could also do
podman kube play --infra-name foobar ...

As well.

@Sani7
Copy link
Author

Sani7 commented Apr 24, 2023

Maybe it would be more convenient if the default infra name should be podName-infra unless specified otherwise in the kube.yaml or --infra-name

@rhatdan
Copy link
Member

rhatdan commented Apr 24, 2023

That works for me. Interested in opening a PR?

@Sani7
Copy link
Author

Sani7 commented Apr 24, 2023

Sorry I'm not a go programmer ...

@rhatdan
Copy link
Member

rhatdan commented Apr 24, 2023

@umohnani8 PTAL

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Jul 28, 2023

@ygalblum @umohnani8 @haircommander WDYT?

@umohnani8
Copy link
Member

Currently the infra name is podID-infra, changing the default to be podName-infra could be a breaking change I believe.
Adding a new --infra-name flag to podman kube play sounds good to me, we can use that when it is set as the name for the infra container and default to the current podID-infra name when it is not set.

For the kube generate part, we could add an annotation with the infra-name when --infra-name is set during pod creation. The annotation can be used during kube play if set in the yaml.

For kube play, order would be:

  1. if --infra-name is set use that
  2. otherwise check for annotation, if set use that
  3. finally if neither of the 2 are set use the default podID-infra name

@rhatdan @vrothberg WDYT?

@rhatdan
Copy link
Member

rhatdan commented Aug 1, 2023

I am not sure it is a breaking change, but SGTM

@vrothberg
Copy link
Member

I am not sure it is a breaking change, but SGTM

Podman CI would break. I'd be surprised if users would heavily rely on the deterministic name but we can only guess.

Adding a --infra-name SGTM

@ygalblum
Copy link
Contributor

ygalblum commented Aug 8, 2023

For kube play, order would be:

  1. if --infra-name is set use that
  2. otherwise check for annotation, if set use that
  3. finally if neither of the 2 are set use the default podID-infra name

SGTM

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