-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTaskfile.yaml
55 lines (49 loc) · 1.46 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
52
53
54
55
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
vars:
KUBECONFORM_SCRIPT: "{{.SCRIPTS_DIR}}/kubeconform.sh"
tasks:
apply-ks:
desc: Apply a Argo KS for a cluster [PATH=required]
cmd: >
kubectl apply --namespace argo-system --server-side -f {{.KUBERNETES_DIR}}/apps/{{.PATH}}/ks.yaml
requires:
vars: [PATH]
vars:
KS:
sh: argocd app get --namespace argo-system {{base .PATH}} 2>&1
preconditions:
- test -f {{.KUBERNETES_DIR}}/apps/{{.PATH}}/ks.yaml
- which argocd kubectl yq
reconcile:
desc: Force update Argo to pull in changes from your Git repository
cmd: argocd app sync cluster --namespace argo-system
preconditions:
- test -f {{.KUBECONFIG}}
- which argocd
kubeconform:
desc: Validate Kubernetes manifests with kubeconform
cmd: bash {{.KUBECONFORM_SCRIPT}} {{.KUBERNETES_DIR}}
preconditions:
- test -f {{.KUBECONFORM_SCRIPT}}
- which kubeconform
resources:
desc: Gather common resources in your cluster, useful when asking for support
cmds:
- for: { var: RESOURCE }
cmd: kubectl get {{.ITEM}} {{.CLI_ARGS | default "-A"}}
vars:
RESOURCE: >-
nodes
gitrepositories
kustomizations
helmrepositories
helmreleases
certificates
certificaterequests
ingresses
pods
preconditions:
- test -f {{.KUBECONFIG}}
- which kubectl