projectcapsule / capsule-proxy

Reverse proxy for Capsule Operator.
https://github.com/projectcapsule/capsule
Apache License 2.0
41 stars 36 forks source link

Helm Chart v0.7.0 does not install required CRDs #479

Open maxgio92 opened 6 days ago

maxgio92 commented 6 days ago

Bug description

With the v0.7.0 version, the installation with the Helm chart fails because the controller manager tries to create a field indexer on ProxySettings objects, of which the CRD is missing with the default installation.

How to reproduce

helm repo add projectcapsule https://projectcapsule.github.io/charts
 helm upgrade capsule-proxy projectcapsule/capsule-proxy -n capsule-system

Expected behavior

The chart to install the ProxySettings CRD by default, if they're required for the controller manager to work.

Logs

$ k logs -n capsule-system capsule-proxy-755687cb47-wmlxn -f
{"level":"info","ts":"2024-07-02T18:54:34.505Z","logger":"main","msg":"feature gate status","name":"AllAlpha","enabled":false}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"feature gate status","name":"AllBeta","enabled":false}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"feature gate status","name":"ProxyAllNamespaced","enabled":false}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"feature gate status","name":"SkipImpersonationReview","enabled":false}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"feature gate status","name":"ProxyClusterScoped","enabled":false}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"---"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Manager listening on port 9001"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Listening on HTTPS: true"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"The ignored User Groups are []"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"The OIDC username selected is preferred_username"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"---"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Creating the manager"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Creating the Rolebindings reflector"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Adding the Rolebindings reflector to the Manager"}
{"level":"info","ts":"2024-07-02T18:54:34.506Z","logger":"main","msg":"Creating the Field Indexer"}
{"level":"error","ts":"2024-07-02T18:54:34.509Z","logger":"main","msg":"cannot create new Field Indexer","error":"no matches for kind \"ProxySetting\" in version \"capsule.clastix.io/v1beta1\"","stacktrace":"main.main\n\tgithub.com/projectcapsule/capsule-proxy/main.go:215\nruntime.main\n\truntime/proc.go:267"}

Additional context

prometherion commented 5 days ago

I guess it's related to the wrong naming of the folder containing CRDs, it should be crds but it's crd.

https://github.com/projectcapsule/capsule-proxy/tree/bc0c9e4bff2779205b46b1faacbfc2f659b1d832/charts/capsule-proxy/crd

prometherion commented 5 days ago

My bad, I didn't follow the release notes, CRDs lifecycle must be enabled with crds.install=true

https://github.com/projectcapsule/capsule-proxy/tree/main/charts/capsule-proxy#07x

I think we can close this.