open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.72k stars 764 forks source link

Gatekeeper errors on constaints #3572

Open kotyara85 opened 1 month ago

kotyara85 commented 1 month ago

Getting this error after installation gatekeeper per docs: https://open-policy-agent.github.io/gatekeeper/website/docs/install https://open-policy-agent.github.io/gatekeeper-library/website/validation/uniqueingresshost

{"level":"error","ts":1728065179.7270658,"logger":"controller","msg":"error adding template to watch registry","kind":"ConstraintTemplate","process":"constraint_template_controller","name":"k8suniqueingresshost","crdName":"k8suniqueingresshost.constraints.gatekeeper.sh","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"github.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).handleUpdate\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:476\ngithub.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:387\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"error","ts":1728065179.727132,"logger":"controller","msg":"handle update error","kind":"ConstraintTemplate","process":"constraint_template_controller","template_name":"k8suniqueingresshost","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"github.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:389\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"error","ts":1728065179.727163,"msg":"Reconciler error","controller":"constrainttemplate-controller","object":{"name":"k8suniqueingresshost"},"namespace":"","name":"k8suniqueingresshost","reconcileID":"f60e2e80-af6a-4a46-97f6-eb67be0a328d","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"error","ts":1728065179.7289836,"logger":"controller","msg":"error adding template to watch registry","kind":"ConstraintTemplate","process":"constraint_template_controller","name":"k8suniqueingresshost","crdName":"k8suniqueingresshost.constraints.gatekeeper.sh","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"github.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).handleUpdate\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:476\ngithub.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:387\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"error","ts":1728065179.7290313,"logger":"controller","msg":"handle update error","kind":"ConstraintTemplate","process":"constraint_template_controller","template_name":"k8suniqueingresshost","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"github.com/open-policy-agent/gatekeeper/v3/pkg/controller/constrainttemplate.(*ReconcileConstraintTemplate).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/pkg/controller/constrainttemplate/constrainttemplate_controller.go:389\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"error","ts":1728065179.7290576,"msg":"Reconciler error","controller":"constrainttemplate-controller","object":{"name":"k8suniqueingresshost"},"namespace":"","name":"k8suniqueingresshost","reconcileID":"419d49c3-5f36-43ff-8593-35cd143d4e10","error":"getting informer for kind: constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost no matches for kind \"K8sUniqueIngressHost\" in version \"constraints.gatekeeper.sh/v1beta1\"","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:261\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/src/github.com/open-policy-agent/gatekeeper/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:222"}
{"level":"info","ts":1728065179.7325215,"logger":"watch-manager","msg":"replaying events","registrar":"constrainttemplate-controller-status","gvk":"constraints.gatekeeper.sh/v1beta1, Kind=K8sUniqueIngressHost"}

I also noticed these errors in the log file:

2024/10/04 18:06:19 http: TLS handshake error from 192.168.1.192:37840: EOF
2024/10/04 18:06:19 http: TLS handshake error from 192.168.1.64:58066: EOF
2024/10/04 18:06:19 http: TLS handshake error from 192.168.1.192:41458: EOF
2024/10/04 18:06:19 http: TLS handshake error from 192.168.1.128:37102: EOF
2024/10/04 18:06:19 http: TLS handshake error from 192.168.1.128:47858: EOF

What steps did you take and what happened: [A clear and concise description of what the bug is.] help install: https://open-policy-agent.github.io/gatekeeper/website/docs/install https://open-policy-agent.github.io/gatekeeper-library/website/validation/uniqueingresshost

What did you expect to happen: Working constraints

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

elmi70 commented 2 weeks ago

i am also getting the same 2024-11-03 21:06:33.271 CET 2024/11/03 20:06:33 http: TLS handshake error from 172.x.x.x:38712: EOF