@@ -21,6 +21,7 @@ CHART_PATH=$(CURDIR)/deployment/$(PACKAGE)
2121TOOLSDIR =$(CURDIR ) /hack/tools/bin
2222MANIFESTDIR =$(CURDIR ) /hack/manifests
2323BUILDDIR =$(CURDIR ) /build/_output
24+ HELM_CHART_DEP_CHECKDIR =$(CURDIR ) /build/helmcharts
2425GOFILES =$(shell find . -name "* .go" | grep -vE "(\/vendor\/) |(_test.go)")
2526TESTPKGS =./...
2627ENVTEST_K8S_VERSION =1.28
@@ -109,6 +110,9 @@ $(MANIFESTDIR):
109110$(BUILDDIR ) : ; $(info Creating build directory...)
110111 mkdir -p $@
111112
113+ $(HELM_CHART_DEP_CHECKDIR ) :
114+ mkdir -p $@
115+
112116build : generate $(BUILDDIR ) /$(BINARY_NAME ) ; $(info Building $(BINARY_NAME ) ...) @ # # Build executable file
113117 $(info Done!)
114118
@@ -253,6 +257,12 @@ check-release-build: release-build
253257 $(info checking for git diff after running 'make release-build')
254258 git diff --quiet ; if [ $$ ? -eq 1 ] ; then echo " Please, commit templates after running 'make release-build' command" ; exit 1 ; fi
255259
260+ .PHONY : check-update-helm-sub-charts
261+ check-update-helm-sub-charts : update-helm-sub-charts
262+ $(info checking for git diff after running 'make release-build')
263+ git diff --quiet ; if [ $$ ? -eq 1 ] ; then echo " Please, commit Helm Chart after running 'make update-helm-sub-charts' command" ; exit 1 ; fi
264+
265+
256266TEST_TARGETS := test-default test-bench test-short test-verbose test-race
257267.PHONY : $(TEST_TARGETS ) test-xml check test tests
258268test-bench : ARGS=-run=__absolutelynothing__ -bench=. # # Run benchmarks
@@ -414,6 +424,17 @@ release-build:
414424 cd hack && $(GO ) run release.go --templateDir ./templates/values/ --outputDir ../deployment/network-operator/
415425 cd hack && $(GO ) run release.go --templateDir ./templates/config/manager --outputDir ../config/manager/
416426
427+ .PHONY : helm-update-nic-configuration
428+ helm-update-nic-configuration : $(HELM ) $(HELM_CHART_DEP_CHECKDIR )
429+ rm -rf ./build/helmcharts/nic-configuration-operator-chart
430+ @NIC_CONF_VERSION=$$(yq '.nicConfigurationOperator.version' hack/release.yaml | sed 's/^v//' ) ; \
431+ $(HELM ) pull oci://ghcr.io/mellanox/nic-configuration-operator-chart --version $$ NIC_CONF_VERSION -d $(HELM_CHART_DEP_CHECKDIR ) --untar
432+ rsync -av --exclude=' Chart.yaml' $(HELM_CHART_DEP_CHECKDIR ) /nic-configuration-operator-chart deployment/network-operator/charts/
433+
434+ .PHONY : update-helm-sub-charts
435+ update-helm-sub-charts : helm-update-nic-configuration $(info Updating Helm Sub Charts...)
436+
437+
417438# dev environment
418439
419440MINIKUBE_CLUSTER_NAME = net-op-dev
0 commit comments