Skip to content

Enable PodSecurityPolicy in our test environment #4480

Closed

Description

@mattmoor

In what area(s)?

/area test-and-release

Describe the feature

To catch things like: #3237 (comment)

cc @yu2003w

Activity

  1. added
    kind/feature
    on Jun 22, 2019
  2. added this to the Ice Box milestone on Jun 22, 2019
  3. added
    area/test-and-release
    on Jun 22, 2019
  4. knative-housekeeping-robot commented on Dec 23, 2019

    @knative-housekeeping-robot

    Issues go stale after 90 days of inactivity.
    Mark the issue as fresh by adding the comment /remove-lifecycle stale.
    Stale issues rot after an additional 30 days of inactivity and eventually close.
    If this issue is safe to close now please do so by adding the comment /close.

    Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

    /lifecycle stale

  5. added
    lifecycle/stale
    on Dec 23, 2019
  6. knative-housekeeping-robot commented on Jan 22, 2020

    @knative-housekeeping-robot

    Stale issues rot after 30 days of inactivity.
    Mark the issue as fresh by adding the comment /remove-lifecycle rotten.
    Rotten issues close after an additional 30 days of inactivity.
    If this issue is safe to close now please do so by adding the comment /close.

    Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

    /lifecycle rotten

  7. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Jan 22, 2020
  8. knative-housekeeping-robot commented on Feb 21, 2020

    @knative-housekeeping-robot

    Rotten issues close after 30 days of inactivity.
    Reopen the issue with /reopen.
    Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

    Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

    /close

  9. knative-prow-robot commented on Feb 21, 2020

    @knative-prow-robot
    Contributor

    @knative-housekeeping-robot: Closing this issue.

    Details

    In response to this:

    Rotten issues close after 30 days of inactivity.
    Reopen the issue with /reopen.
    Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

    Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

    /close

    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.

  10. Cynocracy commented on Mar 27, 2020

    @Cynocracy

    /reopen

    /remove-lifecycle rotten

  11. knative-prow-robot commented on Mar 27, 2020

    @knative-prow-robot
    Contributor

    @Cynocracy: Reopened this issue.

    Details

    In response to this:

    /reopen

    /remove-lifecycle rotten

    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.

  12. 1 remaining item

  13. Cynocracy commented on Mar 27, 2020

    @Cynocracy

    Reopening this, is this something we want to support?

    At least from our end, we'd like to maintain a policy, and this repo feels like the appropriate place to do so.

  14. Cynocracy commented on Mar 29, 2020

    @Cynocracy

    More info about the last attempt can be found at #4500

  15. mattmoor commented on Apr 16, 2020

    @mattmoor
    ContributorAuthor

    I think that we should be shipping a default PSP. It should be harmless for environments that aren't enforcing it, and very useful for installing into environments that require one.

    Here are the docs on enabling this for GKE: https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies#enabling_podsecuritypolicy_controller

    I'm happy to put together PSPs for the components we ship, we can probably start with a derivative of the Tekton PSP (the main change below is MustRunAsNonRoot):

    apiVersion: policy/v1beta1
    kind: PodSecurityPolicy
    metadata:
      name: knative-components
    spec:
      privileged: false
      allowPrivilegeEscalation: false
      hostNetwork: false
      hostIPC: false
      hostPID: false
    
      volumes:
      - 'emptyDir'
      - 'configMap'
      - 'secret'
    
      runAsUser:
        rule: 'MustRunAsNonRoot'
      seLinux:
        rule: 'RunAsAny'
      supplementalGroups:
        rule: 'MustRunAs'
        ranges:
        - min: 1
          max: 65535
      fsGroup:
        rule: 'MustRunAs'
        ranges:
        - min: 1
          max: 65535
    
  16. mattmoor commented on Apr 16, 2020

    @mattmoor
    ContributorAuthor

    cc @chaodaiG @chizhg How hard would it be to enable this in our e2e test environments?

  17. chizhg commented on Apr 16, 2020

    @chizhg
    Contributor

    cc @chaodaiG @chizhg How hard would it be to enable this in our e2e test environments?

    With the current infra it would be pretty easy, just changing https://github.com/knative/serving/blob/master/test/e2e-tests.sh#L39 to initialize $@ --skip-istio-addon --cluster-creation-flag "--enable-pod-security-policy" would create a PSP enabled cluster.

  18. mattmoor commented on Apr 16, 2020

    @mattmoor
    ContributorAuthor

    Awesome 😍

  19. mattmoor commented on Apr 16, 2020

    @mattmoor
    ContributorAuthor

    I'm attempting to make the e2e legs here use this to test it out: knative-extensions/net-contour#107

  20. mattmoor commented on Apr 16, 2020

    @mattmoor
    ContributorAuthor
  21. dprotaso commented on Jun 29, 2020

    @dprotaso
    Member

    Going to close this issue since PSP won't be supported in the future

    From: kubernetes/kubernetes#90603

    The clock is set for deprecation in 1.22 and removal of beta levels in 1.25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/test-and-releasekind/feature

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions