Open Makeshift opened 3 days ago
In the Helm Language Server logs, I can see the schema map I put in, but I think it's being overwritten by the default internal 'kubernetes' one:
{"level":"info","msg":"Workspace configuration: {{true *.{yaml,yml} \u003cbtree:[\u003csuper\u003e\u003c-\u003ctext:`.`\u003e-\u003e\u003cany_of:[\u003ctext:`yaml`\u003e,\u003ctext:`yml`\u003e]\u003e]\u003e yaml-language-server 50 false map[completion:true format:map[bracketSpacing:true enable:true proseWrap:Preserve] hover:true keyOrdering:true schemaStore:map[enable:false] schemas:map[https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.31.1-standalone-strict/_definitions.json:templates/** kubernetes:templates/**] validate:true]} {values.yaml values.lint.yaml values*.yaml} info}",
Hi, thanks for reporting.
It seems that the additional "kubernetes" was caused by the default extension settings. I removed it.
Unfortunately I'm not sure if it will work since yaml-language-server has some problems with overwriting the k8s schema. See https://github.com/redhat-developer/yaml-language-server/issues/211. Maybe you can use one of the patches suggested in the issue?
I just reverted my change in this extension since it would break the default config.
I also can confirm that yaml-ls will not let you use custom schemas.
Ah, that's a shame. Thank you for looking into it, I'll see if I can use one of the workarounds. Feel free to close this if you don't think it needs to remain open.
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:
I also tried adding it to yaml-language-servers config directly:
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.