feat: Add schema comments to patches

These comments ensure that we get proper yaml language server support
in the patch files.
Also fixes all the resulting language server errors.
This commit is contained in:
2026-02-20 04:52:08 +01:00
parent 940b01a7dc
commit 95de53206e
18 changed files with 30 additions and 9 deletions

View File

@@ -1,16 +1,20 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
cluster:
inlineManifests:
- name: cluster-variables
contents: |
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.34.1-standalone-strict/namespace.json
apiVersion: v1
kind: Namespace
metadata:
name: flux-system
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.34.1-standalone-strict/configmap.json
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-variables
namespace: flux-system
data:
cluster_env: {%- if node.cluster.production %} production {%- else %} staging {%- endif %}
cluster_env: "{%- if node.cluster.production %} production {%- else %} staging {%- endif %}"