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

generate kube shall print spec.enableServiceLinks: false #15478

Closed
dilyanpalauzov opened this issue Aug 25, 2022 · 6 comments · Fixed by #15571
Closed

generate kube shall print spec.enableServiceLinks: false #15478

dilyanpalauzov opened this issue Aug 25, 2022 · 6 comments · Fixed by #15571
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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

@dilyanpalauzov
Copy link
Contributor

podman generate kube shall emit

spec:
  enableServiceLinks: false

To my knowledge podman does not utilize the XYZ_SERVICE_PORT any XYZ_SERVICE_PORT environment variables per service called XYZ, when running containers/pod. When the pod created by podman is moved to Kubernetes, these variables will not be needed, too. The above snippet prevents Kubernetes from creating the unused variables.

https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service

$ podman version
Client:       Podman Engine
Version:      4.3.0-dev
API Version:  4.3.0-dev
Go Version:   go1.18.5
Git Commit:   c9565b051c3843e5bad63f062f8c3125c548dd63
Built:        Thu Aug 25 10:27:07 2022
OS/Arch:      linux/amd64
@mheon mheon added kind/feature Categorizes issue or PR as related to a new feature. kube Good First Issue This issue would be a good issue for a first time contributor to undertake. labels Aug 25, 2022
@rhatdan
Copy link
Member

rhatdan commented Aug 27, 2022

@umohnani8 PTAL
Are you saying that podman generate kube should be generating

spec:
      enableServiceLinks: false

@dilyanpalauzov Interested in opening a PR?

@dilyanpalauzov
Copy link
Contributor Author

Yes, I am saying this. No, I am not going to open PR, since I do not know go and the podman internals.

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2022

Thanks for the report.

@rhatdan
Copy link
Member

rhatdan commented Aug 29, 2022

@saschagrunert @haircommander Do you agree with @dilyanpalauzov assessment?

@haircommander
Copy link
Collaborator

yes this seems correct. Another future thing is the service created for the pod could populate those env variables, though that'd be more work than this approach

@saschagrunert
Copy link
Member

Yep, since it defaults to true it should be probably turned off via the pod spec.

@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 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. 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.

6 participants