Skip to content

ServiceManager and CloudManagement resource are listed twice #295

@GenosseOtt

Description

@GenosseOtt

Description

As a user I expect the UI to reflect exactly what I apply to my MCP.

Steps to reproduce

  1. Create an MCP
  2. Connect with BTP
  3. Create a Subaccount
  4. Apply following ressources
apiVersion: account.btp.sap.crossplane.io/v1beta1
kind: ServiceManager
metadata:
  name: my-subaccount-service-manager
spec:
  writeConnectionSecretToRef:
    name: sap-btp-service-operator
    namespace: default
  forProvider:
    subaccountRef:
      name: bye-bye-september 
  providerConfigRef:
    name: btp-providerconfig
  
---

apiVersion: account.btp.sap.crossplane.io/v1alpha1
kind: Entitlement
metadata:
  name: cis-entitlement
spec:
  forProvider:
    serviceName: cis
    servicePlanName: local
    enable: true
    subaccountRef:
      name: bye-bye-september 
  providerConfigRef:
    name: btp-providerconfig

---

apiVersion: account.btp.sap.crossplane.io/v1alpha1
kind: CloudManagement
metadata:
  name: my-subaccount-cis
spec:
  writeConnectionSecretToRef:
    name: cis-local
    namespace: default
  forProvider:
    serviceManagerRef:
      name: my-subaccount-service-manager # Use the ServiceManager resource created in the previous step
    subaccountRef:
      name: bye-bye-september
  providerConfigRef:
    name: btp-providerconfig

v1alpha1

Expected

  • Resources are created ONCE
    (They are: see k9s )
Image

Actual

UI shows CloudManagement and ServceManager twice - once as v1alpha1 and once as v1beta1

We need to add this logic here:
https://github.com/openmcp-project/ui-backend/blob/a1d1aaac580b3deafd69abd2d3065eff10adcc21/pkg/k8s/apiserver.go#L184-L210

Problem Cause

The managed implementation in our ui-backend project is returning all CRDs but it should check if there is one set multiple times and just return the latest one.

Image

Metadata

Metadata

Labels

area/mcp-uiAll ManagedControlPlane UI related issuespriority/highAffected feature is broken

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions