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

Add support for the userns annotation in kube play #20885

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

IceWreck
Copy link
Contributor

@IceWreck IceWreck commented Dec 2, 2023

Does this PR introduce a user-facing change?

Add support for the userns annotation in kube play 

To set userns of a pod, use the **io.podman.annotations.userns** annotation in the pod/deployment definition. This can be overridden with the `--userns` flag.

Fixes #20658

[NO NEW TESTS NEEDED]

Signed-off-by: Anchit Bajaj <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2023

LGTM
/approve
Thanks @IceWreck

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2023
options.Userns = v
} else {
options.Userns = "host"
}
if podYAML.Spec.HostUsers != nil && !*podYAML.Spec.HostUsers {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this line still takes precedence over the annotation. Is this the intended behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say so.

In case of conflicts k8s yaml field which is explicitly specified (even if its experimental) > annotation.

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

openshift-ci bot commented Dec 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, IceWreck, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ygalblum
Copy link
Contributor

ygalblum commented Dec 5, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 100089f into containers:main Dec 5, 2023
93 checks passed
@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 Mar 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

userns=keep-id as an annotation in play kube
4 participants