fix: update taskfiles and renovate config
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
4 files changed
+65
-105
No files matched your search
+17
-28
@@ -12,36 +12,25 @@
|
|||||||
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
|
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
|
||||||
"suppressNotifications": ["prEditedNotification", "prIgnoreNotification"],
|
"suppressNotifications": ["prEditedNotification", "prIgnoreNotification"],
|
||||||
"rebaseWhen": "conflicted",
|
"rebaseWhen": "conflicted",
|
||||||
"schedule": ["on saturday"],
|
"schedule": ["every weekend"],
|
||||||
|
"ignorePaths": ["**/*.sops.*"],
|
||||||
"flux": {
|
"flux": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"]
|
||||||
"(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"helm-values": {
|
"helm-values": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"]
|
||||||
"(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"helmfile": {
|
"helmfile": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)helmfile\\.ya?ml(?:\\.j2)?$"]
|
||||||
"(^|/)helmfile\\.ya?ml(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"kubernetes": {
|
"kubernetes": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"]
|
||||||
"(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"kustomize": {
|
"kustomize": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)kustomization\\.ya?ml(?:\\.j2)?$"]
|
||||||
"(^|/)kustomization\\.ya?ml(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"pip_requirements": {
|
"pip_requirements": {
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)[\\w-]*requirements(-\\w+)?\\.(txt|pip)(?:\\.j2)?$"]
|
||||||
"(^|/)[\\w-]*requirements(-\\w+)?\\.(txt|pip)(?:\\.j2)?$"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
// commit message topics
|
// commit message topics
|
||||||
"commitMessageTopic": "{{depName}}",
|
"commitMessageTopic": "{{depName}}",
|
||||||
@@ -62,7 +51,7 @@
|
|||||||
{
|
{
|
||||||
"description": ["Flux Group"],
|
"description": ["Flux Group"],
|
||||||
"groupName": "Flux",
|
"groupName": "Flux",
|
||||||
"matchPackagePatterns": ["flux"],
|
"matchPackagePatterns": ["fluxcd"],
|
||||||
"matchDatasources": ["docker", "github-tags"],
|
"matchDatasources": ["docker", "github-tags"],
|
||||||
"versioning": "semver",
|
"versioning": "semver",
|
||||||
"group": {
|
"group": {
|
||||||
@@ -71,10 +60,13 @@
|
|||||||
"separateMinorPatch": true
|
"separateMinorPatch": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": ["System Upgrade Controller Group"],
|
"description": ["Talos Group"],
|
||||||
"groupName": "System Upgrade Controller",
|
"groupName": "Talos",
|
||||||
"matchPackagePatterns": ["system-upgrade-controller"],
|
"matchPackagePatterns": [
|
||||||
"matchDatasources": ["docker", "github-releases"],
|
"siderolabs/talosctl",
|
||||||
|
"siderolabs/installer"
|
||||||
|
],
|
||||||
|
"matchDatasources": ["docker"],
|
||||||
"group": {
|
"group": {
|
||||||
"commitMessageTopic": "{{{groupName}}} group"
|
"commitMessageTopic": "{{{groupName}}} group"
|
||||||
},
|
},
|
||||||
@@ -199,10 +191,7 @@
|
|||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": ["Process custom dependencies"],
|
"description": ["Process custom dependencies"],
|
||||||
"fileMatch": [
|
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"],
|
||||||
"(^|/).taskfiles/.+\\.ya?ml$",
|
|
||||||
"(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"
|
|
||||||
],
|
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
// # renovate: datasource=helm depName=cilium repository=https://helm.cilium.io
|
// # renovate: datasource=helm depName=cilium repository=https://helm.cilium.io
|
||||||
// version: 1.15.1
|
// version: 1.15.1
|
||||||
|
|||||||
@@ -2,9 +2,6 @@
|
|||||||
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
# yaml-language-server: $schema=https://taskfile.dev/schema.json
|
||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
vars:
|
|
||||||
SOPS_CONFIG_FILE: "{{.ROOT_DIR}}/.sops.yaml"
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
age-keygen:
|
age-keygen:
|
||||||
@@ -13,7 +10,7 @@ tasks:
|
|||||||
status: ["test -f {{.AGE_FILE}}"]
|
status: ["test -f {{.AGE_FILE}}"]
|
||||||
|
|
||||||
encrypt:
|
encrypt:
|
||||||
desc: Encrypt all Kubernetes SOPS secrets that are not already encrypted
|
desc: Encrypt all Kubernetes SOPS secrets
|
||||||
cmds:
|
cmds:
|
||||||
- for: { var: file }
|
- for: { var: file }
|
||||||
task: .encrypt-file
|
task: .encrypt-file
|
||||||
@@ -21,10 +18,7 @@ tasks:
|
|||||||
file: "{{.ITEM}}"
|
file: "{{.ITEM}}"
|
||||||
vars:
|
vars:
|
||||||
file:
|
file:
|
||||||
sh: |
|
sh: find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \;
|
||||||
if [ -d "{{.KUBERNETES_DIR}}" ]; then
|
|
||||||
find "{{.KUBERNETES_DIR}}" -type f -name "*.sops.*" -exec grep -L "ENC\[AES256_GCM" {} \;
|
|
||||||
fi
|
|
||||||
|
|
||||||
.encrypt-file:
|
.encrypt-file:
|
||||||
internal: true
|
internal: true
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ vars:
|
|||||||
TALOS_DIR: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
TALOS_DIR: "{{.KUBERNETES_DIR}}/bootstrap/talos"
|
||||||
TALHELPER_SECRET_FILE: "{{.TALOS_DIR}}/talsecret.sops.yaml"
|
TALHELPER_SECRET_FILE: "{{.TALOS_DIR}}/talsecret.sops.yaml"
|
||||||
TALHELPER_CONFIG_FILE: "{{.TALOS_DIR}}/talconfig.yaml"
|
TALHELPER_CONFIG_FILE: "{{.TALOS_DIR}}/talconfig.yaml"
|
||||||
|
HELMFILE_FILE: "{{.TALOS_DIR}}/helmfile.yaml"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TALOSCONFIG: "{{.TALOS_DIR}}/clusterconfig/talosconfig"
|
TALOSCONFIG: "{{.TALOS_DIR}}/clusterconfig/talosconfig"
|
||||||
@@ -16,66 +17,45 @@ tasks:
|
|||||||
desc: Bootstrap the Talos cluster
|
desc: Bootstrap the Talos cluster
|
||||||
dir: "{{.TALOS_DIR}}"
|
dir: "{{.TALOS_DIR}}"
|
||||||
cmds:
|
cmds:
|
||||||
- task: bootstrap-gensecret
|
- |
|
||||||
- task: bootstrap-genconfig
|
if [ ! -f "{{.TALHELPER_SECRET_FILE}}" ]; then
|
||||||
- task: bootstrap-apply
|
talhelper gensecret > {{.TALHELPER_SECRET_FILE}}
|
||||||
- task: bootstrap-install
|
sops --encrypt --in-place {{.TALHELPER_SECRET_FILE}}
|
||||||
- task: fetch-kubeconfig
|
fi
|
||||||
- task: bootstrap-apps
|
- talhelper genconfig --secret-file {{.TALHELPER_SECRET_FILE}}
|
||||||
- talosctl health --server=false
|
- talhelper gencommand apply --extra-flags=--insecure | bash
|
||||||
|
|
||||||
bootstrap-gensecret:
|
|
||||||
desc: Generate the Talos secrets
|
|
||||||
dir: "{{.TALOS_DIR}}"
|
|
||||||
cmds:
|
|
||||||
- talhelper gensecret > {{.TALHELPER_SECRET_FILE}}
|
|
||||||
- task: :sops:.encrypt-file
|
|
||||||
vars:
|
|
||||||
file: "{{.TALHELPER_SECRET_FILE}}"
|
|
||||||
status: ["test -f {{.TALHELPER_SECRET_FILE}}"]
|
|
||||||
preconditions:
|
|
||||||
- msg: Missing talhelper config file
|
|
||||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
|
||||||
|
|
||||||
bootstrap-genconfig:
|
|
||||||
desc: Generate the Talos configs
|
|
||||||
dir: "{{.TALOS_DIR}}"
|
|
||||||
cmd: talhelper genconfig --secret-file {{.TALHELPER_SECRET_FILE}}
|
|
||||||
preconditions:
|
|
||||||
- msg: Missing talhelper config file
|
|
||||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
|
||||||
- msg: Missing talhelper secret file
|
|
||||||
sh: test -f {{.TALHELPER_SECRET_FILE}}
|
|
||||||
|
|
||||||
bootstrap-apply:
|
|
||||||
desc: Apply the Talos configs to the nodes
|
|
||||||
dir: "{{.TALOS_DIR}}"
|
|
||||||
cmd: talhelper gencommand apply --extra-flags=--insecure | bash
|
|
||||||
preconditions:
|
|
||||||
- msg: Missing talhelper config file
|
|
||||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
|
||||||
|
|
||||||
bootstrap-install:
|
|
||||||
desc: Install the Talos cluster
|
|
||||||
dir: "{{.TALOS_DIR}}"
|
|
||||||
cmds:
|
|
||||||
- echo "Installing Talos... ignore the errors and be patient"
|
|
||||||
- until talhelper gencommand bootstrap | bash; do sleep 10; done
|
- until talhelper gencommand bootstrap | bash; do sleep 10; done
|
||||||
- sleep 10
|
- task: fetch-kubeconfig
|
||||||
|
- task: install-helm-apps
|
||||||
|
- talosctl health --server=false
|
||||||
|
preconditions:
|
||||||
|
- msg: Missing talhelper config file
|
||||||
|
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
||||||
|
- msg: Missing Sops config file
|
||||||
|
sh: test -f {{.SOPS_CONFIG_FILE}}
|
||||||
|
- msg: Missing Sops Age key file
|
||||||
|
sh: test -f {{.AGE_FILE}}
|
||||||
|
|
||||||
|
fetch-kubeconfig:
|
||||||
|
desc: Fetch kubeconfig
|
||||||
|
dir: "{{.TALOS_DIR}}"
|
||||||
|
cmd: until talhelper gencommand kubeconfig --extra-flags "{{.ROOT_DIR}} --force" | bash; do sleep 10; done
|
||||||
preconditions:
|
preconditions:
|
||||||
- msg: Missing talhelper config file
|
- msg: Missing talhelper config file
|
||||||
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
sh: test -f {{.TALHELPER_CONFIG_FILE}}
|
||||||
|
|
||||||
bootstrap-apps:
|
install-helm-apps:
|
||||||
desc: Bootstrap core apps needed for Talos
|
desc: Bootstrap core apps needed for Talos
|
||||||
dir: "{{.TALOS_DIR}}"
|
dir: "{{.TALOS_DIR}}"
|
||||||
cmds:
|
cmds:
|
||||||
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready=False nodes --all --timeout=600s; do sleep 10; done
|
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready=False nodes --all --timeout=600s; do sleep 10; done
|
||||||
- helmfile --kubeconfig {{.KUBECONFIG_FILE}} --file helmfile.yaml apply --skip-diff-on-install --suppress-diff
|
- helmfile --kubeconfig {{.KUBECONFIG_FILE}} --file {{.HELMFILE_FILE}} apply --skip-diff-on-install --suppress-diff
|
||||||
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready nodes --all --timeout=600s; do sleep 10; done
|
- until kubectl --kubeconfig {{.KUBECONFIG_FILE}} wait --for=condition=Ready nodes --all --timeout=600s; do sleep 10; done
|
||||||
preconditions:
|
preconditions:
|
||||||
- msg: Missing kubeconfig
|
- msg: Missing kubeconfig
|
||||||
sh: test -f {{.KUBECONFIG_FILE}}
|
sh: test -f {{.KUBECONFIG_FILE}}
|
||||||
|
- msg: Missing helmfile
|
||||||
|
sh: test -f {{.HELMFILE_FILE}}
|
||||||
|
|
||||||
upgrade-talos:
|
upgrade-talos:
|
||||||
desc: Upgrade talos on a node
|
desc: Upgrade talos on a node
|
||||||
@@ -95,13 +75,8 @@ tasks:
|
|||||||
- msg: Node not found
|
- msg: Node not found
|
||||||
sh: talosctl --nodes {{.node}} get machineconfig
|
sh: talosctl --nodes {{.node}} get machineconfig
|
||||||
|
|
||||||
fetch-kubeconfig:
|
|
||||||
desc: Generate talos kubeconfig
|
|
||||||
dir: "{{.TALOS_DIR}}"
|
|
||||||
cmd: until talhelper gencommand kubeconfig --extra-flags "{{.ROOT_DIR}} --force" | bash; do sleep 10; done
|
|
||||||
|
|
||||||
nuke:
|
nuke:
|
||||||
desc: Resets nodes back to maintenance mode so you can re-deploy again straight after
|
desc: Resets nodes back to maintenance mode
|
||||||
prompt: This will destroy your cluster and reset the nodes back to maintenance mode... continue?
|
prompt: This will destroy your cluster and reset the nodes back to maintenance mode... continue?
|
||||||
dir: "{{.TALOS_DIR}}"
|
dir: "{{.TALOS_DIR}}"
|
||||||
cmd: talhelper gencommand reset --extra-flags "--reboot {{- if eq .CLI_FORCE false }}--system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL{{ end }} --graceful=false --wait=false" | bash
|
cmd: talhelper gencommand reset --extra-flags "--reboot {{- if eq .CLI_FORCE false }}--system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL{{ end }} --graceful=false --wait=false" | bash
|
||||||
|
|||||||
+18
-16
@@ -14,6 +14,7 @@ vars:
|
|||||||
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
|
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
|
||||||
MAKEJINJA_CONFIG_FILE: "{{.ROOT_DIR}}/makejinja.toml"
|
MAKEJINJA_CONFIG_FILE: "{{.ROOT_DIR}}/makejinja.toml"
|
||||||
PIP_REQUIREMENTS_FILE: "{{.ROOT_DIR}}/requirements.txt"
|
PIP_REQUIREMENTS_FILE: "{{.ROOT_DIR}}/requirements.txt"
|
||||||
|
SOPS_CONFIG_FILE: "{{.ROOT_DIR}}/.sops.yaml"
|
||||||
# Binaries
|
# Binaries
|
||||||
PYTHON_BIN: python3
|
PYTHON_BIN: python3
|
||||||
|
|
||||||
@@ -24,23 +25,19 @@ env:
|
|||||||
VIRTUAL_ENV: "{{.ROOT_DIR}}/.venv"
|
VIRTUAL_ENV: "{{.ROOT_DIR}}/.venv"
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
kubernetes:
|
kubernetes: .taskfiles/Kubernetes
|
||||||
aliases: ["k8s"]
|
flux: .taskfiles/Flux
|
||||||
taskfile: .taskfiles/Kubernetes/Taskfile.yaml
|
repository: .taskfiles/Repository
|
||||||
flux: .taskfiles/Flux/Taskfile.yaml
|
talos: .taskfiles/Talos
|
||||||
repository:
|
sops: .taskfiles/Sops
|
||||||
aliases: ["repo"]
|
workstation: .taskfiles/Workstation
|
||||||
taskfile: .taskfiles/Repository/Taskfile.yaml
|
|
||||||
talos: .taskfiles/Talos/Taskfile.yaml
|
|
||||||
sops: .taskfiles/Sops/Taskfile.yaml
|
|
||||||
workstation: .taskfiles/Workstation/Taskfile.yaml
|
|
||||||
user:
|
user:
|
||||||
taskfile: .taskfiles/User
|
taskfile: .taskfiles/User
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
default: task -l
|
default: task --list
|
||||||
|
|
||||||
init:
|
init:
|
||||||
desc: Initialize configuration files
|
desc: Initialize configuration files
|
||||||
@@ -49,7 +46,8 @@ tasks:
|
|||||||
- cmd: echo === Configuration file copied ===
|
- cmd: echo === Configuration file copied ===
|
||||||
- cmd: echo Proceed with updating the configuration files...
|
- cmd: echo Proceed with updating the configuration files...
|
||||||
- cmd: echo {{.BOOTSTRAP_CONFIG_FILE}}
|
- cmd: echo {{.BOOTSTRAP_CONFIG_FILE}}
|
||||||
status: ["test -f {{.BOOTSTRAP_CONFIG_FILE}}"]
|
status:
|
||||||
|
- test -f {{.BOOTSTRAP_CONFIG_FILE}}
|
||||||
silent: true
|
silent: true
|
||||||
|
|
||||||
configure:
|
configure:
|
||||||
@@ -65,10 +63,14 @@ tasks:
|
|||||||
internal: true
|
internal: true
|
||||||
cmd: "{{.VIRTUAL_ENV}}/bin/makejinja"
|
cmd: "{{.VIRTUAL_ENV}}/bin/makejinja"
|
||||||
preconditions:
|
preconditions:
|
||||||
- { msg: "Missing virtual environment", sh: "test -d {{.VIRTUAL_ENV}}" }
|
- msg: Missing virtual environment
|
||||||
- { msg: "Missing Makejinja config file", sh: "test -f {{.MAKEJINJA_CONFIG_FILE}}" }
|
sh: test -d {{.VIRTUAL_ENV}}
|
||||||
- { msg: "Missing Makejinja plugin file", sh: "test -f {{.BOOTSTRAP_DIR}}/scripts/plugin.py" }
|
- msg: Missing Makejinja config file
|
||||||
- { msg: "Missing bootstrap config file", sh: "test -f {{.BOOTSTRAP_CONFIG_FILE}}" }
|
sh: test -f {{.MAKEJINJA_CONFIG_FILE}}
|
||||||
|
- msg: Missing Makejinja plugin file
|
||||||
|
sh: test -f {{.BOOTSTRAP_DIR}}/scripts/plugin.py
|
||||||
|
- msg: Missing bootstrap config file
|
||||||
|
sh: test -f {{.BOOTSTRAP_CONFIG_FILE}}
|
||||||
|
|
||||||
.validate:
|
.validate:
|
||||||
internal: true
|
internal: true
|
||||||
|
|||||||
Reference in new issue
Block a user