Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1845187

Summary: Moving thanos-querier pods to infra nodes
Product: OpenShift Container Platform Reporter: Pedro Amoedo <pamoedom>
Component: MonitoringAssignee: Sergiusz Urbaniak <surbania>
Status: CLOSED CURRENTRELEASE QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.4CC: alegrand, anpicker, bward, erooth, kakkoyun, lcosic, mloibl, pamoedom, pkrupa, surbania
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-09 05:14:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pedro Amoedo 2020-06-08 15:34:55 UTC
Description of problem:

As documented here[1] and here[2], the monitoring components can be moved to infra nodes creating a configmap on the following manner:

~~~
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |+
    alertmanagerMain:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    prometheusK8s:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    prometheusOperator:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    grafana:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    k8sPrometheusAdapter:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    kubeStateMetrics:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    telemeterClient:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
    openshiftStateMetrics:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
~~~

However, the thanos-querier pods are obviously not migrated to infra nodes on this manner and will require manual modification of the "deployment.apps/thanos-querier"

[1] - https://docs.openshift.com/container-platform/4.4/machine_management/creating-infrastructure-machinesets.html#infrastructure-moving-monitoring_creating-infrastructure-machinesets
[2] - https://docs.openshift.com/container-platform/4.4/monitoring/cluster_monitoring/configuring-the-monitoring-stack.html#moving-monitoring-components-to-different-nodes_configuring-monitoring

Version-Release number of selected component (if applicable):

OCP 4.4.5

How reproducible:

Always

Steps to Reproduce:
1. Install OCP 4.4.5
2. Create new machinesets for infra nodes.
3. Create configmap "cluster-monitoring-config" as showed above.

Actual results:

All monitoring components that were running on worker nodes are successfully moved into new infra nodes except "thanos-querier" pods.

Expected results:

All monitoring components that were running on worker nodes are successfully moved into new infra nodes without exceptions.

Additional info:

I have tried to include also a section "thanosQuerier" within the configmap as follows but has no effect within the deployment:

~~~
    thanosQuerier:
      nodeSelector:
        node-role.kubernetes.io/infra: ""
~~~