kubernetes-sigs/kubectl-validate

Support remote location for schemas

hadar-co opened this issue · 7 comments

Similar to the --local-schemas flag, it would be very useful to be able to pass an http address (such as a Github repo, for example) containing the schema.

This can done using a separate flag, or just adding this capability to the existing one.
For example:

kubectl validate ./my_crd.yaml --remote-schemas "https://raw.githubusercontent.com/myOrg/myRepo/main/folderWithSchemas/"

I support this idea in theory. What format do you expect schemas to be in folderWithSchemas?

Yeah, i think there's 2 things

  1. Should we be able to load directly ONE schema from http? Absolutely.
  2. Alex's question, there's no concept of folder in http, what should it do?

Alex's question, there's no concept of folder in http, what should it do?

How about following the remote-directories in kustomize?
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md#remote-directories

How about following the remote-directories in kustomize?
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md#remote-directories

the name is a little misleading-ish. That's specifically doing a clone and access files under that clone.

Alternatively, we could do a special loader to load from Github API.

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

/remove-lifecycle rotten
/lifecycle frozen