From bfdaf74c7f1ea91eb7f07001f2c6f1aafa717df3 Mon Sep 17 00:00:00 2001 From: Daniel Fox Date: Wed, 20 Nov 2024 11:59:07 -0800 Subject: [PATCH] Add key-cert-provisioner to release process [v3.29] (#9431) * Add key-cert-provisioner to release process * Add release-build and release-publish targets --- Makefile | 2 ++ key-cert-provisioner/Makefile | 21 ++++++++++++++++++--- release/pkg/manager/calico/manager.go | 3 +++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 40db26fe5e2..42c29f77e1d 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ clean: $(MAKE) -C libcalico-go clean $(MAKE) -C node clean $(MAKE) -C pod2daemon clean + $(MAKE) -C key-cert-provisioner clean $(MAKE) -C typha clean $(MAKE) -C release clean rm -rf ./bin @@ -82,6 +83,7 @@ bin/tigera-operator-$(GIT_VERSION).tgz: bin/helm $(shell find ./charts/tigera-op # Build all Calico images for the current architecture. image: $(MAKE) -C pod2daemon image IMAGETAG=$(GIT_VERSION) VALIDARCHES=$(ARCH) + $(MAKE) -C key-cert-provisioner image IMAGETAG=$(GIT_VERSION) VALIDARCHES=$(ARCH) $(MAKE) -C calicoctl image IMAGETAG=$(GIT_VERSION) VALIDARCHES=$(ARCH) $(MAKE) -C cni-plugin image IMAGETAG=$(GIT_VERSION) VALIDARCHES=$(ARCH) $(MAKE) -C apiserver image IMAGETAG=$(GIT_VERSION) VALIDARCHES=$(ARCH) diff --git a/key-cert-provisioner/Makefile b/key-cert-provisioner/Makefile index 35846f4df44..b621b031bec 100644 --- a/key-cert-provisioner/Makefile +++ b/key-cert-provisioner/Makefile @@ -55,11 +55,9 @@ $(BINDIR)/test-signer-$(ARCH): # BUILD IMAGE ############################################################################### .PHONY: image-all -image-all: $(addprefix sub-image-,$(VALIDARCHES)) sub-image-fips-amd64 +image-all: $(addprefix sub-image-,$(VALIDARCHES)) sub-image-%: $(MAKE) image ARCH=$* -sub-image-fips-%: - $(MAKE) image FIPS=true ARCH=$* SIGNER_CREATED=.signer.created-$(ARCH) @@ -93,3 +91,20 @@ clean: -docker image rm -f $$(docker images $(KEY_CERT_PROVISIONER_IMAGE) -a -q) -docker image rm -f $$(docker images $(TEST_SIGNER_IMAGE) -a -q) +############################################################################### +# Release +############################################################################### +## Produces a clean build of release artifacts at the specified version. +release-build: .release-$(VERSION).created +.release-$(VERSION).created: + $(MAKE) clean image-all RELEASE=true + $(MAKE) retag-build-images-with-registries IMAGETAG=$(VERSION) RELEASE=true + # Generate the `latest` images. + $(MAKE) retag-build-images-with-registries IMAGETAG=latest RELEASE=true + touch $@ + +## Pushes a github release and release artifacts produced by `make release-build`. +release-publish: release-prereqs .release-$(VERSION).published +.release-$(VERSION).published: + $(MAKE) push-images-to-registries push-manifests IMAGETAG=$(VERSION) RELEASE=$(RELEASE) CONFIRM=$(CONFIRM) + touch $@ diff --git a/release/pkg/manager/calico/manager.go b/release/pkg/manager/calico/manager.go index b1976ac8458..4d2bf50a539 100644 --- a/release/pkg/manager/calico/manager.go +++ b/release/pkg/manager/calico/manager.go @@ -160,6 +160,7 @@ func releaseImages(version, operatorVersion string) []string { fmt.Sprintf("calico/kube-controllers:%s", version), fmt.Sprintf("calico/dikastes:%s", version), fmt.Sprintf("calico/pod2daemon-flexvol:%s", version), + fmt.Sprintf("calico/key-cert-provisioner:%s", version), fmt.Sprintf("calico/csi:%s", version), fmt.Sprintf("calico/node-driver-registrar:%s", version), fmt.Sprintf("calico/cni-windows:%s", version), @@ -663,6 +664,7 @@ func (r *CalicoManager) buildContainerImages(ver string) error { releaseDirs := []string{ "node", "pod2daemon", + "key-cert-provisioner", "cni-plugin", "apiserver", "kube-controllers", @@ -767,6 +769,7 @@ func (r *CalicoManager) publishContainerImages(ver string) error { releaseDirs := []string{ "pod2daemon", + "key-cert-provisioner", "cni-plugin", "apiserver", "kube-controllers",