Skip to content

Base k8s schema resolution off of GroupVersionKind#1223

Merged
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:improve-k8s-schema-resolution
Apr 8, 2026
Merged

Base k8s schema resolution off of GroupVersionKind#1223
datho7561 merged 1 commit intoredhat-developer:mainfrom
datho7561:improve-k8s-schema-resolution

Conversation

@datho7561
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 commented Apr 6, 2026

What does this PR do?

This should improve validation and completion of Kubernetes resources drastically.

What issues does this PR fix or reference?

Fixes #1213

Is it tested? How?

  • Existing unit tests
  • New unit tests

@datho7561
Copy link
Copy Markdown
Contributor Author

I looked into removing the custom validation and completion logic for files marked as "kubernetes", but that caused problems in files that don't have a GVK declared yet. We'll need a more robust solution some time in the future for this pain point; I don't think it's worth modifying the completion/validation behaviour just to get this one schema working as expected (it's a hack).

It might be interesting to have a generic "kubernetes object" schema to fall back on that includes the bare minimum (completion/validation for GVK and some metadata) so that we don't have to use the large "every kubernetes object" schema.

This should improve validation and completion of Kubernetes resources drastically.

Fixes redhat-developer#1213

Signed-off-by: David Thompson <davthomp@redhat.com>
@datho7561 datho7561 force-pushed the improve-k8s-schema-resolution branch from b998e03 to fa161f3 Compare April 8, 2026 16:14
@datho7561 datho7561 marked this pull request as ready for review April 8, 2026 16:15
Copy link
Copy Markdown
Member

@shin19991207 shin19991207 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works well for me. Thanks, David!

@datho7561 datho7561 merged commit 5007fd5 into redhat-developer:main Apr 8, 2026
4 checks passed
@datho7561 datho7561 deleted the improve-k8s-schema-resolution branch April 8, 2026 18:46
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.

Outdated validation for k8s HPA

2 participants