From 5ed0f715b1210407dcf37b26dffd2310924b84ba Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Thu, 19 Dec 2024 12:33:19 +0100 Subject: [PATCH] K8s - Add annotations to containers --- k8s/c2d_deployer.Makefile | 19 ++++++++++--------- k8s/wordpress/Makefile | 1 + k8s/wordpress/apptest/tester/Dockerfile | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/k8s/c2d_deployer.Makefile b/k8s/c2d_deployer.Makefile index 05fe8c91fc..730b537748 100644 --- a/k8s/c2d_deployer.Makefile +++ b/k8s/c2d_deployer.Makefile @@ -48,13 +48,16 @@ $(info ---- RELEASE = $(RELEASE)) .build/$(CHART_NAME): | .build mkdir -p "$@" - app/build:: .build/$(CHART_NAME)/VERSION \ .build/$(CHART_NAME)/$(CHART_NAME) \ .build/$(CHART_NAME)/images \ .build/$(CHART_NAME)/deployer +DEPLOYER_BUILDER := deployer-builder-$(shell echo $$RANDOM) +TESTER_BUILDER := tester-builder-$(shell echo $$RANDOM) + + .build/$(CHART_NAME)/deployer: deployer/* \ chart/$(CHART_NAME)/* \ chart/$(CHART_NAME)/templates/* \ @@ -68,8 +71,8 @@ app/build:: .build/$(CHART_NAME)/VERSION \ | .build/$(CHART_NAME) $(call print_target,$@) - docker buildx create --name deployer-builder --use - docker buildx inspect deployer-builder --bootstrap + docker buildx create --name $(DEPLOYER_BUILDER) --use + docker buildx inspect $(DEPLOYER_BUILDER) --bootstrap docker buildx build \ --push \ --annotation="index,manifest:cloudmarketplace.googleapis.com/service=$(SERVICE_NAME)" \ @@ -81,7 +84,7 @@ app/build:: .build/$(CHART_NAME)/VERSION \ --tag "$(APP_DEPLOYER_IMAGE_TRACK_TAG)" \ -f deployer/Dockerfile \ . - @docker buildx rm deployer-builder + @docker buildx rm $(DEPLOYER_BUILDER) @touch "$@" @@ -119,16 +122,14 @@ $(IMAGE_TARGETS_LIST): .build/$(CHART_NAME)/%: .build/var/REGISTRY \ | .build/$(CHART_NAME) $(call print_target,$@) - docker buildx create --name tester-builder --use - docker buildx inspect tester-builder --bootstrap - + docker buildx create --name $(TESTER_BUILDER) --use + docker buildx inspect $(TESTER_BUILDER) --bootstrap cd apptest/tester \ && docker buildx build \ --push \ --annotation="index,manifest:cloudmarketplace.googleapis.com/service=$(SERVICE_NAME)" \ --tag "$(APP_TESTER_IMAGE)" . - - @docker buildx rm tester-builder + @docker buildx rm $(TESTER_BUILDER) @touch "$@" diff --git a/k8s/wordpress/Makefile b/k8s/wordpress/Makefile index 9d49765279..ef8b363003 100644 --- a/k8s/wordpress/Makefile +++ b/k8s/wordpress/Makefile @@ -7,6 +7,7 @@ CHART_NAME := wordpress APP_ID ?= $(CHART_NAME) VERIFY_WAIT_TIMEOUT = 1800 +SERVICE_NAME := services/d60f6935-b4e7-46b3-8f96-eece88c7cd42.cloudpartnerservices.goog TRACK ?= 6.6 METRICS_EXPORTER_TAG ?= v0.5.1 diff --git a/k8s/wordpress/apptest/tester/Dockerfile b/k8s/wordpress/apptest/tester/Dockerfile index b4668af123..0a81b59bd2 100644 --- a/k8s/wordpress/apptest/tester/Dockerfile +++ b/k8s/wordpress/apptest/tester/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.5 +FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.8 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \