@@ -370,12 +370,17 @@ install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/con
370370uninstall : kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
371371 $(KUSTOMIZE ) build config/crd | kubectl --ignore-not-found=true delete -f - || true
372372
373- deploy : kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
373+ set-manager-images : kustomize # # Update image references
374374 cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMAGE}
375- $(SED ) -i -r ' s~ebpf-agent:.+~ebpf-agent:main~' ./config/manager/manager.yaml
376- $(SED ) -i -r ' s~flowlogs-pipeline:.+~flowlogs-pipeline:main~' ./config/manager/manager.yaml
377- $(SED ) -i -r ' s~console-plugin:.+~console-plugin:main~' ./config/manager/manager.yaml
378- $(SED ) -i -r ' s~console-plugin-pf4:.+~console-plugin:main-pf4~' ./config/manager/manager.yaml
375+ $(SED ) -i -r ' /RELATED_IMAGE_EBPF_AGENT$$/{ n; s~value:.+$$~value: quay.io/netobserv/netobserv-ebpf-agent:$(BPF_VERSION)~}' ./config/manager/manager.yaml
376+ $(SED ) -i -r ' /RELATED_IMAGE_FLOWLOGS_PIPELINE$$/{ n; s~value:.+$$~value: quay.io/netobserv/flowlogs-pipeline:$(FLP_VERSION)~}' ./config/manager/manager.yaml
377+ $(SED ) -i -r ' /RELATED_IMAGE_CONSOLE_PLUGIN$$/{ n; s~value:.+$$~value: quay.io/netobserv/network-observability-console-plugin:$(PLG_VERSION)~}' ./config/manager/manager.yaml
378+ $(SED ) -i -r ' /RELATED_IMAGE_CONSOLE_PLUGIN_COMPAT$$/{ n; s~value:.+$$~value: quay.io/netobserv/network-observability-console-plugin:$(PLG_VERSION)-pf4~}' ./config/manager/manager.yaml
379+
380+ deploy : BPF_VERSION=main
381+ deploy : FLP_VERSION=main
382+ deploy : PLG_VERSION=main
383+ deploy : kustomize set-manager-images # # Deploy controller to the K8s cluster specified in ~/.kube/config.
379384 $(KUSTOMIZE ) build config/openshift | sed -r " s/openshift-netobserv-operator\.svc/${NAMESPACE} .svc/" | kubectl apply --server-side --force-conflicts -f -
380385 kubectl get ns openshift-netobserv-operator || kubectl create ns openshift-netobserv-operator
381386 cat bundle/manifests/netobserv-operator.clusterserviceversion.yaml | sed -r " s/operators.coreos.com\/v1/operators.coreos.com\/v1alpha1/" | sed -r " s/placeholder/openshift-netobserv-operator/" | kubectl apply --server-side --force-conflicts -f -
@@ -390,12 +395,8 @@ run: fmt lint ## Run a controller from your host.
390395# #@ OLM
391396
392397.PHONY : bundle-prepare
393- bundle-prepare : OPSDK generate kustomize # # Generate bundle manifests and metadata, then validate generated files.
398+ bundle-prepare : OPSDK generate kustomize set-manager-images # # Generate bundle manifests and metadata, then validate generated files.
394399# $(OPSDK) generate kustomize manifests -q --input-dir $(BUNDLE_CONFIG) --output-dir $(BUNDLE_CONFIG)
395- cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE)
396- $(SED) -i -r 's~ebpf-agent:.+~ebpf-agent:$(BPF_VERSION)~' ./config/manager/manager.yaml
397- $(SED) -i -r 's~flowlogs-pipeline:.+~flowlogs-pipeline:$(FLP_VERSION)~' ./config/manager/manager.yaml
398- $(SED) -i -r 's~console-plugin:.+~console-plugin:$(PLG_VERSION)~' ./config/manager/manager.yaml
399400 $(SED) -i -r 's~network-observability-operator/blob/[^/]+/~network-observability-operator/blob/$(VERSION)/~g' ./config/csv/bases/netobserv-operator.clusterserviceversion.yaml
400401 $(SED) -i -r 's~network-observability-operator/blob/[^/]+/~network-observability-operator/blob/$(VERSION)/~g' ./config/descriptions/upstream.md
401402 $(SED) -i -r 's~network-observability-operator/blob/[^/]+/~network-observability-operator/blob/$(VERSION)/~g' ./config/descriptions/ocp.md
0 commit comments