22 lines
733 B
Bash
22 lines
733 B
Bash
#!/bin/bash
|
|
|
|
if [ -z "$(ENV)" ]; then \
|
|
echo "Error: ENV variable is not defined. Please set to one of development|staging|production"; exit 1; \
|
|
fi
|
|
|
|
## this way is annoying because deployment asks for git password
|
|
# flux bootstrap git \
|
|
# --kubeconfig /home/cj/.kube/vke.yaml \
|
|
# --url=https://gitea.futureporn.net/futureporn/fp.git \
|
|
# --branch=main \
|
|
# --username=cj_clippy \
|
|
# --token-auth=true \
|
|
# --path=clusters/production
|
|
|
|
## this way is more automatic although it does ask for yes/no confirmation that the ssh key has repo access
|
|
flux bootstrap git \
|
|
--yes \
|
|
--url="ssh://git@gitea.futureporn.net:2222/futureporn/fp" \
|
|
--branch=main \
|
|
--path="clusters/$ENV" \
|
|
--private-key-file=/home/cj/.ssh/fp-flux |