Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prometheus-storage-config): Fix Prometheus storage config #140

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 5 additions & 19 deletions ci-scripts/rhdh-setup/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOD >"$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
Expand All @@ -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

Expand Down Expand Up @@ -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 <<EOD >"$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
Expand Down