-
Notifications
You must be signed in to change notification settings - Fork 34
Add option to reconcile network policies for operator #1248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
30d7b70
to
041ee2c
Compare
041ee2c
to
eb79693
Compare
ca64cb9
to
6d6ba02
Compare
6d6ba02
to
83b8487
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1248 +/- ##
==========================================
+ Coverage 57.64% 58.35% +0.70%
==========================================
Files 121 123 +2
Lines 11277 11501 +224
==========================================
+ Hits 6501 6711 +210
- Misses 4418 4428 +10
- Partials 358 362 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
83b8487
to
8fbc64b
Compare
8fbc64b
to
82d73ed
Compare
82d73ed
to
48c24fe
Compare
48c24fe
to
5bf39e4
Compare
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
Only limit the reconcilation on OpenShift Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
5bf39e4
to
d32a3c8
Compare
cc @IshwarKanse 😄 |
On OCP 4.20, the network policies are not being created by the Tempo Operator. The operator logs the following errors:
Here are the steps to reproduce the issue: % oc version
Client Version: 4.19.0
Kustomize Version: v5.5.0
Server Version: 4.20.0-0.nightly-2025-07-20-021531
Kubernetes Version: v1.33.2
% oc create namespace openshift-tempo-operator
namespace/openshift-tempo-operator created
% oc label namespace openshift-tempo-operator openshift.io/cluster-monitoring="true"
namespace/openshift-tempo-operator labeled
% oc project openshift-tempo-operator
% operator-sdk run bundle --timeout=5m --security-context-config=restricted quay.io/rhn_support_ikanse/tempo-operator-bundle:v0.17.1
INFO[0015] Creating a File-Based Catalog of the bundle "quay.io/rhn_support_ikanse/tempo-operator-bundle:v0.17.1"
INFO[0018] Generated a valid File-Based Catalog
INFO[0025] Created registry pod: quay-io-rhn-support-ikanse-tempo-operator-bundle-v0-17-1
INFO[0026] Created CatalogSource: tempo-operator-catalog
INFO[0026] OperatorGroup "operator-sdk-og" created
INFO[0027] Created Subscription: tempo-operator-v0-17-1-sub
INFO[0037] Approved InstallPlan install-4w54d for the Subscription: tempo-operator-v0-17-1-sub
INFO[0037] Waiting for ClusterServiceVersion "openshift-tempo-operator/tempo-operator.v0.17.1" to reach 'Succeeded' phase
INFO[0038] Found ClusterServiceVersion "openshift-tempo-operator/tempo-operator.v0.17.1" phase: Pending
INFO[0040] Found ClusterServiceVersion "openshift-tempo-operator/tempo-operator.v0.17.1" phase: InstallReady
INFO[0041] Found ClusterServiceVersion "openshift-tempo-operator/tempo-operator.v0.17.1" phase: Installing
INFO[0053] Found ClusterServiceVersion "openshift-tempo-operator/tempo-operator.v0.17.1" phase: Succeeded
INFO[0054] OLM has successfully installed "tempo-operator.v0.17.1"
% oc get networkpolicies.networking.k8s.io
No resources found in openshift-tempo-operator namespace.
% oc logs tempo-operator-controller-7f9c475f6-x5zhs | grep -i error
{"level":"error","ts":"2025-07-25T05:00:20.212104549Z","logger":"operator-reconcile","msg":"failed to configure resource","object_name":"tempo-operator-deny-all","object_kind":"&TypeMeta{Kind:NetworkPolicy,APIVersion:networking.k8s.io/v1,}","error":"missing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile](https://github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile)\n\t/workspace/internal/controller/tempo/operator_controller.go:107\[ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:150\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-07-25T05:00:20.212184257Z","logger":"operator-reconcile","msg":"failed to configure resource","object_name":"tempo-operator-ingress-to-metrics","object_kind":"&TypeMeta{Kind:NetworkPolicy,APIVersion:networking.k8s.io/v1,}","error":"missing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile](https://github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile)\n\t/workspace/internal/controller/tempo/operator_controller.go:107\[ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:150\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-07-25T05:00:20.212221662Z","logger":"operator-reconcile","msg":"failed to configure resource","object_name":"tempo-operator-allow-dns","object_kind":"&TypeMeta{Kind:NetworkPolicy,APIVersion:networking.k8s.io/v1,}","error":"missing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile](https://github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile)\n\t/workspace/internal/controller/tempo/operator_controller.go:107\[ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:150\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-07-25T05:00:20.212240731Z","logger":"operator-reconcile","msg":"failed to configure resource","object_name":"tempo-operator-egress-to-apiserver","object_kind":"&TypeMeta{Kind:NetworkPolicy,APIVersion:networking.k8s.io/v1,}","error":"missing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile](https://github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile)\n\t/workspace/internal/controller/tempo/operator_controller.go:107\[ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:150\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-07-25T05:00:20.212259814Z","logger":"operator-reconcile","msg":"failed to configure resource","object_name":"tempo-operator-ingress-webhook","object_kind":"&TypeMeta{Kind:NetworkPolicy,APIVersion:networking.k8s.io/v1,}","error":"missing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile](https://github.com/grafana/tempo-operator/internal/controller/tempo.(*OperatorReconciler).Reconcile)\n\t/workspace/internal/controller/tempo/operator_controller.go:107\[ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://ngithub.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:150\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"}
{"level":"error","ts":"2025-07-25T05:00:20.231621265Z","logger":"operator-reconcile","msg":"cannot reconcile operator","error":"failed to create objects for operator: missing mutate implementation for resource type\nmissing mutate implementation for resource type\nmissing mutate implementation for resource type\nmissing mutate implementation for resource type\nmissing mutate implementation for resource type","stacktrace":"[github.com/grafana/tempo-operator/cmd/start.addDependencies.func1](https://github.com/grafana/tempo-operator/cmd/start.addDependencies.func1)\n\t/workspace/cmd/start/main.go:152\nsigs.k8s.io/controller-runtime/pkg/manager.RunnableFunc.Start\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/manager.go:307\nsigs.k8s.io/controller-runtime/pkg/manager.(*runnableGroup).reconcile.func1\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/manager/runnable_group.go:226"} |
Signed-off-by: Benedikt Bongartz <[email protected]>
Signed-off-by: Benedikt Bongartz <[email protected]>
d32a3c8
to
dcd7f9d
Compare
Thanks @IshwarKanse . Should be fixed with: d093516
|
Uh oh!
There was an error while loading. Please reload this page.