From 4c227cba3abf1cbcea604ccc1f323f618ee49655 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Fri, 17 Jan 2025 15:20:31 +0100 Subject: [PATCH 1/4] K8s - PostgreSQL - Add annotations (#2856) * K8s - PostgreSQL - Add annotations * fix: pg client setup --- k8s/postgresql/Makefile | 1 + k8s/postgresql/apptest/tester/Dockerfile | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/k8s/postgresql/Makefile b/k8s/postgresql/Makefile index 023abccee6..270654653a 100644 --- a/k8s/postgresql/Makefile +++ b/k8s/postgresql/Makefile @@ -7,6 +7,7 @@ CHART_NAME := postgresql APP_ID ?= $(CHART_NAME) TRACK ?= 16.4 +SERVICE_NAME := services/9fef4505-b5b0-4051-9078-bb00a639b18a.cloudpartnerservices.goog POSTGRESQL_TAG ?= $(TRACK) POSTGRESQL_EXPORTER_TAG ?= 0.15 diff --git a/k8s/postgresql/apptest/tester/Dockerfile b/k8s/postgresql/apptest/tester/Dockerfile index 3ee9a5f762..b73e6336c0 100644 --- a/k8s/postgresql/apptest/tester/Dockerfile +++ b/k8s/postgresql/apptest/tester/Dockerfile @@ -1,17 +1,19 @@ -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 \ gnupg2 \ + curl \ wget \ apt-transport-https -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ && apt update \ && apt -y install postgresql-client-15 \ && rm -rf /var/lib/apt/lists/* -RUN wget -q -O /bin/kubectl \ +RUN curl -L -o /bin/kubectl \ https://storage.googleapis.com/kubernetes-release/release/v1.24.10/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From ef99077e5f5e5a484875a7c0dc5a632ebdcb1c24 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Fri, 17 Jan 2025 15:38:51 +0100 Subject: [PATCH 2/4] K8s - Cassandra - Add annotations (#2838) * K8s - Cassandra - Add annotations * fix: fix python packages setup --- k8s/cassandra/Makefile | 1 + k8s/cassandra/apptest/tester/Dockerfile | 27 ++++++++++--------- .../apptest/tester/tests/basic-suite.yaml | 10 +++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/k8s/cassandra/Makefile b/k8s/cassandra/Makefile index 8679ea7822..4403cddbfe 100644 --- a/k8s/cassandra/Makefile +++ b/k8s/cassandra/Makefile @@ -8,6 +8,7 @@ APP_ID ?= $(CHART_NAME) VERIFY_WAIT_TIMEOUT = 1800 TRACK ?= 4.1 +SERVICE_NAME := services/5a7d4b26-04c9-4426-b4d2-e1e645683965.cloudpartnerservices.goog METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/cassandra/apptest/tester/Dockerfile b/k8s/cassandra/apptest/tester/Dockerfile index eb12b8f93a..29b4475c63 100644 --- a/k8s/cassandra/apptest/tester/Dockerfile +++ b/k8s/cassandra/apptest/tester/Dockerfile @@ -1,20 +1,21 @@ -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 \ - gettext \ - jq \ - uuid-runtime \ - wget \ - python3 \ - python3-pip \ - python3-setuptools \ - && pip install --upgrade pip \ - && pip install --upgrade wheel \ - && pip install cqlsh futures \ + ca-certificates \ + gettext \ + jq \ + uuid-runtime \ + curl \ + wget \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + pipx \ + && pipx install cqlsh \ && rm -rf /var/lib/apt/lists/* -RUN wget -q -O /bin/kubectl \ +RUN curl -L -o /bin/kubectl \ https://storage.googleapis.com/kubernetes-release/release/v1.24.10/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl diff --git a/k8s/cassandra/apptest/tester/tests/basic-suite.yaml b/k8s/cassandra/apptest/tester/tests/basic-suite.yaml index 4f43871f94..d8cbbee7c1 100644 --- a/k8s/cassandra/apptest/tester/tests/basic-suite.yaml +++ b/k8s/cassandra/apptest/tester/tests/basic-suite.yaml @@ -24,7 +24,7 @@ actions: for ((pod=0; pod<${replicas}; pod++)); do export CQLSH_HOST="${APP_INSTANCE_NAME}-cassandra-${pod}.${DOMAIN}" - cqlsh -e "SHOW HOST" --cqlversion="3.4.6" + /root/.local/bin/cqlsh -e "SHOW HOST" --cqlversion="3.4.6" done expect: exitCode: @@ -52,12 +52,12 @@ actions: DOMAIN="${APP_INSTANCE_NAME}-cassandra-svc.${NAMESPACE}.svc.cluster.local" export CQLSH_HOST="${APP_INSTANCE_NAME}-cassandra-0.${DOMAIN}" - cqlsh -e "CREATE KEYSPACE demo WITH REPLICATION ={ 'class' : 'SimpleStrategy', 'replication_factor' : 2 };" --cqlversion="3.4.6" > /dev/null - cqlsh -e "CREATE TABLE demo.person ( name varchar PRIMARY KEY );" --cqlversion="3.4.6" > /dev/null - cqlsh -e "INSERT INTO demo.person ( name ) VALUES ( 'John' );" --cqlversion="3.4.6" > /dev/null + /root/.local/bin/cqlsh -e "CREATE KEYSPACE demo WITH REPLICATION ={ 'class' : 'SimpleStrategy', 'replication_factor' : 2 };" --cqlversion="3.4.6" > /dev/null + /root/.local/bin/cqlsh -e "CREATE TABLE demo.person ( name varchar PRIMARY KEY );" --cqlversion="3.4.6" > /dev/null + /root/.local/bin/cqlsh -e "INSERT INTO demo.person ( name ) VALUES ( 'John' );" --cqlversion="3.4.6" > /dev/null export CQLSH_HOST="${APP_INSTANCE_NAME}-cassandra-1.${DOMAIN}" - cqlsh -e "SELECT * FROM demo.person" --cqlversion="3.4.6" + /root/.local/bin/cqlsh -e "SELECT * FROM demo.person" --cqlversion="3.4.6" expect: stdout: contains: 'John' From b15857b88b26ee1d8d0eccf9e5e7c508abb95a48 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Mon, 20 Jan 2025 10:01:35 +0100 Subject: [PATCH 3/4] K8s - Kafka - Add annotations (#2852) * K8s - Kafka - Add annotations * fix: replace netcat * fix: upgrade jre --- k8s/kafka/Makefile | 1 + k8s/kafka/apptest/tester/Dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/k8s/kafka/Makefile b/k8s/kafka/Makefile index 272a605f7a..02ca063b35 100644 --- a/k8s/kafka/Makefile +++ b/k8s/kafka/Makefile @@ -8,6 +8,7 @@ APP_ID ?= $(CHART_NAME) WAIT_FOR_READY_TIMEOUT := 600 TRACK ?= 3.7 +SERVICE_NAME := services/de661158-ff88-479d-bcf3-206917bed7f6.cloudpartnerservices.goog KAFKA_EXPORTER_TAG ?= 1.8 ZK_TAG ?= 3.8 METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/kafka/apptest/tester/Dockerfile b/k8s/kafka/apptest/tester/Dockerfile index d47dab0e20..e52f860656 100644 --- a/k8s/kafka/apptest/tester/Dockerfile +++ b/k8s/kafka/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 ARG KUBECTL_VERSION=1.12.0 ARG KAFKA_VERSION=2.8.0 @@ -13,11 +13,11 @@ RUN set -eu \ uuid-runtime \ wget \ curl \ - openjdk-11-jre \ - netcat + openjdk-17-jre \ + netcat-traditional RUN set -eu \ - && wget -q -O /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ + && curl -L -o /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl \ && curl -sSL https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -o "/opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz" \ && tar -xzf /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt \ From 6439d579a4840951036be987ae2863344fb5682c Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Mon, 20 Jan 2025 19:22:36 +0100 Subject: [PATCH 4/4] K8s - Prometheus Operator - Add annotations (#2858) * K8s - Prometheus Operator - Add annotations * nit: typo --- k8s/prometheus-operator/Makefile | 1 + k8s/prometheus-operator/apptest/tester/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/k8s/prometheus-operator/Makefile b/k8s/prometheus-operator/Makefile index 337c329ddc..6abb8c0ea1 100644 --- a/k8s/prometheus-operator/Makefile +++ b/k8s/prometheus-operator/Makefile @@ -9,6 +9,7 @@ APP_ID ?= $(CHART_NAME) SOURCE_REGISTRY ?= marketplace.gcr.io/google TRACK ?= 0.77 +SERVICE_NAME := services/6eff155d-707c-4095-be15-020e9da70f54.cloudpartnerservices.goog IMAGE_MAIN ?= $(SOURCE_REGISTRY)/prometheus-operator0:$(TRACK) diff --git a/k8s/prometheus-operator/apptest/tester/Dockerfile b/k8s/prometheus-operator/apptest/tester/Dockerfile index a99be3e304..a154d609d3 100644 --- a/k8s/prometheus-operator/apptest/tester/Dockerfile +++ b/k8s/prometheus-operator/apptest/tester/Dockerfile @@ -1,7 +1,7 @@ -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 \ - curl dnsutils netcat jq \ + curl dnsutils netcat-traditional jq \ && rm -rf /var/lib/apt/lists/* COPY tests/basic-suite.yaml /tests/basic-suite.yaml