Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-5730

Allow to create SMCP in gateway-controller mode when other SMCPs exist

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • Customer Impact, Maistra
    • None

      Currently, our operator fails to create the SMCP below, because only one SMCP can exists in a cluster when `spec.mode: ClusterWide`. We should make an exception for gateway-controller mode, because it designed to be cluster-wide and should work with other SMCPs in the cluster. Additionally, istio-operator do not return validation error when SMCP has gateway-controller profile. Instead, an error is logged and the SMCP is not deployed.

      1. Create an SMCP.
      2. Create gateway-controller:

      kubectl apply -n openshift-ingress -f - << EOF
      apiVersion: maistra.io/v2
      kind: ServiceMeshControlPlane
      metadata: 
        name: gateway-controller
      spec: 
        profiles: 
        - gateway-controller
      EOF
      
      servicemeshcontrolplane.maistra.io/gateway-controller created
      

      Then you should see in the istio-operator logs this:

      {"level":"info","ts":1705591149.0866082,"logger":"servicemeshcontrolplane-controller","msg":"Reconciling ServiceMeshControlPlane","ServiceMeshControlPlane":"openshift-ingress/gateway-controller","Status":{"conditions":[{"type":"Installed","status":"False","reason":"ResourceCreated","message":"Installing mesh generation 1","lastTransitionTime":"2024-01-18T15:19:06Z"},{"type":"Reconciled","status":"False","reason":"ValidationError","message":"Spec is invalid: error: a cluster-scoped SMCP may only be created when no other SMCPs exist","lastTransitionTime":"2024-01-18T15:19:06Z"},{"type":"Ready","status":"False","reason":"ValidationError","message":"Spec is invalid: error: a cluster-scoped SMCP may only be created when no other SMCPs exist","lastTransitionTime":"2024-01-18T15:19:06Z"}]}}
      

            jewertow@redhat.com Jacek Ewertowski
            jewertow@redhat.com Jacek Ewertowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: