fp/scripts/flux-bootstrap.sh

26 lines
727 B
Bash
Raw Normal View History

2024-05-28 05:17:49 +00:00
#!/bin/bash
2024-06-28 23:23:04 +00:00
if [ -z "${ENV}" ]; then \
echo "Error: ENV variable is not defined. Please set to one of development|staging|production"; exit 1; \
fi
2024-06-29 03:45:22 +00:00
if [ "${ENV}" == "development" ]; then \
echo "Flux is not used in development environment. Skipping."
exit 0
fi
2024-06-17 17:46:32 +00:00
# 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
2024-06-28 23:23:04 +00:00
## --silent avoids the [Yes|no] prompt
2024-05-28 05:17:49 +00:00
flux bootstrap git \
2024-06-28 23:23:04 +00:00
--silent \
2024-07-14 06:01:44 +00:00
--url="ssh://git@gitea.futureporn.net:2222/futureporn/fp" \
2024-05-28 05:17:49 +00:00
--branch=main \
2024-07-14 06:01:44 +00:00
--path="flux/clusters/$ENV" \
2024-06-17 17:46:32 +00:00
--private-key-file=/home/cj/.ssh/fp-flux