TykTechnologies / tyk-operator

Tyk Operator for Kubernetes
https://tyk.io
Mozilla Public License 2.0
197 stars 38 forks source link

bug: unable to deploy operator inside cluster when webhooks enabled #90

Closed asoorm closed 3 years ago

asoorm commented 3 years ago

It is not currently possible to deploy the operator due to what appears to be some Kubebuilder missing namespace compatibility issue.

make deploy IMG=tykio/tyk-operator:latest                                                                                                        
/home/asoorm/go/bin/controller-gen "crd:trivialVersions=true,crdVersions=v1" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
cd config/manager && /home/asoorm/go/bin/kustomize edit set image controller=tykio/tyk-operator:latest
/home/asoorm/go/bin/kustomize build config/default | kubectl apply -f -
Error: no matches for OriginalId admissionregistration.k8s.io_v1beta1_MutatingWebhookConfiguration|~X|mutating-webhook-configuration; no matches for CurrentId admissionregistration.k8s.io_v1beta1_MutatingWebhookConfiguration|~X|mutating-webhook-configuration; failed to find unique target for patch admissionregistration.k8s.io_v1beta1_MutatingWebhookConfiguration|mutating-webhook-configuration
error: no objects passed to apply
make: *** [Makefile:57: deploy] Error 1

Workaround for time being is to ship without Defaulting / Validating capabilities - which is a BIG shame unless we can resolve this.

See:

@excieve could you take a look for me please?

asoorm commented 3 years ago

To help isolate the problem:

kustomize build config/default
Error: no matches for OriginalId admissionregistration.k8s.io_v1_MutatingWebhookConfiguration|~X|mutating-webhook-configuration; no matches for CurrentId admissionregistration.k8s.io_v1_MutatingWebhookConfiguration|~X|mutating-webhook-configuration; failed to find unique target for patch admissionregistration.k8s.io_v1_MutatingWebhookConfiguration|mutating-webhook-configuration