mirror of
https://github.com/seemueller-io/cluster.git
synced 2025-09-08 22:56:46 +00:00
Development environment functions
This commit is contained in:
16
packages/scripts/trust_cluster_cert.sh
Normal file
16
packages/scripts/trust_cluster_cert.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
CERT_PATH="/tmp/kind-cluster.crt"
|
||||
|
||||
echo "Getting cluster certificate from Kubernetes secret..."
|
||||
kubectl get secret zitadel-tls -n default -o jsonpath='{.data.tls\.crt}' | base64 -d > "${CERT_PATH}"
|
||||
|
||||
if [ ! -f "${CERT_PATH}" ]; then
|
||||
echo "Error: Certificate file ${CERT_PATH} not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Adding certificate to macOS keychain..."
|
||||
# macos specific
|
||||
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "${CERT_PATH}"
|
||||
echo "Certificate successfully added to keychain"
|
Reference in New Issue
Block a user