From 7da7b3ea8e34d0a2bb1861f59c691383556a120c Mon Sep 17 00:00:00 2001 From: Michael Barroco Date: Wed, 26 Apr 2023 22:11:52 +0200 Subject: [PATCH] Keep backward compatibility --- build/apply-certs.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/apply-certs.sh b/build/apply-certs.sh index 141247c5a..32403eecc 100755 --- a/build/apply-certs.sh +++ b/build/apply-certs.sh @@ -44,7 +44,10 @@ kubectl delete secret cockroachdb.ca.crt --namespace "$NAMESPACE" --context "$C kubectl delete secret cockroachdb.ca.key --namespace "$NAMESPACE" --context "$CONTEXT" || true kubectl delete secret dss.public.certs --namespace "$NAMESPACE" --context "$CONTEXT" || true -kubectl create secret generic cockroachdb.client.root --namespace "$NAMESPACE" --from-file "$CLIENTS_CERTS_DIR" --context "$CONTEXT" +kubectl create secret generic cockroachdb.client.root --namespace default --from-file "$CLIENTS_CERTS_DIR" --context "$CONTEXT" +if [[ $NAMESPACE != "default" ]]; then + kubectl create secret generic cockroachdb.client.root --namespace "$NAMESPACE" --from-file "$CLIENTS_CERTS_DIR" --context "$CONTEXT" +fi kubectl create secret generic cockroachdb.node --namespace "$NAMESPACE" --from-file "$NODE_CERTS_DIR" --context "$CONTEXT" # The ca key is not needed for any typical operations, but might be required to sign new certificates. $UPLOAD_CA_KEY && kubectl create secret generic cockroachdb.ca.key --namespace "$NAMESPACE" --from-file "$CA_KEY_DIR" --context "$CONTEXT"