Skip to content

Commit

Permalink
Add key-cert-provisioner to release process [v3.29] (#9431)
Browse files Browse the repository at this point in the history
* Add key-cert-provisioner to release process
* Add release-build and release-publish targets
  • Loading branch information
danudey authored Nov 20, 2024
1 parent 42d1981 commit bfdaf74
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
21 changes: 18 additions & 3 deletions key-cert-provisioner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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 $@
3 changes: 3 additions & 0 deletions release/pkg/manager/calico/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -663,6 +664,7 @@ func (r *CalicoManager) buildContainerImages(ver string) error {
releaseDirs := []string{
"node",
"pod2daemon",
"key-cert-provisioner",
"cni-plugin",
"apiserver",
"kube-controllers",
Expand Down Expand Up @@ -767,6 +769,7 @@ func (r *CalicoManager) publishContainerImages(ver string) error {

releaseDirs := []string{
"pod2daemon",
"key-cert-provisioner",
"cni-plugin",
"apiserver",
"kube-controllers",
Expand Down

0 comments on commit bfdaf74

Please sign in to comment.