Compare commits

..

2 Commits

Author SHA1 Message Date
7b29763230 feat: Add yaml schema pre-commit check to patches 2026-02-20 05:21:59 +01:00
95de53206e 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.
2026-02-20 05:19:59 +01:00
19 changed files with 35 additions and 8 deletions

View File

@@ -12,6 +12,12 @@ repos:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
- repo: https://github.com/jmlrt/check-yamlschema
rev: v0.0.7
hooks:
- id: check-yamlschema
files: ^patches/.*\.yaml$
- repo: https://github.com/crate-ci/typos - repo: https://github.com/crate-ci/typos
rev: v1.40.0 rev: v1.40.0
hooks: hooks:

View File

@@ -1,2 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
cluster: cluster:
allowSchedulingOnControlPlanes: true allowSchedulingOnControlPlanes: true

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
features: features:
hostDNS: hostDNS:

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: cluster:
inlineManifests: inlineManifests:
- name: cluster-variables - name: cluster-variables
contents: | 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 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: flux-system 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 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: cluster-variables name: cluster-variables
namespace: flux-system namespace: flux-system
data: data:
cluster_env: {%- if node.cluster.production %} production {%- else %} staging {%- endif %} cluster_env: "{%- if node.cluster.production %} production {%- else %} staging {%- endif %}"

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
cluster: cluster:
extraManifests: extraManifests:
- https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/standard-install.yaml - https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/standard-install.yaml

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
network: network:
hostname: {{node.hostname}} hostname: "{{node.hostname}}"

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
install: install:
disk: {{node.installDisk}} disk: "{{node.installDisk}}"

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
apiVersion: v1alpha1 apiVersion: v1alpha1
kind: VolumeConfig kind: VolumeConfig
name: EPHEMERAL name: EPHEMERAL

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
apiVersion: v1alpha1 apiVersion: v1alpha1
kind: UserVolumeConfig kind: UserVolumeConfig
name: local-path-provisioner name: local-path-provisioner

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
apiVersion: v1alpha1 apiVersion: v1alpha1
kind: UserVolumeConfig kind: UserVolumeConfig
name: longhorn name: longhorn

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
kubelet: kubelet:
extraMounts: extraMounts:

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
cluster: cluster:
extraManifests: extraManifests:
- https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/main/deploy/standalone-install.yaml - https://raw.githubusercontent.com/alex1989hu/kubelet-serving-cert-approver/main/deploy/standalone-install.yaml

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
kubelet: kubelet:
extraArgs: extraArgs:

View File

@@ -1,10 +1,11 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
network: network:
interfaces: interfaces:
- interface: {{node.interface}} - interface: "{{node.interface}}"
dhcp: false dhcp: false
addresses: addresses:
- {{node.ip}} - "{{node.ip}}"
routes: routes:
- network: 0.0.0.0/0 - network: 0.0.0.0/0
gateway: {{node.gateway}} gateway: "{{node.gateway}}"

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
# This is only needed on nodes that will have storage # This is only needed on nodes that will have storage
sysctls: sysctls:

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
cluster: cluster:
inlineManifests: inlineManifests:
- name: sops-key - name: sops-key

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
files: files:
- path: /etc/cri/conf.d/20-customization.part - path: /etc/cri/conf.d/20-customization.part

View File

@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
apiVersion: v1alpha1 apiVersion: v1alpha1
kind: ExtensionServiceConfig kind: ExtensionServiceConfig
name: tailscale name: tailscale

View File

@@ -1,6 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siderolabs/talos/refs/heads/release-1.11/website/content/v1.11/schemas/config.schema.json
machine: machine:
network: network:
interfaces: interfaces:
- interface: {{node.interface}} - interface: "{{node.interface}}"
vip: vip:
ip: {{node.cluster.controlPlaneIp}} ip: "{{node.cluster.controlPlaneIp}}"