-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yaml
51 lines (42 loc) · 1.61 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
51
---
version: "3"
dotenv:
- .env
tasks:
kube:up:
desc: Create the test cluster.
cmds:
- minikube start
- minikube addons enable metallb
- minikube addons enable ingress
- minikube addons enable metrics-server
- minikube addons enable dashboard
kube:deploy:
desc: Deploy the external-dns-mikrotik webhook to the test cluster.
cmds:
- kubectl create ns external-dns || true
- kubectl delete secret --namespace external-dns mikrotik-credentials || true
- kubectl create secret generic --namespace external-dns --from-env-file=.env mikrotik-credentials || true
- helm repo add external-dns https://kubernetes-sigs.github.io/external-dns && helm repo update
- helm upgrade --install --namespace external-dns external-dns external-dns/external-dns -f example/values.yaml
kube:logs:
desc: Fetch the logs from the external-dns-mikrotik webhook container to a local file.
cmd: kubectl -n external-dns logs deployments/external-dns-mikrotik webhook > logs.json
kube:clean:
desc: Remove the external-dns-mikrotik webhook from the test cluster.
cmds:
- kubectl delete ns external-dns || true
- kubectl delete -f example/records || true
- kubectl delete -f example/ingress || true
go:release:
desc: Run goreleaser in snapshot mode.
cmd: goreleaser release --snapshot --clean
go:build:
desc: Build the binary.
cmd: go build -o ./external-dns-provider-mikrotik .
go:test:
desc: Run tests.
cmd: go test -v ./... -race -covermode=atomic
go:lint:
desc: Run linter.
cmd: golangci-lint run --fix