Skip to content

Commit

Permalink
fixup! envoygateway wasm controller
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Sep 2, 2024
1 parent a40d11a commit f8edcd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/envoygateway_wasm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (r *EnvoyGatewayWasmReconciler) desiredEnvoyExtensionPolicy(
kuadrant.AnnotateObject(envoy_policy, kObj.GetNamespace())

Check warning on line 152 in controllers/envoygateway_wasm_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/envoygateway_wasm_controller.go#L152

Added line #L152 was not covered by tests

// controller reference
if err := r.SetOwnerReference(gw, envoy_policy); err != nil {
if err := r.SetOwnerReference(gw.GetGateway(), envoy_policy); err != nil {
return nil, err

Check warning on line 156 in controllers/envoygateway_wasm_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/envoygateway_wasm_controller.go#L155-L156

Added lines #L155 - L156 were not covered by tests
}

Expand Down
12 changes: 12 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ func main() {
os.Exit(1)
}

envoyGatewayWasmReconciler := reconcilers.NewBaseReconciler(
mgr.GetClient(), mgr.GetScheme(), mgr.GetAPIReader(),
log.Log.WithName("envoyGatewayWasmReconciler"),
mgr.GetEventRecorderFor("EnvoyGatewayWasmReconciler"),
)
if err = (&controllers.EnvoyGatewayWasmReconciler{
BaseReconciler: envoyGatewayWasmReconciler,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "EnvoyGatewayWasmReconciler")
os.Exit(1)
}

//+kubebuilder:scaffold:builder

if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
Expand Down

0 comments on commit f8edcd7

Please sign in to comment.