From 5b0c165dc8297967bd323e793acf9d086bb25c20 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Tue, 28 Jun 2022 12:44:41 -0700 Subject: [PATCH] fix usage of base64 in hack script --- hack/prepare-supervisor-on-kind.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hack/prepare-supervisor-on-kind.sh b/hack/prepare-supervisor-on-kind.sh index 6a573b1c..a56e5970 100755 --- a/hack/prepare-supervisor-on-kind.sh +++ b/hack/prepare-supervisor-on-kind.sh @@ -254,6 +254,13 @@ EOF --dry-run=client --output yaml | kubectl apply -f - fi +if [[ "$OSTYPE" == "darwin"* ]]; then + certificateAuthorityData=$(cat "$root_ca_crt_path" | base64) +else + # Linux base64 requires an extra flag to keep the output on one line. + certificateAuthorityData=$(cat "$root_ca_crt_path" | base64 -w 0) +fi + # Make a JWTAuthenticator which respects JWTs from the Supervisor's issuer. # The issuer URL must be accessible from within the cluster for OIDC discovery. cat <