11# Image URL to use all building/pushing image targets
2- IMG ?= capms-controller:latest
2+ IMG ?= ghcr.io/metal-stack/capms-controller:latest
3+ IMG_NAME ?= ghcr.io/metal-stack/capms-controller
4+ IMG_TAG ?= latest
35# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
46ENVTEST_K8S_VERSION = 1.31.0
7+ RELEASE_DIR ?= .release
58
69# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
710ifeq (,$(shell go env GOBIN) )
@@ -45,8 +48,9 @@ help: ## Display this help.
4548
4649.PHONY : release-manifests
4750release-manifests : $(KUSTOMIZE ) # # Builds the manifests to publish with a release
48- $(KUSTOMIZE ) build config/default > infrastructure-components.yaml
49- # cp metadata.yaml $(RELEASE_DIR)/metadata.yaml
51+ $(KUSTOMIZE ) build config/default > $(RELEASE_DIR ) /infrastructure-components.yaml
52+ sed -i ' s!image: $(IMG_NAME):latest!image: $(IMG_NAME):$(IMG_TAG)!' $(RELEASE_DIR ) /infrastructure-components.yaml
53+ cp metadata.yaml $(RELEASE_DIR ) /metadata.yaml
5054 # cp examples/clusterctl-templates/clusterctl-cluster.yaml $(RELEASE_DIR)/cluster-template.yaml
5155 # cp examples/clusterctl-templates/example_variables.rc $(RELEASE_DIR)/example_variables.rc
5256
@@ -55,7 +59,7 @@ release-manifests: $(KUSTOMIZE) ## Builds the manifests to publish with a releas
5559.PHONY : push-to-capi-lab
5660push-to-capi-lab : generate manifests build install deploy
5761 docker build -t $(IMG ) -f Dockerfile.dev .
58- kind --name metal-control-plane load docker-image capms-controller:latest
62+ kind --name metal-control-plane load docker-image $( IMG )
5963 kubectl --kubeconfig=$(KUBECONFIG ) patch deployments.apps -n capms-system capms-controller-manager --patch=' {"spec":{"template":{"spec":{"containers":[{"name": "manager","imagePullPolicy":"IfNotPresent","image":"$(IMG)"}]}}}}'
6064 kubectl --kubeconfig=$(KUBECONFIG ) delete pod -n capms-system -l control-plane=controller-manager
6165
0 commit comments