Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3944

Disable segment analytics when cluster telemetry is disabled

    XMLWordPrintable

Details

    • Story
    • Resolution: Done
    • Critical
    • None
    • None
    • None
    • OEX OCP Console - Sprint 252

    Description

      Description

      As an administrator, I want to disable all telemetry on my cluster including UI analytics sent to segment.

      We should honor the existing telemetry configuration so that we send no analytics when an admin opts out of telemetry. See the documentation here:

      https://docs.openshift.com/container-platform/4.14/support/remote_health_monitoring/opting-out-of-remote-health-reporting.html#insights-operator-new-pull-secret_opting-out-remote-health-reporting

      Simon Pasquier

       yes this is the official supported way to disable telemetry though we also have a hidden flag in the CMO configmap that CI clusters use to disable telemetry (it depends if you want to push analytics for CI clusters).
      CMO configmap is set to
      data:
      config.yaml: |-
      telemeterClient:
      enabled: false
       

      the CMO code that reads the cloud.openshift.com token:
      https://github.com/openshift/cluster-monitoring-operator/blob/b7e3f50875f2bb1fed912b23fb80a101d3a786c0/pkg/manifests/config.go#L358-L386

      Acceptance Criteria

      • No segment events are sent when
        1. Cluster is a CI cluster, which means at least one of these 2 conditions are met:
          • Cluster pull secret does not have "cloud.openshift.com" credentials [1]
          • Cluster monitoring config has 'telemeterClient: {enabled: false}' [2]
        2. Console operator config telemetry disabled annotation == true [3]
      • Add and update unit tests and also e2e

      Additional Details:

      Slack discussion https://redhat-internal.slack.com/archives/C0VMT03S5/p1707753976034809

       

      # [1] Check cluster pull secret for cloud.openshift.com creds
      oc get secret pull-secret -n openshift-config -o json | jq -r '.data.".dockerconfigjson"' | base64 -d | jq -r '.auths."cloud.openshift.com"'
      
      # [2] Check cluster monitoring operator config for 'telemeterClient.enabled == false'
      oc get configmap cluster-monitoring-config -n openshift-monitoring | jq -r '.data."config.yaml"'
      
      # [3] Check console operator config telemetry disabled annotation 
      oc get console.operator.openshift.io cluster -o json | jq -r '.metadata.annotations."telemetry.console.openshift.io/DISABLED"' 

      Attachments

        Activity

          People

            rh-ee-jonjacks Jon Jackson
            spadgett@redhat.com Samuel Padgett
            YaDan Pei YaDan Pei
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: