2023-10-26 01:25:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
usage () {
|
|
|
|
echo "usage: $0 tag disk_filename"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2023-10-30 09:12:32 +00:00
|
|
|
[[ $# -eq 1 ]] || usage
|
2023-10-26 01:25:51 +00:00
|
|
|
tag="$1"
|
|
|
|
|
|
|
|
cd "$(dirname $0)"
|
|
|
|
|
|
|
|
sed "s!<TAG>!${tag}!" ./k8s/deployment.yaml.template > ./k8s/deployment.yaml
|
|
|
|
|
|
|
|
echo "Creating PVC..."
|
|
|
|
kubectl apply -f ./k8s/pvc.yaml
|
|
|
|
echo "Creating PDP deployment..."
|
|
|
|
kubectl apply -f ./k8s/deployment.yaml
|
|
|
|
echo "Creating services..."
|
|
|
|
for i in ./k8s/svc-*.yaml; do kubectl apply -f "$i"; done
|
2023-10-30 09:12:32 +00:00
|
|
|
echo "Done! Optionally, run ./misc/configure-metallb.sh to put the services on an external IP."
|