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

Update schema of Traefik #119

Closed
ad-m-ss opened this issue Feb 20, 2023 · 2 comments
Closed

Update schema of Traefik #119

ad-m-ss opened this issue Feb 20, 2023 · 2 comments

Comments

@ad-m-ss
Copy link

ad-m-ss commented Feb 20, 2023

Hi,

There are schema for Traefik: https://github.com/datreeio/CRDs-catalog/tree/main/traefik.containo.us

However, it fails to be detected by kubeconform, because they published it as v1 now:

$ helm kubeconform ../. --values ./preview.yaml
ERROR: Testing failed: kubeconform failed: failed to run kubeconform: rc=1
stdin - IngressRoute release-name-traefik-sso-chart-auth-tls failed validation: could not find schema for IngressRoute
stdin - IngressRoute release-name-traefik-dashboard failed validation: could not find schema for IngressRoute
stdin - Middleware release-name-traefik-sso-chart-traefik-forward-auth failed validation: could not find schema for Middleware
stdin - ServersTransport release-name-traefik-sso-chart-insecure failed validation: could not find schema for ServersTransport
Error: plugin "kubeconform" exited with error
$ cat ../.kubeconform
schema-location:
  - default
  - https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json

See https://doc.traefik.io/traefik/reference/dynamic-configuration/kubernetes-crd/ for their documentation.

I'm open to help work on this but I miss some tips about the best way to do it (see #118).

@eyarz
Copy link
Member

eyarz commented Feb 20, 2023

you are correct, we don't have v1 in the catalog for traefik so it will not work.
feel free to open a PR and add the missing v1 schemas :)

There are two ways to extract the schemas:

  1. you can run this script with the CRD itself, and it will generate the CR json schema.
  2. you can install traefik v1 on your cluster and extract the schemas with the CRD Extractor

both options are doing the same process, but I see you're familiar with python, so I think option 1 will be easier for you.

@jacksgt
Copy link
Contributor

jacksgt commented Aug 9, 2023

@eyarz I believe this can be closed since #166 was merged.

@eyarz eyarz closed this as completed Aug 9, 2023
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

No branches or pull requests

3 participants