• Product / Portfolio Work
    • False
    • False

      thread https://redhat-external.slack.com/archives/C08AJ4XMVGB/p1747813009441609

      or the MVP we will have to consider to add a kind of status for the ClusterPermission, either on list and on view screens. Look at the status -> conditions -> FailedValidationNotInManagedClusterNamespace field

      apiVersion: rbac.open-cluster-management.io/v1alpha1
      kind: ClusterPermission
      metadata:
        creationTimestamp: '2025-05-19T13:08:43Z'
        generation: 1
        name: example2
        namespace: default
        resourceVersion: '431536'
        uid: 8955891a-8685-442a-97ab-cc89c646e3e3
      spec:
        roleBindings:
          - namespace: cluster1
            roleRef:
              apiGroup: rbac.authorization.k8s.io
              kind: Role
              name: kubevirt.io:edit
            subject:
              apiGroup: rbac.authorization.k8s.io
              kind: Group
              name: usergroup
          - namespace: cluster2
            roleRef:
              apiGroup: rbac.authorization.k8s.io
              kind: Role
              name: kubevirt.io:edit
            subject:
              apiGroup: rbac.authorization.k8s.io
              kind: Group
              name: admingroup
      status:
        conditions:
          - lastTransitionTime: '2025-05-19T13:08:43Z'
            message: namespace value is not a managed cluster
            reason: FailedValidationNotInManagedClusterNamespace
            status: 'False'
            type: Validation
      

      The idea is to display green/red icon/message depending on "status -> conditions[0] -> status = false/true" and then display a tooltip or a warning/error message with Reason and Message. For the MVP (this task) just the latest status.conditions element

      The list of reasons (in case they are needed) can be taken from https://github.com/open-cluster-management-io/cluster-permission/blob/114f3a649720a80e80e816cd62f81602df81e70c/controllers/clusterpermission_controller.go#L107

      as it is done for clusters

              emingora Enrique Mingorance Cano
              emingora Enrique Mingorance Cano
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: