From 328bd1c4f8fbbfd9959bb3df117afe7339c13959 Mon Sep 17 00:00:00 2001 From: Coleen Iona Quadros Date: Thu, 24 Oct 2024 16:47:30 +0200 Subject: [PATCH] update Signed-off-by: Coleen Iona Quadros --- .../controllers/multiclusterobservability/observatorium.go | 4 ++++ operators/multiclusterobservability/pkg/config/test | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 operators/multiclusterobservability/pkg/config/test diff --git a/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go b/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go index 79e216e73..6541b3fcd 100644 --- a/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go +++ b/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go @@ -175,8 +175,12 @@ func GenerateObservatoriumCR( oldSpecBytes, _ := yaml.Marshal(oldSpec) newSpecBytes, _ := yaml.Marshal(newSpec) + + log.Info("Coleen bytes equal", "bytes equal", bytes.Equal(newSpecBytes, oldSpecBytes)) if bytes.Equal(newSpecBytes, oldSpecBytes) && labels[obsCRConfigHashLabelName] == observatoriumCRFound.Labels[obsCRConfigHashLabelName] { + log.Info("Coleen Observatorium CR spec and hash are the same, skipping update") + log.Info("Coleen found labels", "labels", observatoriumCRFound.Labels) return nil, nil } diff --git a/operators/multiclusterobservability/pkg/config/test b/operators/multiclusterobservability/pkg/config/test new file mode 100644 index 000000000..7efd5df73 --- /dev/null +++ b/operators/multiclusterobservability/pkg/config/test @@ -0,0 +1,4 @@ +2024-10-24T14:35:31.365Z INFO controller_multiclustermonitoring Coleen Old observatorium CR spec {"oldSpec": {"image":"registry.redhat.io/rhacm2/thanos-rhel9@sha256:caf27fd686b2ae1d6cb0ebe02cf195a2e7caece3ac8bda0c0e88f92678da6bd2","imagePullPolicy":"IfNotPresent","compact":{"replicas":1,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"200Gi"}},"storageClassName":"gp3-csi"}},"retentionResolutionRaw":"365d","retentionResolution5m":"365d","retentionResolution1h":"365d","enableDownsampling":true,"resources":{"requests":{"cpu":"100m","memory":"512Mi"}},"serviceMonitor":true,"deleteDelay":"48h"},"receiveController":{"image":"registry.redhat.io/rhacm2/thanos-receive-controller-rhel9@sha256:739292da294b1b536cfea4d4cb63bc39f95cb917695026b1660f9022a73d58ee","imagePullPolicy":"IfNotPresent","version":"master-2022-04-01-b58820f","resources":{"requests":{"cpu":"4m","memory":"32Mi"}},"serviceMonitor":true},"receivers":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"100Gi"}},"storageClassName":"gp3-csi"}},"replicationFactor":3,"resources":{"requests":{"cpu":"300m","memory":"512Mi"}},"serviceMonitor":true,"retention":"24h"},"queryFrontend":{"replicas":2,"resources":{"requests":{"cpu":"100m","memory":"256Mi"}},"serviceMonitor":true,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true}},"store":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"gp3-csi"}},"shards":3,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true},"resources":{"requests":{"cpu":"100m","memory":"1Gi"}},"serviceMonitor":true},"rule":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"gp3-csi"}},"rulesConfig":[{"name":"thanos-ruler-default-rules","key":"default_rules.yaml"}],"extraVolumeMounts":[{"type":"configMap","mountPath":"/etc/thanos/configmaps/alertmanager-ca-bundle","name":"alertmanager-ca-bundle","key":"service-ca.crt"}],"alertmanagerConfigFile":{"name":"thanos-ruler-config","key":"config.yaml"},"reloaderImage":"registry.redhat.io/openshift4/ose-configmap-reloader@sha256:fa5b2e42a27e3ab5f0a0d2a103b5602b81d1b29eb788b54cc60ad547744ad053","reloaderImagePullPolicy":"IfNotPresent","resources":{"requests":{"cpu":"50m","memory":"512Mi"}},"reloaderResources":{"requests":{"cpu":"4m","memory":"25Mi"}},"serviceMonitor":true,"blockDuration":"2h","retention":"24h","evalInterval":"300s"},"query":{"replicas":2,"resources":{"requests":{"cpu":"300m","memory":"1Gi"}},"serviceMonitor":true,"lookbackDelta":"600s"}}} +2024-10-24T14:35:31.365Z INFO controller_multiclustermonitoring Coleen New observatorium CR spec {"newSpec": {"image":"registry.redhat.io/rhacm2/thanos-rhel9@sha256:caf27fd686b2ae1d6cb0ebe02cf195a2e7caece3ac8bda0c0e88f92678da6bd2","imagePullPolicy":"IfNotPresent","compact":{"replicas":1,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"200Gi"}},"storageClassName":"gp3-csi"}},"retentionResolutionRaw":"365d","retentionResolution5m":"365d","retentionResolution1h":"365d","enableDownsampling":true,"resources":{"requests":{"cpu":"500m","memory":"1Gi"}},"serviceMonitor":true,"deleteDelay":"48h"},"receiveController":{"image":"registry.redhat.io/rhacm2/thanos-receive-controller-rhel9@sha256:739292da294b1b536cfea4d4cb63bc39f95cb917695026b1660f9022a73d58ee","imagePullPolicy":"IfNotPresent","version":"master-2022-04-01-b58820f","resources":{"requests":{"cpu":"4m","memory":"32Mi"}},"serviceMonitor":true},"receivers":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"100Gi"}},"storageClassName":"gp3-csi"}},"replicationFactor":3,"resources":{"requests":{"cpu":"300m","memory":"512Mi"}},"serviceMonitor":true,"retention":"24h"},"queryFrontend":{"replicas":2,"resources":{"requests":{"cpu":"100m","memory":"256Mi"}},"serviceMonitor":true,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true}},"store":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"gp3-csi"}},"shards":3,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true},"resources":{"requests":{"cpu":"100m","memory":"1Gi"}},"serviceMonitor":true},"rule":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}},"storageClassName":"gp3-csi"}},"rulesConfig":[{"name":"thanos-ruler-default-rules","key":"default_rules.yaml"}],"extraVolumeMounts":[{"type":"configMap","mountPath":"/etc/thanos/configmaps/alertmanager-ca-bundle","name":"alertmanager-ca-bundle","key":"service-ca.crt"}],"alertmanagerConfigFile":{"name":"thanos-ruler-config","key":"config.yaml"},"reloaderImage":"registry.redhat.io/openshift4/ose-configmap-reloader@sha256:fa5b2e42a27e3ab5f0a0d2a103b5602b81d1b29eb788b54cc60ad547744ad053","reloaderImagePullPolicy":"IfNotPresent","resources":{"requests":{"cpu":"50m","memory":"512Mi"}},"reloaderResources":{"requests":{"cpu":"4m","memory":"25Mi"}},"serviceMonitor":true,"blockDuration":"2h","retention":"24h","evalInterval":"300s"},"query":{"replicas":2,"resources":{"requests":{"cpu":"300m","memory":"1Gi"}},"serviceMonitor":true,"lookbackDelta":"600s"}}} +2024-10-24T14:35:33.408Z INFO controller_multiclustermonitoring Coleen Old observatorium CR spec {"oldSpec": {"image":"registry.redhat.io/rhacm2/thanos-rhel9@sha256:caf27fd686b2ae1d6cb0ebe02cf195a2e7caece3ac8bda0c0e88f92678da6bd2","imagePullPolicy":"IfNotPresent","compact":{"replicas":1,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"200Gi"}},"storageClassName":"gp3-csi"}},"retentionResolutionRaw":"365d","retentionResolution5m":"365d","retentionResolution1h":"365d","enableDownsampling":true,"resources":{"requests":{"cpu":"100m","memory":"512Mi"}},"serviceMonitor":true,"deleteDelay":"48h"},"receiveController":{"image":"registry.redhat.io/rhacm2/thanos-receive-controller-rhel9@sha256:739292da294b1b536cfea4d4cb63bc39f95cb917695026b1660f9022a73d58ee","imagePullPolicy":"IfNotPresent","version":"master-2022-04-01-b58820f","resources":{"requests":{"cpu":"4m","memory":"32Mi"}},"serviceMonitor":true},"receivers":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"100Gi"}},"storageClassName":"gp3-csi"}},"replicationFactor":3,"resources":{"requests":{"cpu":"300m","memory":"512Mi"}},"serviceMonitor":true,"retention":"24h"},"queryFrontend":{"replicas":2,"resources":{"requests":{"cpu":"100m","memory":"256Mi"}},"serviceMonitor":true,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true}},"store":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"gp3-csi"}},"shards":3,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true},"resources":{"requests":{"cpu":"100m","memory":"1Gi"}},"serviceMonitor":true},"rule":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"gp3-csi"}},"rulesConfig":[{"name":"thanos-ruler-default-rules","key":"default_rules.yaml"}],"extraVolumeMounts":[{"type":"configMap","mountPath":"/etc/thanos/configmaps/alertmanager-ca-bundle","name":"alertmanager-ca-bundle","key":"service-ca.crt"}],"alertmanagerConfigFile":{"name":"thanos-ruler-config","key":"config.yaml"},"reloaderImage":"registry.redhat.io/openshift4/ose-configmap-reloader@sha256:fa5b2e42a27e3ab5f0a0d2a103b5602b81d1b29eb788b54cc60ad547744ad053","reloaderImagePullPolicy":"IfNotPresent","resources":{"requests":{"cpu":"50m","memory":"512Mi"}},"reloaderResources":{"requests":{"cpu":"4m","memory":"25Mi"}},"serviceMonitor":true,"blockDuration":"2h","retention":"24h","evalInterval":"300s"},"query":{"replicas":2,"resources":{"requests":{"cpu":"300m","memory":"1Gi"}},"serviceMonitor":true,"lookbackDelta":"600s"}}} +2024-10-24T14:35:33.408Z INFO controller_multiclustermonitoring Coleen New observatorium CR spec {"newSpec": {"image":"registry.redhat.io/rhacm2/thanos-rhel9@sha256:caf27fd686b2ae1d6cb0ebe02cf195a2e7caece3ac8bda0c0e88f92678da6bd2","imagePullPolicy":"IfNotPresent","compact":{"replicas":1,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"200Gi"}},"storageClassName":"gp3-csi"}},"retentionResolutionRaw":"365d","retentionResolution5m":"365d","retentionResolution1h":"365d","enableDownsampling":true,"resources":{"requests":{"cpu":"500m","memory":"1Gi"}},"serviceMonitor":true,"deleteDelay":"48h"},"receiveController":{"image":"registry.redhat.io/rhacm2/thanos-receive-controller-rhel9@sha256:739292da294b1b536cfea4d4cb63bc39f95cb917695026b1660f9022a73d58ee","imagePullPolicy":"IfNotPresent","version":"master-2022-04-01-b58820f","resources":{"requests":{"cpu":"4m","memory":"32Mi"}},"serviceMonitor":true},"receivers":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"100Gi"}},"storageClassName":"gp3-csi"}},"replicationFactor":3,"resources":{"requests":{"cpu":"300m","memory":"512Mi"}},"serviceMonitor":true,"retention":"24h"},"queryFrontend":{"replicas":2,"resources":{"requests":{"cpu":"100m","memory":"256Mi"}},"serviceMonitor":true,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true}},"store":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"gp3-csi"}},"shards":3,"cache":{"image":"registry.redhat.io/rhacm2/memcached-rhel9@sha256:9600034019ce695e89aecb6ac255d591b201fc40a7f3d9796f42d043f0340623","imagePullPolicy":"IfNotPresent","version":"1.6.3-alpine","exporterImage":"registry.redhat.io/rhacm2/memcached-exporter-rhel9@sha256:2c6e39ecbeed3dc4d30225b9a2ed0840c6d41c032ee08d63c7f8f092f3ee81e6","exporterImagePullPolicy":"IfNotPresent","exporterVersion":"v0.9.0","replicas":3,"memoryLimitMb":1024,"maxItemSize":"1m","connectionLimit":1024,"resources":{"requests":{"cpu":"45m","memory":"128Mi"}},"exporterResources":{"requests":{"cpu":"5m","memory":"50Mi"}},"serviceMonitor":true},"resources":{"requests":{"cpu":"100m","memory":"1Gi"}},"serviceMonitor":true},"rule":{"replicas":3,"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}},"storageClassName":"gp3-csi"}},"rulesConfig":[{"name":"thanos-ruler-default-rules","key":"default_rules.yaml"}],"extraVolumeMounts":[{"type":"configMap","mountPath":"/etc/thanos/configmaps/alertmanager-ca-bundle","name":"alertmanager-ca-bundle","key":"service-ca.crt"}],"alertmanagerConfigFile":{"name":"thanos-ruler-config","key":"config.yaml"},"reloaderImage":"registry.redhat.io/openshift4/ose-configmap-reloader@sha256:fa5b2e42a27e3ab5f0a0d2a103b5602b81d1b29eb788b54cc60ad547744ad053","reloaderImagePullPolicy":"IfNotPresent","resources":{"requests":{"cpu":"50m","memory":"512Mi"}},"reloaderResources":{"requests":{"cpu":"4m","memory":"25Mi"}},"serviceMonitor":true,"blockDuration":"2h","retention":"24h","evalInterval":"300s"},"query":{"replicas":2,"resources":{"requests":{"cpu":"300m","memory":"1Gi"}},"serviceMonitor":true,"lookbackDelta":"600s"}}} \ No newline at end of file