Skip to content

Commit

Permalink
fix shellcheck stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip committed Jul 16, 2024
1 parent 0439a81 commit ff600d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infrastructure/task/scripts/adjust-resource-requests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Namespace
NAMESPACES_RAW=$(kubectl get ns -o jsonpath='{.items[*].metadata.name}')
NAMESPACES=($NAMESPACES_RAW)
NAMESPACES=("$NAMESPACES_RAW")

SYSTEM_NAMESPACES=(
"calico-system"
Expand All @@ -34,7 +34,7 @@ SYSTEM_NAMESPACES=(
echo "Adjusting resource requests in the cluster"
for NS in "${NAMESPACES[@]}"; do
# Skip system namespaces - those we have enough controll over
if [[ " ${SYSTEM_NAMESPACES[@]} " =~ " ${NS} " ]]; then
if [[ " ${SYSTEM_NAMESPACES[*]} " =~ " ${NS} " ]]; then
continue
fi
echo "## $NS ##"
Expand All @@ -46,7 +46,7 @@ for NS in "${NAMESPACES[@]}"; do

for DEPLOYMENT in "${DEPLOYMENTS[@]}"; do
# Patch the deployments resource request
kubectl patch deployments.apps -n $NS $DEPLOYMENT --type="json" -p='[
kubectl patch deployments.apps -n "$NS" "$DEPLOYMENT" --type="json" -p='[
{
"op": "replace",
"path": "/spec/template/spec/containers/0/resources/requests/memory",
Expand Down

0 comments on commit ff600d2

Please sign in to comment.