-
Notifications
You must be signed in to change notification settings - Fork 10
/
acm-2.6.sh
executable file
·26 lines (22 loc) · 2.17 KB
/
acm-2.6.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# 2500 MC support
export KUBECONFIG=/root/mno/kubeconfig
echo "Patching ACM multicluster-observability-operator memory limits from 1Gi to 2Gi"
oc get csv -n open-cluster-management advanced-cluster-management.v2.6.0 -o json | jq '.spec.install.spec.deployments[] | select(.name=="multicluster-observability-operator").spec.template.spec.containers[] | select(.name=="multicluster-observability-operator").resources.limits.memory'
oc get deploy -n open-cluster-management multicluster-observability-operator -o json | jq '.spec.template.spec.containers[0].resources.limits.memory'
oc get csv -n open-cluster-management advanced-cluster-management.v2.6.0 -o json | jq '.spec.install.spec.deployments[] |= (select(.name=="multicluster-observability-operator").spec.template.spec.containers[] |= (select(.name=="multicluster-observability-operator").resources.limits.memory = "2Gi"))' | oc replace -f -
echo "Sleep 45"
sleep 45
oc get csv -n open-cluster-management advanced-cluster-management.v2.6.0 -o json | jq '.spec.install.spec.deployments[] | select(.name=="multicluster-observability-operator").spec.template.spec.containers[] | select(.name=="multicluster-observability-operator").resources.limits.memory'
oc get deploy -n open-cluster-management multicluster-observability-operator -o json | jq '.spec.template.spec.containers[0].resources.limits.memory'
echo "Patched ACM multicluster-observability-operator memory limits"
echo "Done Patching"
# echo "Patching ACM search-redisgraph memory limits from 4Gi to 16Gi"
# oc get sts -n open-cluster-management search-redisgraph -o json | jq '.spec.template.spec.containers[0].resources.limits.memory'
# oc annotate mch -n open-cluster-management multiclusterhub mch-pause=true
# sleep 15
# oc annotate mce multiclusterengine pause=true
# oc annotate mch -n open-cluster-management multiclusterhub pause=true
# oc annotate mce multiclusterengine pause=true
# oc get sts -n open-cluster-management search-redisgraph -o json | jq '.spec.template.spec.containers[0].resources.limits.memory = "16Gi"' | oc replace -f -
# oc get sts -n open-cluster-management search-redisgraph -o json | jq '.spec.template.spec.containers[0].resources.limits.memory'