Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-60957

The HyperShift operator periodically overwrites user-defined modifications in the cluster-monitoring-config ConfigMap within a hosted control plane's openshift-monitoring namespace.

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • Customer Escalated
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      The HyperShift operator periodically overwrites user-defined modifications in the cluster-monitoring-config ConfigMap within a hosted control plane's openshift-monitoring namespace.

      Steps to Reproduce:

      1. Deploy a HyperShift Hosted Control Plane (HCP).

      2. In the hosted cluster, modify the cluster-monitoring-config ConfigMap in the openshift-monitoring namespace to include custom settings. For example, apply the following configuration:

          
      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
          alertmanagerMain:
            volumeClaimTemplate:
              spec:
                resources:
                  requests:
                    cpu: 90m
                    memory: 1Gi
                    storage: 10Gi
          prometheusK8s:
            retention: 24h
            retentionSize: 10GB
            volumeClaimTemplate:
              spec:
                resources:
                  requests:
                    cpu: 90m
                    memory: 1Gi
                    storage: 100Gi
                  limits:
                    cpu: 120m
                    memory: 2Gi     

      3. Wait for the HyperShift operator's reconciliation loop to run (observed to take approximately one hour).

      4. Inspect the cluster-monitoring-config ConfigMap again: oc get cm cluster-monitoring-config -n openshift-monitoring -o yaml

      Actual results:

      The custom settings for alertmanagerMain and prometheusK8s are removed. The ConfigMap is overwritten and contains only the settings managed by HyperShift, losing all other configurations.

      The resulting ConfigMap appears as follows:

       

      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
        uid: eb93ac01-726f-4d2c-95d4-0a584bdef699
        resourceVersion: '210370596'
        creationTimestamp: '2025-08-27T14:42:56Z'
        managedFields:
          - manager: hypershift-operator-manager
            operation: Update
            apiVersion: v1
            time: '2025-08-27T15:44:06Z'
      data:
        config.yaml: |
          enableUserWorkload: true
          prometheusOperator:
            logLevel: debug 

       

       

      Expected results:

      The HyperShift operator's reconciliation logic should be non-destructive. It should apply its required configuration while preserving any other existing, user-defined fields in the config.yaml data.The operator should merge its required configuration (e.g., enableUserWorkload: true) with any existing settings. Modifications to the ConfigMap should be additive, not a full replacement of the data block.

              jparrill@redhat.com Juan Manuel Parrilla Madrid
              rhn-support-amanverm Aman Dev Verma
              None
              None
              Vladislav Kolodny Vladislav Kolodny
              None
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: