diff --git a/controllers/rate_limiting_istio_wasmplugin_controller.go b/controllers/rate_limiting_istio_wasmplugin_controller.go index cebd6f218..24d83b311 100644 --- a/controllers/rate_limiting_istio_wasmplugin_controller.go +++ b/controllers/rate_limiting_istio_wasmplugin_controller.go @@ -27,7 +27,6 @@ import ( istioclientgoextensionv1alpha1 "istio.io/client-go/pkg/apis/extensions/v1alpha1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/utils/env" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/handler" @@ -44,10 +43,6 @@ import ( "github.com/kuadrant/kuadrant-operator/pkg/rlptools/wasm" ) -var ( - WASMFilterImageURL = env.GetString("RELATED_IMAGE_WASMSHIM", "oci://quay.io/kuadrant/wasm-shim:latest") -) - func WASMPluginName(gw *gatewayapiv1.Gateway) string { return fmt.Sprintf("kuadrant-%s", gw.Name) } @@ -118,7 +113,7 @@ func (r *RateLimitingIstioWASMPluginReconciler) desiredRateLimitingWASMPlugin(ct }, Spec: istioextensionsv1alpha1.WasmPlugin{ TargetRef: kuadrantistioutils.PolicyTargetRefFromGateway(gw), - Url: WASMFilterImageURL, + Url: wasm.WASMFilterImageURL, PluginConfig: nil, // Insert plugin before Istio stats filters and after Istio authorization filters. Phase: istioextensionsv1alpha1.PluginPhase_STATS, diff --git a/tests/envoygateway/wasm_controller_test.go b/tests/envoygateway/wasm_controller_test.go index 636d8d67d..d63e77144 100644 --- a/tests/envoygateway/wasm_controller_test.go +++ b/tests/envoygateway/wasm_controller_test.go @@ -142,7 +142,7 @@ var _ = Describe("wasm controller", func() { Expect(ext.Spec.Wasm).To(HaveLen(1)) Expect(ext.Spec.Wasm[0].Code.Type).To(Equal(egv1alpha1.ImageWasmCodeSourceType)) Expect(ext.Spec.Wasm[0].Code.Image).To(Not(BeNil())) - Expect(ext.Spec.Wasm[0].Code.Image.URL).To(Equal(controllers.WASMFilterImageURL)) + Expect(ext.Spec.Wasm[0].Code.Image.URL).To(Equal(wasm.WASMFilterImageURL)) existingWASMConfig, err := wasm.ConfigFromJSON(ext.Spec.Wasm[0].Config) Expect(err).ToNot(HaveOccurred()) Expect(existingWASMConfig).To(Equal(&wasm.Config{ @@ -301,7 +301,7 @@ var _ = Describe("wasm controller", func() { Expect(ext.Spec.Wasm).To(HaveLen(1)) Expect(ext.Spec.Wasm[0].Code.Type).To(Equal(egv1alpha1.ImageWasmCodeSourceType)) Expect(ext.Spec.Wasm[0].Code.Image).To(Not(BeNil())) - Expect(ext.Spec.Wasm[0].Code.Image.URL).To(Equal(controllers.WASMFilterImageURL)) + Expect(ext.Spec.Wasm[0].Code.Image.URL).To(Equal(wasm.WASMFilterImageURL)) existingWASMConfig, err := wasm.ConfigFromJSON(ext.Spec.Wasm[0].Config) Expect(err).ToNot(HaveOccurred()) Expect(existingWASMConfig).To(Equal(&wasm.Config{