Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-11385

Migrate Kubernetes RBAC E2E tests to Overlay (backstage workspace)

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • 1.10.0
    • None
    • Kubernetes, Overlay, RBAC
    • None
    • RHDH Plugins 3288

      Description

      Migrate Kubernetes RBAC E2E tests to workspaces/backstage/e2e-tests/.

      NOTE

      This task is based on the existing RHDH core test case and may have missed some details. Please review the original test files in RHDH core before implementation.

      DOCUMENTATION

      Follow the RHDH E2E Test Utils - Overlay Documentation for implementation guidance.

      Setup Prerequisites

      Kubernetes Cluster Access: Service account with permissions to read cluster resources

      • K8S_CLUSTER_TOKEN: Service account token for cluster access
      • K8S_CLUSTER_URL: Kubernetes API server URL

      Test Users with Different Permissions:

      • QE_USER5_ID, QE_USER5_PASS: User with partial Kubernetes permissions
      • QE_USER6_ID, QE_USER6_PASS: User without Kubernetes permissions

      RBAC Enabled: Permission framework with kubernetes plugin permissions

      Based on RHDH core config (.ibm/pipelines/resources/config_map/app-config-rhdh-rbac.yaml):

      permission:
        enabled: true
        rbac:
          pluginsWithPermission:
            ‑ kubernetes
      

      Test Workload: Kubernetes deployment with pods accessible via Backstage catalog entity

      Source Files (RHDH Core)

      Plugin Packages

      Package Type
      backstage-plugin-kubernetes Frontend
      backstage-plugin-kubernetes-backend-dynamic Backend

      Acceptance Criteria

      1. Create Workspace Structure

      • [ ] Reuse workspaces/backstage/e2e-tests/

      2. Create RHDH Configuration (tests/config/)

      • [ ] Add kubernetes plugin to dynamic-plugins.yaml
      • [ ] Configure RBAC policies for kubernetes permissions

      3. Migrate Test Files

      • [ ] Create tests/specs/kubernetes-rbac.spec.ts
      • [ ] Create tests/pages/kubernetes.page.ts

      4. Verify All Tests Pass

      • [ ] All 4 test cases pass

      Test Cases (4 total)

      Verify pods visibility in the Kubernetes tab (with permissions)

      Verify pod logs visibility in the Kubernetes tab (with permissions)

      Verify pods are not visible in the Kubernetes tab (without permissions)

      Verify pod logs are not visible in the Kubernetes tab (without permissions)

      Reference

              rh-ee-dzemanov Dominika Zemanovicova
              skhileri Subhash Khileri
              RHDH Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: