-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
49 lines (43 loc) · 1.4 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
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
vars:
# Directories
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
PRIVATE_DIR: "{{.ROOT_DIR}}/.private"
SCRIPTS_DIR: "{{.ROOT_DIR}}/scripts"
# Files
AGE_FILE: "{{.ROOT_DIR}}/age.key"
BOOTSTRAP_CONFIG_FILE: "{{.ROOT_DIR}}/config.yaml"
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
SOPS_CONFIG_FILE: "{{.ROOT_DIR}}/.sops.yaml"
env:
KUBECONFIG: "{{.KUBECONFIG_FILE}}"
PYTHONDONTWRITEBYTECODE: "1"
SOPS_AGE_KEY_FILE: "{{.AGE_FILE}}"
includes:
kubernetes: .taskfiles/Kubernetes
flux: .taskfiles/Flux
talos: .taskfiles/Talos
sops: .taskfiles/Sops
bootstrap: .taskfiles/Bootstrap
tasks:
default: task --list
.validate:
internal: true
cmds:
- task: kubernetes:kubeconform
- cmd: echo === Done rendering and validating YAML ===
- cmd: |
if [[ $KUBECONFIG != "{{.KUBECONFIG_FILE}}" ]]; then
echo WARNING: KUBECONFIG is not set to the expected value, this may cause conflicts.
fi
- cmd: |
if [[ $SOPS_AGE_KEY_FILE != "{{.AGE_FILE}}" ]]; then
echo WARNING: SOPS_AGE_KEY_FILE is not set to the expected value, this may cause conflicts.
fi
- cmd: |
if test -f ~/.config/sops/age/keys.txt; then
echo WARNING: SOPS Age key found in home directory, this may cause conflicts.
fi
silent: true