Files
my-rook-config/tests/scripts/webhook-patch-ca-bundle.sh
T

16 lines
470 B
Bash
Raw Normal View History

#!/bin/bash
# Original script found at: https://github.com/morvencao/kube-mutating-webhook-tutorial/blob/master/deployment/webhook-patch-ca-bundle.sh
set -o errexit
set -o nounset
set -o pipefail
2021-08-06 12:01:57 +05:30
CA_BUNDLE=$(kubectl get configmap -n kube-system extension-apiserver-authentication -o=jsonpath='{.data.client-ca-file}' | base64 | tr -d '\n')
export CA_BUNDLE
if command -v envsubst >/dev/null 2>&1; then
envsubst
else
sed -e "s|\${CA_BUNDLE}|${CA_BUNDLE}|g"
fi