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

AUTH-482: set required-scc for openshift workloads #1031

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liouk
Copy link
Member

@liouk liouk commented Feb 26, 2024

Workloads affected:

  • openshift-ingress/router-default deployment
  • openshift-ingress-canary/ingress-canary daemonset
  • openshift-ingress-operator/ingress-operator deployment

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 26, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 26, 2024

@liouk: This pull request references AUTH-482 which is a valid jira issue.

In response to this:

Workloads affected:

  • openshift-ingress/router-default deployment
  • openshift-ingress-canary/ingress-canary daemonset
  • openshift-ingress-operator/ingress-operator deployment

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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 26, 2024
@liouk liouk force-pushed the required-scc branch 2 times, most recently from ded775d to ca00203 Compare February 28, 2024 15:10
@liouk
Copy link
Member Author

liouk commented Mar 20, 2024

/retest

@liouk liouk changed the title WIP: AUTH-482: set required-scc for openshift workloads AUTH-482: set required-scc for openshift workloads Mar 20, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 20, 2024
@candita
Copy link
Contributor

candita commented Apr 10, 2024

/assign @rfredette

@@ -9,6 +9,7 @@ spec:
metadata:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
openshift.io/required-scc: hostnetwork
Copy link
Contributor

Choose a reason for hiding this comment

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

The deployment may use "hostnetwork" or "restricted", depending on the ingresscontroller configuration (specifically IngressController.spec.endpointPublishingStrategy.type). So I think we will need desiredRouterDeployment in pkg/operator/controller/ingress/deployment.go to set this annotation at run-time —right?

By the way, this PR reminds me of some related PRs, #743 and #981, which updated the security context based on previous customer cases where we observed that the wrong SCC could be selected.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the pointer @Miciah 🙂 I've pushed a change that addresses this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Miciah as far as I can see, the router SA only has access to the hostnetwork SCC, and as a result it can't use restricted (which is why the tests fail).

Am I missing something in my changes about the ingress controller configuration for the deployment?

Copy link
Contributor

@Miciah Miciah May 24, 2024

Choose a reason for hiding this comment

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

You're right, it seems that we missed this change from the OCP 4.11 release notes:

The restricted SCC is no longer available to users of new clusters, unless the access is explicitly granted. In clusters originally installed in OpenShift Container Platform 4.10 or earlier, all authenticated users can use the restricted SCC when upgrading to OpenShift Container Platform 4.11 and later.

And observations of CI artifacts confirm this:

  • periodic-ci-openshift-release-master-ci-4.10-upgrade-from-stable-4.9-e2e-aws-ovn-upgrade has openshift.io/scc: restricted.
  • periodic-ci-openshift-release-master-ci-4.10-e2e-aws-serial has openshift.io/scc: restricted.
  • periodic-ci-openshift-release-master-ci-4.11-upgrade-from-stable-4.10-e2e-aws-ovn-upgrade has openshift.io/scc: restricted.
  • periodic-ci-openshift-release-master-ci-4.11-e2e-aws-serial has openshift.io/scc: hostnetwork.
  • periodic-ci-openshift-release-master-ci-4.12-upgrade-from-stable-4.11-e2e-aws-ovn-upgrade has openshift.io/scc: hostnetwork.
  • periodic-ci-openshift-release-master-ci-4.12-e2e-aws-sdn-serial has openshift.io/scc: hostnetwork.

The intention is definitely that we use "restricted" when we don't need "hostnetwork". I've filed OCPBUGS-34418 and posted #1064 to address this oversight. Thanks for pointing it out!

Copy link
Member Author

Choose a reason for hiding this comment

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

Glad this helped :) I'll wait for #1064 to merge and then rebase this and try again 👍

Copy link
Contributor

openshift-ci bot commented Apr 11, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rfredette. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@liouk
Copy link
Member Author

liouk commented Apr 12, 2024

/retest

failures seem to be infra/connectivity related

@liouk
Copy link
Member Author

liouk commented Apr 23, 2024

/retest-required

Copy link
Contributor

openshift-ci bot commented Apr 25, 2024

@liouk: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn bce1134 link true /test e2e-aws-ovn
ci/prow/e2e-azure-ovn bce1134 link false /test e2e-azure-ovn
ci/prow/e2e-gcp-ovn bce1134 link false /test e2e-gcp-ovn
ci/prow/e2e-aws-gatewayapi bce1134 link false /test e2e-aws-gatewayapi
ci/prow/e2e-aws-operator bce1134 link true /test e2e-aws-operator
ci/prow/e2e-aws-ovn-single-node bce1134 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-aws-ovn-serial bce1134 link true /test e2e-aws-ovn-serial
ci/prow/e2e-azure-operator bce1134 link true /test e2e-azure-operator
ci/prow/e2e-gcp-operator bce1134 link true /test e2e-gcp-operator
ci/prow/e2e-hypershift bce1134 link true /test e2e-hypershift

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/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants