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

IOR is being enabled when SMCP is replaced by `oc replace`

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • OSSM 2.5.2
    • Maistra
    • None
    • False
    • None
    • False
    • Hide
      1. oc new-project reproducer
        oc create -f - <<EOF
        apiVersion: maistra.io/v2
        kind: ServiceMeshControlPlane
        metadata:
          name: basic
        spec:
          version: v2.5
          policy:
            type: Istiod
          addons:
            grafana:
              enabled: true
            kiali:
              enabled: true
            prometheus:
              enabled: true
          telemetry:
            type: Istiod
        EOF
        oc wait --for condition=Ready smcp/basic
        
      1. Check that IOR is disabled (the command returns false)
        oc get smcp basic -o jsonpath='{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}'
        
      1. Run oc replace with the same values
        oc replace -f - <<EOF
        apiVersion: maistra.io/v2
        kind: ServiceMeshControlPlane
        metadata:
          name: basic
        spec:
          version: v2.5
          policy:
            type: Istiod
          addons:
            grafana:
              enabled: true
            kiali:
              enabled: true
            prometheus:
              enabled: true
          telemetry:
            type: Istiod
        EOF
        oc wait --for condition=Ready smcp/basic
        
      1. Check that IOR is disabled (the command returns true, bug)
        oc get smcp basic -o jsonpath='{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}'
        
      Show
      oc new -project reproducer oc create -f - <<EOF apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic spec: version: v2.5 policy: type: Istiod addons: grafana: enabled: true kiali: enabled: true prometheus: enabled: true telemetry: type: Istiod EOF oc wait -- for condition=Ready smcp/basic Check that IOR is disabled (the command returns false) oc get smcp basic -o jsonpath= '{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}' Run oc replace with the same values oc replace -f - <<EOF apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic spec: version: v2.5 policy: type: Istiod addons: grafana: enabled: true kiali: enabled: true prometheus: enabled: true telemetry: type: Istiod EOF oc wait -- for condition=Ready smcp/basic Check that IOR is disabled (the command returns true, bug) oc get smcp basic -o jsonpath= '{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}'

      When I create control plane with default SMCP, e.g.

      oc create -f - <<EOF
      apiVersion: maistra.io/v2
      kind: ServiceMeshControlPlane
      metadata:
        name: basic
      spec:
        version: v2.5
        policy:
          type: Istiod
        addons:
          grafana:
            enabled: true
          kiali:
            enabled: true
          prometheus:
            enabled: true
        telemetry:
          type: Istiod
      

      1st time, the IOR is disabled. (which is by default from v2.5)
      However, when I run `oc replace` again on that instance, the IOR will be enabled without I explicitly specify in SMCP to do that.

      Interesting thing is that this doesn't happen with `oc apply` or `oc patch` commands
      e.g.

      $ oc create -f default_smcp.yaml
      $ oc wait --for condition=Ready smcp/basic
      $ oc get smcp basic -o jsonpath='{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}'
      false
      oc patch smcp basic --type=merge -p '{"spec":{"general":{"validationMessages":true}}}'
      $ oc wait --for condition=Ready smcp/basic
      $ oc get smcp basic -o jsonpath='{.status.appliedValues.istio.gateways.istio-ingressgateway.ior_enabled}'
      false 

              rh-ee-yannliu Yann Liu
              mkralik@redhat.com Matej Kralik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: