From a70046fd8f48250c6e1953efcb3e02f5e0296b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Mac=C3=ADk?= Date: Tue, 17 Dec 2024 15:14:43 +0100 Subject: [PATCH] fix(prometheus-storage-config): Fix Prometheus storage config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel MacĂ­k --- ci-scripts/rhdh-setup/deploy.sh | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/ci-scripts/rhdh-setup/deploy.sh b/ci-scripts/rhdh-setup/deploy.sh index 367ab85..2bcf714 100755 --- a/ci-scripts/rhdh-setup/deploy.sh +++ b/ci-scripts/rhdh-setup/deploy.sh @@ -479,15 +479,8 @@ setup_monitoring() { if $cli -n openshift-monitoring get cm cluster-monitoring-config; then $cli -n openshift-monitoring extract configmap/cluster-monitoring-config --to=- --keys=config.yaml >"$config" else - cat <"$config" -apiVersion: v1 -kind: ConfigMap -metadata: - name: cluster-monitoring-config - namespace: openshift-monitoring -data: - config.yaml: "" -EOD + $cli -n openshift-monitoring create configmap cluster-monitoring-config + echo "" >"$config" fi update_config=0 @@ -497,7 +490,7 @@ EOD fi if [ "$(yq '.prometheusK8s.volumeClaimTemplate' "$config")" == "null" ]; then - yq -i '.prometheusK8s = {"volumeClaimTemplate":{"spec":{"storageClassName":"gp3-csi","volumeMode":"Filesystem","resources":{"requests":{"storage":"50Gi"}}}}}' "$config" + yq -i '.prometheusK8s = {"volumeClaimTemplate":{"spec":{"storageClassName":"gp3-csi","volumeMode":"Filesystem","resources":{"requests":{"storage":"30Gi"}}}}}' "$config" update_config=1 fi @@ -533,15 +526,8 @@ EOD if $cli -n openshift-user-workload-monitoring get cm user-workload-monitoring-config; then $cli -n openshift-user-workload-monitoring extract configmap/user-workload-monitoring-config --to=- --keys=config.yaml >"$config" else - cat <"$config" -apiVersion: v1 -kind: ConfigMap -metadata: - name: user-workload-monitoring-config - namespace: openshift-user-workload-monitoring -data: - config.yaml: "" -EOD + $cli -n openshift-user-workload-monitoring create configmap user-workload-monitoring-config + echo "" >"$config" fi if [ "$(yq '.prometheus.volumeClaimTemplate' "$config")" == "null" ]; then