From 0021acc522b66d128b18f4589204f258dfebb147 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 30 Jan 2024 21:22:33 -0500 Subject: [PATCH] fix: talos customization multiline string and ansible raw/endraw (#1275) * chore: update readme and workflows Signed-off-by: Devin Buhl * fix: ansible templating Signed-off-by: Devin Buhl * fix: talos templating Signed-off-by: Devin Buhl --------- Signed-off-by: Devin Buhl --- .github/tests/config-talos.yaml | 2 +- .github/workflows/devcontainer.yaml | 1 + .github/workflows/e2e.yaml | 1 + .github/workflows/flux-diff.yaml | 1 + .github/workflows/kubeconform.yaml | 1 + .github/workflows/label-sync.yaml | 1 + .github/workflows/labeler.yaml | 1 + .github/workflows/lychee.yaml | 1 + .github/workflows/release.yaml | 1 + README.md | 2 +- .../templates/ansible/playbooks/tasks/version-check.yaml.j2 | 2 +- config.sample.yaml | 2 +- 12 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/tests/config-talos.yaml b/.github/tests/config-talos.yaml index 4d38ee395..6805a701b 100644 --- a/.github/tests/config-talos.yaml +++ b/.github/tests/config-talos.yaml @@ -22,7 +22,7 @@ cluster: schematics: enabled: true id: df491c50a5acc05b977ef00c32050e1ceb0df746e40b33c643ac8a9bfb7c7263 - customization: + customization: |- extraKernelArgs: - net.ifnames=0 systemExtensions: diff --git a/.github/workflows/devcontainer.yaml b/.github/workflows/devcontainer.yaml index 992c6b904..dbe1bf736 100644 --- a/.github/workflows/devcontainer.yaml +++ b/.github/workflows/devcontainer.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "devcontainer" on: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 311d4f056..dba32ada8 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "e2e" on: diff --git a/.github/workflows/flux-diff.yaml b/.github/workflows/flux-diff.yaml index 2d500bbe8..5e942518b 100644 --- a/.github/workflows/flux-diff.yaml +++ b/.github/workflows/flux-diff.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Flux Diff" on: diff --git a/.github/workflows/kubeconform.yaml b/.github/workflows/kubeconform.yaml index 54cba2c57..58a63cc17 100644 --- a/.github/workflows/kubeconform.yaml +++ b/.github/workflows/kubeconform.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Kubeconform" on: diff --git a/.github/workflows/label-sync.yaml b/.github/workflows/label-sync.yaml index c9b1c7eaf..90804e0af 100644 --- a/.github/workflows/label-sync.yaml +++ b/.github/workflows/label-sync.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Label Sync" on: diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 78fb12bf7..d658c1d96 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Labeler" on: diff --git a/.github/workflows/lychee.yaml b/.github/workflows/lychee.yaml index 1f9ea4a31..b2e414311 100644 --- a/.github/workflows/lychee.yaml +++ b/.github/workflows/lychee.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Lychee" on: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ffc67c6c6..fb943f8fa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,5 @@ --- +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json name: "Release" on: diff --git a/README.md b/README.md index 36b1eba1e..095aac1c3 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The features included will depend on the type of configuration you want to use. 2. **"Flux cluster"** - An addition to "**Bare cluster**" that deploys an opinionated implementation of [Flux](https://github.com/fluxcd/flux2) using [GitHub](https://github.com/) as Git provider and [sops](https://github.com/getsops/sops) to manage secrets. - - **Required:** Some knowledge of [Git](https://git-scm.com/) and its practices & terminology. + - **Required:** Some knowledge of [Git](https://git-scm.com/) practices & terminology. - **Components:** [flux](https://github.com/fluxcd/flux2), [cert-manager](https://github.com/cert-manager/cert-manager), [spegel](https://github.com/XenitAB/spegel), [reloader](https://github.com/stakater/Reloader), [system-upgrade-controller](https://github.com/rancher/system-upgrade-controller), and [openebs](https://github.com/openebs/openebs). 3. **"Flux cluster with Cloudflare"** - An addition to "**Flux cluster**" that provides DNS and SSL with [Cloudflare](https://www.cloudflare.com/). [Cloudflare Tunnel](https://www.cloudflare.com/products/tunnel/) is also included to provide external access to certain applications deployed in your cluster. diff --git a/bootstrap/templates/ansible/playbooks/tasks/version-check.yaml.j2 b/bootstrap/templates/ansible/playbooks/tasks/version-check.yaml.j2 index 24dd068c3..87ea13351 100644 --- a/bootstrap/templates/ansible/playbooks/tasks/version-check.yaml.j2 +++ b/bootstrap/templates/ansible/playbooks/tasks/version-check.yaml.j2 @@ -9,7 +9,7 @@ - name: Extract k3s version ansible.builtin.set_fact: - current_k3s_version: "{{ k3s_version.stdout | regex_replace('(?im)k3s version (?P[a-z0-9\\.\\+]+).*\n.*', '\\g') }}" + current_k3s_version: "{% raw %}{{ k3s_version.stdout | regex_replace('(?im)k3s version (?P[a-z0-9\\.\\+]+).*\n.*', '\\g') }}{% endraw %}" - name: Check if upgrades are allowed ansible.builtin.assert: diff --git a/config.sample.yaml b/config.sample.yaml index 19d63ef30..c3482b4d6 100644 --- a/config.sample.yaml +++ b/config.sample.yaml @@ -44,7 +44,7 @@ cluster: # id: "" # # (Required) Additional NodeConfigs to apply to all nodes # # See: https://budimanjojo.github.io/talhelper/latest/reference/configuration/#nodeconfigs - # customization: + # customization: |- # extraKernelArgs: # - net.ifnames=0 # systemExtensions: