cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
34 stars 5 forks source link

fix: improve CRD install (Helm and standalone) #140

Closed erikgb closed 1 week ago

erikgb commented 2 weeks ago

The purpose of this PR is twofold: fix the currently broken CRDs standalone install (https://github.com/cybozu-go/accurate/issues/139) and improve the Helm CRDs install by adding helm.sh/resource-policy: keep annotation (by default) to CRDs to prevent Helm from uninstalling the CRD when the Helm release is uninstalled. The general improvement of Helm CRD install will hopefully allow more users to let Helm manage CRDs.

I will suggest publishing CRDs as a release artifact to avoid the new crd-only kustomize overlay. As long as we have conversion webhooks, installing CRDs separately will be somehow borked.

The solution is heavily inspired by recent work in cert-manager!

Fixes https://github.com/cybozu-go/accurate/issues/139

erikgb commented 1 week ago

@zoetrope Conflicts should be resolved now. I also removed your two commits. They appeared to be a no-op in total. 😉