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,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,4 +1,5 @@
# 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:
rotate-server-certificates: true rotate-server-certificates: "true"

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}}"