mirror of
https://github.com/enix/x509-certificate-exporter.git
synced 2026-02-14 10:00:00 +00:00
27 lines
523 B
Bash
Executable File
27 lines
523 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script should be somewhat idempotent
|
|
|
|
[ -d hack ] || {
|
|
echo "Run this script from the project root with: ./hack/$(basename $0)" >&2
|
|
exit 1
|
|
}
|
|
|
|
set -xe
|
|
|
|
. .env
|
|
|
|
# create the Kind cluster
|
|
C="${KIND_NAME:-x509}"
|
|
kind create cluster -n "$C" || true
|
|
CTX="kind-$C"
|
|
K="kubectl --context $CTX"
|
|
$K cluster-info
|
|
|
|
# wait for nodes to be Ready
|
|
$K wait --timeout=1h --for=condition=Ready=true node -l node-role.kubernetes.io/control-plane
|
|
sleep 2
|
|
|
|
# get kubeconfig
|
|
kind get kubeconfig --name $C > kubeconfig.yaml
|