Skip to content

How do I change the Kubernetes schema in use? #4

@Makeshift

Description

@Makeshift

It seems that by default, helm-ls is using the schema for Kubernetes 1.22.4, specifically https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.22.4-standalone-strict/_definitions.json.

I've tried a few ways in my vscode settings.json to modify this, but none seem to work:

    "helm-ls.yamlls": {
        "enabled": true,
        "enabledForFilesGlob": "*.{yaml,yml}",
        "diagnosticsLimit": 50,
        "showDiagnosticsDirectly": false,
        "path": "yaml-language-server",
        "config": {
            "schemas": {
                "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.31.1-standalone-strict/_definitions.json": "templates/**"
            },
            "schemaStore": {
                "enable": true
            },
            "validate": true,
            "completion": true,
            "hover": true,
            "format": {
                "enable": true,
                "bracketSpacing": true,
                "proseWrap": "Preserve"
            },
            "keyOrdering": true
        }
    },

I also tried adding it to yaml-language-servers config directly:

    "yaml.schemas": {
        "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.31.1-standalone-strict/_definitions.json": "templates/**"
    },

Tried restarting vscode, reinstalling the extension, etc to see if I could get it to apply, but I feel like I have an incorrect config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions