Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-30220

[HCP] PSA labels on namespaces in HyperShift guest cluster enforce "restricted" while OCP of same version is good without such issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Critical Critical
    • None
    • 4.14
    • HyperShift
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-20526. The following is the description of the original issue:

      Description of problem:

      [Hypershift] KAS labels on projects created should be consistent with OCP 
       enforce: privileged 

      Version: 4.14.0-0.nightly-2023-10-10-084534

      How reproducible: Always

      Steps to Reproduce:

      1. Install OCP cluster and hypershift operator
      2. Create hosted cluster
      3. Create a test project on hosted cluster

      Actual results:

      The hosted cluster KAS labels on the test project is 'enforce: restricted'
      $ oc new-project test1 --kubeconfig=guest.kubeconfig 
      $ oc get ns test1 -oyaml --kubeconfig=guest.kubeconfig 
      ...
        labels:
          kubernetes.io/metadata.name: test1
          pod-security.kubernetes.io/audit: restricted
          pod-security.kubernetes.io/audit-version: v1.24
          pod-security.kubernetes.io/enforce: restricted
          pod-security.kubernetes.io/enforce-version: v1.24
          pod-security.kubernetes.io/warn: restricted
          pod-security.kubernetes.io/warn-version: v1.24
        name: test1
      ...
       
      

      Expected results:

      The hosted cluster KAS labels on projects should be "enforce: privileged" as Managent cluster KAS labels on projects created is "enforce: privileged"

      Management cluster:

      $ oc new-project test
      $ oc get ns test -oyaml
      ...
        labels:
          kubernetes.io/metadata.name: test
          pod-security.kubernetes.io/audit: restricted
          pod-security.kubernetes.io/audit-version: v1.24
          pod-security.kubernetes.io/warn: restricted
          pod-security.kubernetes.io/warn-version: v1.24
        name: test
      ...

              agarcial@redhat.com Alberto Garcia Lamela
              openshift-crt-jira-prow OpenShift Prow Bot
              Jie Zhao Jie Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: