-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
50 lines (44 loc) · 1.36 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
version: 3
# Load environment variables from the .env file
dotenv: [".env"]
tasks:
# Default task to list all available tasks
default:
desc: List all tasks
cmds:
- task -a
# Bootstrap a Kind cluster
kind:bootstrap:
desc: Bootstrap a Kind cluster with required components
cmds:
- task: kind:create
- task: apply:regcred
- task: flux_bootstrap
# Create a Kind cluster
kind:create:
desc: Create a Kind cluster
cmds:
- kind delete cluster --name toledo-local
- kind create cluster --config kind-cluster-config.yaml --name toledo-local
- kubectl cluster-info --context kind-toledo-local
dir: ./infra/kind
# Bootstrap Flux for GitHub integration
flux_bootstrap:
desc: Bootstrap Flux for GitHub
cmds:
- |
flux install
export GITHUB_TOKEN=$GH_TOKEN && \
flux bootstrap github \
--owner=$GH_USER \
--repository=$GH_REPO \
--branch=main \
--path=./k8s/clusters/$PLATFORM \
--token=$GH_TOKEN \
--personal
# Create a Docker registry credential
apply:regcred:
desc: Create a Docker registry credential secret
cmds:
- kubectl create secret docker-registry regcred --docker-server=ghcr.io/$GH_USER --docker-username=$GH_USER --docker-password=$GH_TOKEN --dry-run=client -oyaml | kubectl apply -f -