GoogleCloudPlatform / gke-managed-certs

Managed Certificates for Kubernetes clusters using GCLB
Apache License 2.0
246 stars 32 forks source link

CRD group and version have changed #12

Closed adrianchifor closed 5 years ago

adrianchifor commented 5 years ago

Tried running the controller as-is from deploy/ but it was initially complaining about

E0206 19:37:48.359527      10 reflector.go:134] github.com/GoogleCloudPlatform/gke-managed-certs/pkg/clientgen/informers/externalversions/factory.go:117: Failed to list *v1beta1.ManagedCertificate: managedcertificates.networking.gke.io is forbidden: User "system:serviceaccount:perimeter:managed-certificate-account" cannot list managedcertificates.networking.gke.io at the cluster scope

So I fixed RBAC, and then

I0206 19:41:18.214788      10 reflector.go:169] Listing and watching *v1beta1.ManagedCertificate from github.com/GoogleCloudPlatform/gke-managed-certs/pkg/clientgen/informers/externalversions/factory.go:117
E0206 19:41:18.217584      10 reflector.go:134] github.com/GoogleCloudPlatform/gke-managed-certs/pkg/clientgen/informers/externalversions/factory.go:117: Failed to list *v1beta1.ManagedCertificate: the server could not find the requested resource (get managedcertificates.networking.gke.io)

I then changed the group to networking.gke.io and version to v1beta1 in the CRD and it started working again. Might be worth double checking the upstream code for reflector.

krzykwas commented 5 years ago

The files in deploy/ are supposed to be used in a GCP setup. The deploy/managed-certificate-controller.yaml, however, references a docker image built by internal CI tool. What happened was that the docker image built by the CI tool was newer than the CRD in this github repo and they did not work with each other. This does not happen anymore, additionally the README explains where does the controller image come from.