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

Failed to get resource when kind is in two different api versions #504

Open
josegonzalez opened this issue Jan 26, 2024 · 2 comments
Open

Comments

@josegonzalez
Copy link

Description

I am using Traefik for routing, and they recently switched from traefik.containo.us to traefik.io as their apiVersion. The CRDs are currently duplicated if you install Traefik v2, with a recommendation that users use traefik.io instead of traefik.containo.us (the latter is removed in the upcoming Traefik v3). That said, it looks like helm dashboard ignores the apiVersion of the object and instead just looks up the resource under the first matching CRD.

The /resources endpoint returns the correct apiVersion on the resource, so I'm guessing it could be possible to send that along when fetching the resource vs just depending on the Kind to be unique.

Screenshots

Screenshot 2024-01-26 at 2 58 29 AM Screenshot 2024-01-26 at 2 58 47 AM

Additional information

No response

@undera
Copy link
Collaborator

undera commented Jan 26, 2024

@josegonzalez Can you compose me a detailed instruction on how to reproduce this in my cluster? Which charts of which version to install?

@josegonzalez
Copy link
Author

If you setup a server via k3s as shown here, you'll get the same CRD under two different groups. Then I would create a helm chart with something like the below as a template:

apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: redirect-to-https
spec:
  redirectScheme:
    scheme: https
    permanent: true

The helm dashboard will then query the CRD with the wrong apiVersion (traefik.containo.us/v1alpha1).

This is probably also an issue for anyone upgrading across CRDs, where the version increases but the older CRD might be used instead.

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

2 participants