Uploaded image for project: 'Managed Service - Connectors'
  1. Managed Service - Connectors
  2. MGDCTRS-1745

Configure Camel-K to enable Label selection

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • cos-fleetshard-camel
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      Trying to mimic the Support gradual fleetwide service component upgrades (MGDCTRS-172) I found out that there are several things needed to be updated to make this work with the latest RHOC (1.1.21).

      By default, rhoc comes with cos.operator.camel.label-selection.enabled = false in the cos-fleetshard-operator-camel-config config map. Changing this one to true and restarting the cos-fleetshard-operator-camel results in the connectors not starting, because there are two things wrong:

      1. after enabling the label-selection option, there is a new annotation on the created kameletbinding:

      "camel.apache.org/operator.id": "cos-fleetshard-operator-camel"
      

      This annotation is set by the cos-fleetshard-operator-camel and must match the OPERATOR_ID env variable on the camel-k-operator deployment, that is not the case:

      oc get deployment camel-k-operator -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="OPERATOR_ID")]}'
      {"name":"OPERATOR_ID","value":"camel-k"}
      

      2. for the filtering to work from the camel-k-operator point of view, the IntegrationPlatform object also needs to be annotated with the same annotation, but currently (if I understand it correctly) RHOC doesn't create any IntegrationPlatform and the camel-k operator creates the default integration platform automatically:

      apiVersion: camel.apache.org/v1
      kind: IntegrationPlatform
      metadata:
        creationTimestamp: "2022-12-05T10:00:58Z"
        generation: 1
        labels:
          camel.apache.org/platform.generated: "true"
        name: camel-k
        namespace: redhat-openshift-connectors
      

      This needs to be changed to:

      apiVersion: camel.apache.org/v1
      kind: IntegrationPlatform
      metadata:
        labels:
          camel.apache.org/operator.id: <camel-k-operator id here>
          camel.apache.org/secondary.platform: "true" <this would be needed later during the "gradual upgrade">
        name: camel-k
        namespace: redhat-openshift-connectors
      

              shivamgu@redhat.com Shivam Gupta (Inactive)
              avano@redhat.com Andrej Vano
              Archiver:
              ranumula@redhat.com Raju Anumula

                Created:
                Updated:
                Resolved:
                Archived: