Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes v1.19 not supported #424

Closed
1 of 4 tasks
maltalex opened this issue Feb 7, 2021 · 8 comments
Closed
1 of 4 tasks

Kubernetes v1.19 not supported #424

maltalex opened this issue Feb 7, 2021 · 8 comments

Comments

@maltalex
Copy link

maltalex commented Feb 7, 2021

I'm opening this issue here because of the plugin's claim to have "built-in Kubernetes syntax support".

Unfortunately, it looks like the K8s stops at 1.18 and there's no support for 1.19+

Expected Behavior

Schema support for Kubernetes v1.19+

Current Behavior

Kubernetes yaml v1.19+ not supported. The plugin uses older schema definitions and does not recognize new fields.

Steps to Reproduce

Copy the following yaml into vscode, select "kubernetes" as the schema. Several properties including "pathType", and "backend" will not be allowed:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: test.example.com
    http:
      paths:
      - path: /
        pathType: Prefix 
        backend:
          service:
            name: test
            port:
              number: 80

image

for reference, my schema definition file:

{
    "yaml.schemas": {
        "kubernetes": ["*.yaml"]
    }
}

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)
@evidolob
Copy link
Collaborator

evidolob commented Feb 8, 2021

We need to get instrumenta/kubernetes-json-schema#28 merged first, then we can add v1.19 version support.

@maltalex
Copy link
Author

maltalex commented Feb 8, 2021

@evidolob that repository hasn't been updated in almost a year now. The last commit was in April 2020. Perhaps it's time to consider using a different source of schemas. Kubernetes 1.20 has already been released and 1.21 is in alpha.

@JPinkney
Copy link
Contributor

JPinkney commented Feb 8, 2021

AFAIK there isn't really a different source of kubernetes schemas. If you want a true kubernetes editing experience in VSCode then use vscode-kubernetes-tools which depends on this extension.

@maltalex
Copy link
Author

maltalex commented Feb 8, 2021

@JPinkney

Thanks for the suggestion, I'll take a look at vscode-kubernetes-tools.

People over at instrumenta/kubernetes-json-schema suggested some alternatives in the relevant issue from Nov 2020 (!) -see instrumenta/kubernetes-json-schema#26

Based on the fact that the K8s schema is the only schema explicitly mentioned in this plugin's README, I'm guessing that maintaining K8s compatibility is important for you guys. If instrumenta/kubernetes-json-schema is not longer being maintained, I humbly suggest you consider switching to an actively maintained fork or even host your own.

@evidolob
Copy link
Collaborator

evidolob commented Feb 8, 2021

We have plans to remove build-in k8s support redhat-developer/yaml-language-server#307
Maybe we need to mention that in readme before we start doing that, to give a time to migrate to vscode-kubernetes-tools

@maltalex
Copy link
Author

maltalex commented Feb 8, 2021

@evidolob
Fair enough. Might I also suggest documenting how a user could configure the plugin to get the K8s schemas manually if and when you remove the support? This would make the transition a lot easier.

@apelisse
Copy link

apelisse commented Mar 3, 2021

is vscode-kubernetes-tools a vscode specific thing? Because not everyone uses vscode.

@evidolob
Copy link
Collaborator

bleach31 pushed a commit to bleach31/vscode-yaml that referenced this issue Jan 25, 2022
* redhat-developer#412 Implement CodeLens, show all json schemas in codelens

Signed-off-by: Yevhen Vydolob <[email protected]>

* Fix review comments

Signed-off-by: Yevhen Vydolob <[email protected]>

* delete commented code

Signed-off-by: Yevhen Vydolob <[email protected]>

* Use 'isBooelan' as type gard

Signed-off-by: Yevhen Vydolob <[email protected]>

* fix tests

Signed-off-by: Yevhen Vydolob <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants