Skip to content

Cannot watch with wildcards (across logical clusters) if the CRD hasn't been added in the admin logical cluster #183

@davidfestal

Description

@davidfestal

Describe the bug

One cannot watch with wildcards (across logical clusters) if the CRD of the related API Resource hasn't been added in the admin logical cluster first.

To Reproduce
Steps to reproduce the behavior:

  1. Run KCP
  2. kubectl --context=user apply -f contrib/crds/apps/apps_deployments.yaml
  3. kubectl --context=user api-resources
    => deployments are in the API Resources list
  4. kubectl --context=user proxy --port=8080 &
  5. curl -v -H "X-Kubernetes-Cluster: user" http://127.0.0.1:8080/apis/apps/v1/deployments/
    => returns {"apiVersion":"apps/v1","items":[],"kind":"DeploymentList","metadata":{"continue":"","resourceVersion":"167"}}
  6. curl -v -H "X-Kubernetes-Cluster: *" http://127.0.0.1:8080/apis/apps/v1/deployments/
    => returns the 404 error

Expected behavior

It should return an empty list as soon as the expected CRD is found in at least one of the logical clusters.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions