From 7f3d807c5d9a06a0770273548fda6aa1ab1a04c3 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 28 Aug 2024 13:18:11 +0200 Subject: [PATCH] script to patch the metadata so lagoon will recognize the pvc's --- infrastructure/patch-pvc-metadata.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 infrastructure/patch-pvc-metadata.sh diff --git a/infrastructure/patch-pvc-metadata.sh b/infrastructure/patch-pvc-metadata.sh new file mode 100755 index 00000000..f7831ff5 --- /dev/null +++ b/infrastructure/patch-pvc-metadata.sh @@ -0,0 +1,20 @@ +#!/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 -n $ns pvc nginx -p '{ + "metadata": { + "annotations": { + "kubectl.kubernetes.io/last-applied-configuration": null + } + } + }' || true +done