Repository navigation
Expand file tree
/
Copy pathpixi.toml
More file actions
61 lines (51 loc) · 2.18 KB
/
Copy pathpixi.toml
File metadata and controls
61 lines (51 loc) · 2.18 KB
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
52
53
54
55
56
57
58
59
60
61
[workspace]
channels = ["conda-forge"]
name = "switchboard"
platforms = ["linux-64", "osx-arm64"]
[dependencies]
bats-core = "*"
helm-docs = "*"
kubernetes-client = "*"
kubernetes-helm = "*"
minikube = "*"
sed = "*"
yq = "*"
[feature.lint.dependencies]
golangci-lint = "*"
pre-commit = "*"
pre-commit-hooks = "*"
[environments]
default = ["lint"]
# ----------------------------------------------------------------------------------------------- #
# TASKS #
# ----------------------------------------------------------------------------------------------- #
[tasks]
docs = { cwd = "chart", cmd = """
helm-docs
sed -i -E '/cert-manager\\.installCRDs/d' README.md
sed -i -E '/external-dns\\.crd/d' README.md
sed -i -E '/external-dns\\.sources/d' README.md
""" }
lint = "golangci-lint run ./..."
run-controller = "go run cmd/main.go --config dev/config.yaml"
# ------------------------------------------- CLUSTER ------------------------------------------- #
cluster-create = "minikube start --profile switchboard"
cluster-setup = """
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.3/docs/content/reference/dynamic-configuration/traefik.io_ingressroutes.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.0/cert-manager.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/external-dns/v0.20.0/config/crd/standard/dnsendpoints.externaldns.k8s.io.yaml
kubectl wait -n cert-manager --for=condition=Available deployment --all --timeout=120s
kubectl apply -f dev/manifests/ca-secret.yaml
kubectl apply -f dev/manifests/tls-issuer.yaml
"""
cluster-teardown = "minikube delete --profile switchboard"
cluster-tunnel-lb = "minikube tunnel --profile switchboard"
# -------------------------------------------- TESTS -------------------------------------------- #
[tasks.test-coverage]
cmd = "go test ./... -coverprofile cover.out"
[tasks.test-e2e]
args = ["image_name", "image_tag"]
cmd = """
yq -yi '.image.name = \"{{ image_name }}\" | .image.tag = \"{{ image_tag }}\"' tests/config/switchboard.yaml
bats tests -t
"""