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

OCPBUGS-46410: Set openshift.io/required-scc: privileged annotation in version pods #1129

Open
wants to merge 1 commit into
base: release-4.18
Choose a base branch
from

Conversation

DavidHurta
Copy link
Contributor

A manual cherry-pick of the #1106 PR for the release-4.18 branch.

… for `version` pods

Utilize the `openshift.io/required-scc` annotation [1] to pin the required SCC to
`version` pods. This will ensure that any existing custom SCCs in the cluster will
not have an effect on the `version` pods.

The `privileged` default SCC [2] was chosen as the pod accesses and modifies
host `/etc/` files. To do that, a pod must run as root and must also pass SELinux
permission checks. This is currently achieved by the pod running as a privileged
root. For such permission, the `privileged` default SCC is required.

Using the `hostmount-anyuid` default SCC is not sufficient for the existing code
as the pod is not able to pass the SELinux permissions checks.
Additional SELinux, host file system, and/or code changes would be needed.

In the future, we may implement such changes or try to use a local persistent
volume [3] as running the version pod as privileged root is undesirable for
the pod's goal of copying files into another pod.

Some of the other alternatives are modifications to the current architecture
of two separate pods or using a different type of volume.

[1] https://docs.openshift.com/container-platform/4.17/authentication/managing-security-context-constraints.html#security-context-constraints-requiring_configuring-internal-oauth
[2] https://docs.openshift.com/container-platform/4.17/authentication/managing-security-context-constraints.html#default-sccs_configuring-internal-oauth
[3] https://kubernetes.io/docs/concepts/storage/volumes/#local
@DavidHurta
Copy link
Contributor Author

/jira cherrypick OCPBUGS-31462

@openshift-ci openshift-ci bot requested review from hongkailiu and wking December 13, 2024 13:58
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2024
@openshift-ci-robot
Copy link
Contributor

@DavidHurta: Jira Issue OCPBUGS-31462 has been cloned as Jira Issue OCPBUGS-46410. Will retitle bug to link to clone.
/retitle OCPBUGS-46410: Set openshift.io/required-scc: privileged annotation in version pods

In response to this:

/jira cherrypick OCPBUGS-31462

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 changed the title Set openshift.io/required-scc: privileged annotation in version pods OCPBUGS-46410: Set openshift.io/required-scc: privileged annotation in version pods Dec 13, 2024
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 13, 2024
@openshift-ci-robot
Copy link
Contributor

@DavidHurta: This pull request references Jira Issue OCPBUGS-46410, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

A manual cherry-pick of the #1106 PR for the release-4.18 branch.

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.

@DavidHurta
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 13, 2024
@openshift-ci-robot
Copy link
Contributor

@DavidHurta: This pull request references Jira Issue OCPBUGS-46410, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-31462 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-31462 targets the "4.19.0" version, which is one of the valid target versions: 4.19.0
  • bug has dependents

Requesting review from QA contact:
/cc @jiajliu

In response to this:

/jira refresh

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 jiajliu December 13, 2024 14:20
@DavidHurta
Copy link
Contributor Author

/retest-required

1 similar comment
@DavidHurta
Copy link
Contributor Author

/retest-required

Copy link
Contributor

openshift-ci bot commented Dec 15, 2024

@DavidHurta: 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-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2024
Copy link
Contributor

openshift-ci bot commented Dec 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DavidHurta, petr-muller

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:
  • OWNERS [DavidHurta,petr-muller]

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

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/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

3 participants