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

podman generate kube -s inserts useless annotation bind-mount-options to the Service object #15208

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

dilyanpalauzov commented Aug 5, 2022

$ podman generate  kube -s
apiVersion: v1
kind: Service
metadata:
  annotations:
    bind-mount-options:/home/d/data: Z
…
---
apiVersion: v1
kind: Pod
metadata:
  annotations:
    bind-mount-options:/home/d/data: Z
…

There is no point for the bind-mount-options:/home/d/data: Z annotation on the Service object, therefore it shall not be emitted.

$ podman version
Client:       Podman Engine
Version:      4.2.0-dev
API Version:  4.2.0-dev
Go Version:   go1.18.4
Git Commit:   ccbb8e7444423306691f8ec441ed09387718d6e5
Built:        Thu Aug  4 14:05:34 2022
OS/Arch:      linux/amd64
@rhatdan
Copy link
Member

rhatdan commented Aug 7, 2022

The idea of this annotation is to tell SELinux systems using podman to relabel the content when creating the local volume. Currently only Podman kube play would pay attention to this annotation, but I don't see how this bothers K8s.

@dilyanpalauzov
Copy link
Contributor Author

podman kube generate -s includes the annotation bind-mount-options both in the Pod and in the Service yaml object. Kubernetes has no problem in seeing the annotation in the Service object.

Since there is no added value of this annotation in the Service object, podman kube generate -s shall not include it there.

@rhatdan
Copy link
Member

rhatdan commented Aug 7, 2022

Interested in opening a PR to remove it from the service object?

@dilyanpalauzov
Copy link
Contributor Author

Interested in opening a PR to remove it from the service object?

No.

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Aug 8, 2022
@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 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 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. 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.

3 participants