Skip to content

Allow users to change the default k8s schema#824

Open
someone-stole-my-name wants to merge 3 commits intoredhat-developer:mainfrom
someone-stole-my-name:main
Open

Allow users to change the default k8s schema#824
someone-stole-my-name wants to merge 3 commits intoredhat-developer:mainfrom
someone-stole-my-name:main

Conversation

@someone-stole-my-name
Copy link

What does this PR do?

Currently, there is no way to set the Kubernetes schema, it is hard-coded and a lot of internal magic depends on it. If you try to do it through the existing methods, i.e. a comment or an association, it offers a subpar experience with bad diagnostics and incomplete completion suggestions.

This PR exposes new notification to allow third party extensions and users to change the default Kubernetes schema on the fly and still get diagnostics and autocompletion from the LS.

What issues does this PR fix or reference?

#778

Add a new notification to allow users to change the default Kubernetes schema on the fly.
@coveralls
Copy link

coveralls commented Jan 3, 2023

Coverage Status

Coverage: 83.066% (+0.003%) from 83.063% when pulling a459479 on someone-stole-my-name:main into d3e36a3 on redhat-developer:main.

ricoberger added a commit to ricoberger/yaml-language-server that referenced this pull request Sep 9, 2025
Add an option to overwrite the default Kubernetes schema URL with a
custom one, by setting a `YAMLLS_KUBERNETES_SCHEMA_URL` environment
variable.

See
- redhat-developer#998
- redhat-developer#824
- redhat-developer#841
- redhat-developer#962
- redhat-developer#1050

Main use case is to use
https://github.com/ricoberger/kubernetes-json-schema, which contains the
schema for Kubernetes and the CRDs I'm using.
ricoberger added a commit to ricoberger/yaml-language-server that referenced this pull request Jan 7, 2026
Add an option to overwrite the default Kubernetes schema URL with a
custom one, by setting a `YAMLLS_KUBERNETES_SCHEMA_URL` environment
variable.

See
- redhat-developer#998
- redhat-developer#824
- redhat-developer#841
- redhat-developer#962
- redhat-developer#1050

Main use case is to use
https://github.com/ricoberger/kubernetes-json-schema, which contains the
schema for Kubernetes and the CRDs I'm using.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants