Skip to content

Commit

Permalink
script to patch the nginx's in a namespace so they use the right storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip committed Sep 6, 2024
1 parent 2fe8ba4 commit f659772
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions infrastructure/patch-nginx-in-namespaces.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
#
# Start a KK Shell session
#
# Syntax:
# dplsh [-p profile-name] [additional shell args]
#
set -euo pipefail

NAMESPACES=$(kubectl get ns -l lagoon.sh/controller=lagoon --no-headers | awk '{print $1}' )

for ns in $NAMESPACES; do
echo $ns
kubectl patch deployments.apps -n $ns nginx -p '{"spec":{"template":{"spec": {"volumes": [{"name": "nginx", "persistentVolumeClaim": { "claimName": "tmp-nginx"}}]}}}}'
done

0 comments on commit f659772

Please sign in to comment.