Open kalvkusk opened 1 year ago
Installation is working, still getting these error when trying to apply a policy:
Error from server (InternalError): error when creating "examples/example_policy.yaml": Internal error occurred: failed calling webhook "malertspolicy.kb.io": received invalid webhook response: expected response.uid="bcfa00c3-7731-4fa6-9540-9b088da9c956", got ""
{"level":"error","ts":1694168214.9626572,"logger":"controller-runtime.webhook.webhooks","msg":"unable to decode the request","webhook":"/mutate-nr-k8s-newrelic-com-v1-alertspolicy","error":"no kind \"AdmissionReview\" is registered for version \"admission.k8s.io/v1\" in scheme \"pkg/runtime/scheme.go:101\"","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/runner/go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).ServeHTTP\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/webhook/admission/http.go:79\nsigs.k8s.io/controller-runtime/pkg/webhook.instrumentedHook.func1\n\t/home/runner/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.0/pkg/webhook/server.go:129\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.13/x64/src/net/http/server.go:2042\nnet/http.(*ServeMux).ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.13/x64/src/net/http/server.go:2417\nnet/http.serverHandler.ServeHTTP\n\t/opt/hostedtoolcache/go/1.15.13/x64/src/net/http/server.go:2843\nnet/http.(*conn).serve\n\t/opt/hostedtoolcache/go/1.15.13/x64/src/net/http/server.go:1925"}
Looking into that
Fixed admission hooks. Tested on AWS EKS Kubernetes version 1.23
Works with: