Skip to content

Conversation

tchap
Copy link
Contributor

@tchap tchap commented Oct 7, 2025

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 7, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 7, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

This is not a big deal, but we should use use namespaces for as many pods as possible.

Tests run via openshift/cluster-kube-controller-manager-operator#887

Checked manually that the guard pods are using user namespace.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from tkashem October 7, 2025 16:45
@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 9, 2025
@p0lyn0mial
Copy link
Contributor

since the guard pod is used by more than one static pod, maybe we should create proof PRs for all of them?

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 9, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

The current configuration is equivalent to restricted-v3 scc.
The scc annotation can only be set on a workload, though, not on a
static pod, but we can still apply relevant settings manually.

This is not a big deal, but we should use use namespaces for as many pods as possible.

Tests run via openshift/cluster-kube-controller-manager-operator#887

Checked manually that the guard pods are using user namespace.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@tchap
Copy link
Contributor Author

tchap commented Oct 9, 2025

/hold

until we create and test proof PRs for all affected components.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 9, 2025
@p0lyn0mial
Copy link
Contributor

The current configuration is equivalent to restricted-v3 scc.
The scc annotation can only be set on a workload, though, not on a
static pod, but we can still apply relevant settings manually

I think that the guard pods are normal pods not static pods.

@p0lyn0mial
Copy link
Contributor

The current configuration is equivalent to restricted-v3 scc.

do we need to set scc to use hostUsers: false?

@haircommander
Copy link
Member

do we need to set scc to use hostUsers: false?

nope, everyone has access to it

@haircommander
Copy link
Member

I think all of the security knobs you've set here are good, but it may be tricky to debug problems if you do them all at once. The kernel isn't very informative why things fail when they do. If the tests pass in all of the components that inherit this, that's fine, but I would recommend starting with hostUsers: false and adding seccomp+dropped caps pieces after.

@p0lyn0mial
Copy link
Contributor

@haircommander thank you for your input.

@haircommander what is your recommendation for setting the scc? Would it be better to set the openshift.io/required-scc: restricted-v3 annotation and rely on the admission to apply the details?

@haircommander
Copy link
Member

haircommander commented Oct 9, 2025

if this is creating static pods are they subject to SCC? I would expect not, as static pods don't go through apiserver to be created

@p0lyn0mial
Copy link
Contributor

if this is creating static pods are they subject to SCC?

I don't think this creates a static pod. I think the guard-pod is just a regular pod.

Since setting hostUsers: false doesn’t require SCC and is enough to enable to use "user namespaces", why not setting only this field first?

@p0lyn0mial
Copy link
Contributor

@haircommander one more question, are we right that it’s safe to set hostUsers in 4.21 (current master) , because user namespaces went GA in 4.20, and for odd versions the kubelet can only be one version behind?

@haircommander
Copy link
Member

Yes that seems safe to me!

@haircommander
Copy link
Member

Since setting hostUsers: false doesn’t require SCC and is enough to enable to use "user namespaces", why not setting only this field first?

yeah just hostUsers: false would work with me

@tchap
Copy link
Contributor Author

tchap commented Oct 13, 2025

Yeah, honestly I don't think we have to care about openshift.io/required-scc: restricted-v3 that much. I am working on user namespaces for the whole control plane and some of the namespaces have the run level annotation, which disables SCC admission altogether. It's very possible some of these pods are run in namespaces with SCC disabled as well. So we can't really rely on that.

And yeah, I've just checked, these are not static pods, sorry for the confusion.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Enable user namespaces and use a non-root user.

Tests run via openshift/cluster-kube-controller-manager-operator#887

Checked manually that the guard pods are using user namespace.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@tchap
Copy link
Contributor Author

tchap commented Oct 13, 2025

I ended up setting only hostUsers: false and setting a non-root user/group IDs, for now. Actually the issue doesn't require ensuring everything runs as restricted-v3, I am just enabling that wherever possible, because why not. But we are fine with only user namespaces here.

@p0lyn0mial
Copy link
Contributor

I ended up setting only hostUsers: false and setting a non-root user/group IDs, for now. Actually the issue doesn't require ensuring everything runs as restricted-v3, I am just enabling that wherever possible, because why not. But we are fine with only user namespaces here.

@tchap can we just set hostUsers: false ?

@tchap
Copy link
Contributor Author

tchap commented Oct 13, 2025

can we just set hostUsers: false ?

Ok, amended.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Tests run via openshift/cluster-kube-controller-manager-operator#887

Checked manually that the guard pods are using user namespace.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@tchap
Copy link
Contributor Author

tchap commented Oct 13, 2025

I still need to create testing PRs for all components using guard pods, will get to that later today, I hope.

@p0lyn0mial
Copy link
Contributor

/lgtm

/hold
for #2031 (comment)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2025
Copy link
Contributor

openshift-ci bot commented Oct 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: p0lyn0mial, tchap

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Checked manually that the guard pods are using user namespace.

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Checked manually that the guard pods are using user namespace.

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 13, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 14, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 14, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 14, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 15, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 15, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 15, 2025

@tchap: This pull request references CNTRLPLANE-1544 which is a valid jira issue.

In response to this:

Test for Downstream Components

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@p0lyn0mial
Copy link
Contributor

tests are green in the components repo

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2025
Copy link
Contributor

openshift-ci bot commented Oct 16, 2025

@tchap: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit be123a4 into openshift:master Oct 16, 2025
4 checks passed
@tchap tchap deleted the guard-userns branch October 16, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants