From f893ad5eb24133750e0bb1a9bc1bc8be25620c3c Mon Sep 17 00:00:00 2001 From: Pudong Zheng Date: Fri, 4 Mar 2022 21:14:34 +0000 Subject: [PATCH] [core-dev] change registry-facade PodSecurityPolicy --- .werft/jobs/build/installer/post-process.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.werft/jobs/build/installer/post-process.sh b/.werft/jobs/build/installer/post-process.sh index c852e778ffc381..5ec478cc288c46 100755 --- a/.werft/jobs/build/installer/post-process.sh +++ b/.werft/jobs/build/installer/post-process.sh @@ -308,6 +308,13 @@ while [ "$documentIndex" -le "$DOCS" ]; do yq w -i k8s.yaml -d "$documentIndex" spec.suspend "true" fi + # change registry-facade PodSecurityPolicy + NAMESPACE=$(kubens -c) + if [[ "$NAMESPACE-ns-registry-facade" == "$NAME" ]] && [[ "$KIND" == "PodSecurityPolicy" ]]; then + yq w -i k8s.yaml -d "$documentIndex" spec.hostPorts[0].min "$REG_DAEMON_PORT" + yq w -i k8s.yaml -d "$documentIndex" spec.hostPorts[0].max "$REG_DAEMON_PORT" + fi + # Uncomment to change or remove resources from the configmap which can be used to uninstall Gitpod # There are a couple use cases where you may want to do this: # 1. We don't want to uninstall a shared resource that is needed by other preview env namespaces