From b76d1c6601dad84618a18a37c80b7f38b504885c Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 00:02:18 +0100 Subject: [PATCH 01/15] K8s - Django - Add annotations (#2842) --- k8s/django/Makefile | 1 + k8s/django/apptest/tester/Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/django/Makefile b/k8s/django/Makefile index 6c89c16b3e..fcad67a21d 100644 --- a/k8s/django/Makefile +++ b/k8s/django/Makefile @@ -7,6 +7,7 @@ CHART_NAME := django APP_ID ?= $(CHART_NAME) TRACK ?= 5.0 +SERVICE_NAME := services/b0af85ce-23df-43aa-9f54-b6e81eeb27d1.cloudpartnerservices.goog UWSGI_EXPORTER_TRACK ?= 1.1 NGINX_TRACK ?= 1.25 EXPORTER_TAG ?= 0.11 diff --git a/k8s/django/apptest/tester/Dockerfile b/k8s/django/apptest/tester/Dockerfile index a8666ea007..dc2779f5c5 100644 --- a/k8s/django/apptest/tester/Dockerfile +++ b/k8s/django/apptest/tester/Dockerfile @@ -1,15 +1,14 @@ -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 \ curl \ && 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.12.0/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From ede1bcca9e9de26c30a628f58596dae5b6b93437 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 05:29:38 +0100 Subject: [PATCH 02/15] K8s - Drupal - Add annotations (#2843) * K8s - Drupal - Add annotations * fix: tests * fix: tweak timeouts --- k8s/drupal/Makefile | 1 + k8s/drupal/apptest/tester/Dockerfile | 5 ++--- k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml | 4 ++-- .../apptest/tester/tests/external/drupal-external-suite.yaml | 4 ++-- k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml | 2 +- k8s/drupal/chart/drupal/templates/mariadb-secret.yaml | 2 +- k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/k8s/drupal/Makefile b/k8s/drupal/Makefile index d605210b82..1a44f5f83d 100644 --- a/k8s/drupal/Makefile +++ b/k8s/drupal/Makefile @@ -7,6 +7,7 @@ CHART_NAME := drupal APP_ID ?= $(CHART_NAME) TRACK ?= 10.3 +SERVICE_NAME := services/a046f271-479a-43ff-a12f-f10c6812120e.cloudpartnerservices.goog MYSQL_EXPORTER_TAG ?= exporter MARIADB_TAG ?= 11.1 diff --git a/k8s/drupal/apptest/tester/Dockerfile b/k8s/drupal/apptest/tester/Dockerfile index caa5558691..f9fe685120 100644 --- a/k8s/drupal/apptest/tester/Dockerfile +++ b/k8s/drupal/apptest/tester/Dockerfile @@ -1,16 +1,15 @@ -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 \ mariadb-client \ curl \ && 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.12.0/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl diff --git a/k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml b/k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml index ab0e33f50d..9d0ec52cc9 100644 --- a/k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml +++ b/k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml @@ -13,7 +13,7 @@ actions: bodyText: html: title: - equals: 'Welcome! | Drupal_Site' + equals: 'Welcome! | C2D_Drupal_Site' - name: Login URL should be 200 OK (service DNS) httpTest: @@ -24,4 +24,4 @@ actions: bodyText: html: title: - equals: 'Log in | Drupal_Site' + equals: 'Log in | C2D_Drupal_Site' diff --git a/k8s/drupal/apptest/tester/tests/external/drupal-external-suite.yaml b/k8s/drupal/apptest/tester/tests/external/drupal-external-suite.yaml index 1425a3beae..fa14c9e8ab 100644 --- a/k8s/drupal/apptest/tester/tests/external/drupal-external-suite.yaml +++ b/k8s/drupal/apptest/tester/tests/external/drupal-external-suite.yaml @@ -9,13 +9,13 @@ actions: bodyText: html: title: - equals: 'Welcome! | Drupal_Site' + equals: 'Welcome! | C2D_Drupal_Site' - name: Site address should be 200 OK (external IP) (TLS) bashTest: script: curl -f -k "https://${EXTERNAL_IP}" expect: stdout: - contains: 'Welcome to Drupal_Site | Drupal_Site' + contains: 'Welcome to Drupal_Site | C2D_Drupal_Site' exitCode: equals: 0 diff --git a/k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml b/k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml index 56fbd75dd0..d7bdd8e22f 100644 --- a/k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml +++ b/k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml @@ -74,7 +74,7 @@ spec: path: / port: 80 initialDelaySeconds: 300 - periodSeconds: 120 + periodSeconds: 60 timeoutSeconds: 5 successThreshold: 2 failureThreshold: 10 diff --git a/k8s/drupal/chart/drupal/templates/mariadb-secret.yaml b/k8s/drupal/chart/drupal/templates/mariadb-secret.yaml index 219459ccb7..3a0c677a6f 100644 --- a/k8s/drupal/chart/drupal/templates/mariadb-secret.yaml +++ b/k8s/drupal/chart/drupal/templates/mariadb-secret.yaml @@ -23,7 +23,7 @@ stringData: mysqld_exporter.sql: | CREATE USER IF NOT EXISTS '{{ .Values.db.exporter.user }}'@'127.0.0.1' IDENTIFIED BY '{{ .Values.db.exporter.password }}' WITH MAX_USER_CONNECTIONS 3; # https://dev.mysql.com/doc/refman/5.6/en/grant.html - GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO '{{ .Values.db.exporter.user }}'@'127.0.0.1'; + GRANT PROCESS, REPLICATION CLIENT, SLAVE MONITOR, SELECT ON *.* TO '{{ .Values.db.exporter.user }}'@'127.0.0.1'; FLUSH PRIVILEGES; data: mysqld-exporter-pass: {{ .Values.db.exporter.password | b64enc | quote }} diff --git a/k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml b/k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml index 440dfc69af..2f985aff3d 100644 --- a/k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml +++ b/k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml @@ -88,10 +88,10 @@ spec: httpGet: path: /metrics port: 9104 - initialDelaySeconds: 240 + initialDelaySeconds: 160 timeoutSeconds: 30 failureThreshold: 10 - periodSeconds: 120 + periodSeconds: 60 {{ if .Values.metrics.exporter.enabled }} - name: prometheus-to-sd image: {{ .Values.metrics.image }} From 209f7bf38c7358b4e18fdbabbceb489041ca955e Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 05:53:30 +0100 Subject: [PATCH 03/15] K8s - Falco - Add annotations (#2845) * K8s - Falco - Add annotations * fix: tests --- k8s/falco/Makefile | 1 + k8s/falco/apptest/tester/Dockerfile | 5 ++--- k8s/falco/apptest/tester/tests/basic-suite.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/k8s/falco/Makefile b/k8s/falco/Makefile index b325260647..edbe9cd50e 100644 --- a/k8s/falco/Makefile +++ b/k8s/falco/Makefile @@ -7,6 +7,7 @@ CHART_NAME := falco APP_ID ?= $(CHART_NAME) TRACK ?= 0.36 +SERVICE_NAME := services/76e37ab7-1ffc-47ce-9e31-0b3791bb75b0.cloudpartnerservices.goog EXPORTER_TAG ?= 0.7 METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/falco/apptest/tester/Dockerfile b/k8s/falco/apptest/tester/Dockerfile index 544579fae3..42cd5d018c 100644 --- a/k8s/falco/apptest/tester/Dockerfile +++ b/k8s/falco/apptest/tester/Dockerfile @@ -1,14 +1,13 @@ -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 \ curl \ gettext \ python3 \ - wget \ && 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.12.0/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl diff --git a/k8s/falco/apptest/tester/tests/basic-suite.yaml b/k8s/falco/apptest/tester/tests/basic-suite.yaml index c2f05328d1..68c1807fd7 100644 --- a/k8s/falco/apptest/tester/tests/basic-suite.yaml +++ b/k8s/falco/apptest/tester/tests/basic-suite.yaml @@ -3,9 +3,9 @@ actions: bashTest: script: |- kubectl wait --for=jsonpath='{.status.numberReady}'=3 --timeout=120s --namespace $NAMESPACE daemonset "${APP_INSTANCE_NAME}-falco" - falcoPods=$(kubectl get pods -l app.kubernetes.io/component=falco -o jsonpath="{..metadata.name}") + falcoPods=$(kubectl get pods -n $NAMESPACE -l app.kubernetes.io/component=falco -o jsonpath="{..metadata.name}") for podName in ${falcoPods}; do - kubectl exec ${podName} -c falco -- curl localhost:8765/healthz + kubectl exec ${podName} -c falco -- curl -s localhost:8765/healthz if [ $? -ne 0 ]; then exit 1 fi From b1e30610ec1a8ae020a6f8546992bc0cecb60bde Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 06:06:29 +0100 Subject: [PATCH 04/15] K8s - Gitea - Add annotations (#2846) * K8s - Gitea - Add annotations * fix: add ca-certificates to tester container --- k8s/gitea/Makefile | 1 + k8s/gitea/apptest/tester/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/k8s/gitea/Makefile b/k8s/gitea/Makefile index 179eb03663..fd22ca602d 100644 --- a/k8s/gitea/Makefile +++ b/k8s/gitea/Makefile @@ -8,6 +8,7 @@ APP_ID ?= $(CHART_NAME) WAIT_FOR_READY_TIMEOUT ?= 100 TRACK ?= 1.22 +SERVICE_NAME := services/174d8184-ad0d-4f01-8537-68c9110c4d38.cloudpartnerservices.goog POSTGRESQL_TAG ?= latest EXPORTER_TAG ?= latest METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/gitea/apptest/tester/Dockerfile b/k8s/gitea/apptest/tester/Dockerfile index ea20e34f0f..714ea3cd2c 100644 --- a/k8s/gitea/apptest/tester/Dockerfile +++ b/k8s/gitea/apptest/tester/Dockerfile @@ -1,13 +1,13 @@ -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 \ postgresql-client \ - wget \ curl \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /opt/kubectl/1.21 \ - && wget -q -O /opt/kubectl/1.21/kubectl \ + && curl -L -o /opt/kubectl/1.21/kubectl \ https://storage.googleapis.com/kubernetes-release/release/v1.21.6/bin/linux/amd64/kubectl \ && chmod 755 /opt/kubectl/1.21/kubectl \ && ln -s /opt/kubectl/1.21/kubectl /usr/bin/kubectl From 1c0b1f07e0061d4d745816b4c0b196d7bbf896fb Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 08:52:15 +0100 Subject: [PATCH 05/15] K8s - InfluxDB - Add annotations (#2848) --- k8s/influxdb/Makefile | 1 + k8s/influxdb/apptest/tester/Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/influxdb/Makefile b/k8s/influxdb/Makefile index 920c2a34be..e1bd294335 100644 --- a/k8s/influxdb/Makefile +++ b/k8s/influxdb/Makefile @@ -7,6 +7,7 @@ CHART_NAME := influxdb APP_ID ?= $(CHART_NAME) TRACK ?= 2.7 +SERVICE_NAME := services/98477e57-9f15-425d-9e9c-f9318eea0d56.cloudpartnerservices.goog METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/influxdb/apptest/tester/Dockerfile b/k8s/influxdb/apptest/tester/Dockerfile index a8666ea007..dc2779f5c5 100644 --- a/k8s/influxdb/apptest/tester/Dockerfile +++ b/k8s/influxdb/apptest/tester/Dockerfile @@ -1,15 +1,14 @@ -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 \ curl \ && 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.12.0/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From 6c8a287e466bf96e5c2c7d82a8eace6bd0ab2137 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 09:09:14 +0100 Subject: [PATCH 06/15] K8s - Joomla - Add annotations (#2851) --- k8s/joomla/Makefile | 1 + k8s/joomla/apptest/tester/Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/joomla/Makefile b/k8s/joomla/Makefile index e4f1e6a843..ba5b28d4e6 100644 --- a/k8s/joomla/Makefile +++ b/k8s/joomla/Makefile @@ -7,6 +7,7 @@ CHART_NAME ?= joomla APP_ID ?= $(CHART_NAME) TRACK ?= 4.4 +SERVICE_NAME := services/012bd695-77ae-4119-a8d1-371a93102f64.cloudpartnerservices.goog APACHE_EXPORTER_TAG ?= 0.13 METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/joomla/apptest/tester/Dockerfile b/k8s/joomla/apptest/tester/Dockerfile index c1cbeeedc3..fa175c558b 100644 --- a/k8s/joomla/apptest/tester/Dockerfile +++ b/k8s/joomla/apptest/tester/Dockerfile @@ -1,16 +1,15 @@ -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 \ mariadb-client \ curl \ && 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.5/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From 5ecfb52fba4254a450c8f844b3c56cccc59d9858 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 09:32:06 +0100 Subject: [PATCH 07/15] K8s - MariaDB - Add annotations (#2853) --- k8s/mariadb/Makefile | 1 + k8s/mariadb/apptest/tester/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/k8s/mariadb/Makefile b/k8s/mariadb/Makefile index 9d94772a6c..98a820ef6e 100644 --- a/k8s/mariadb/Makefile +++ b/k8s/mariadb/Makefile @@ -9,6 +9,7 @@ APP_ID ?= $(CHART_NAME) VERIFY_WAIT_TIMEOUT = 1800 TRACK ?= 11.5 +SERVICE_NAME := services/1b05c98f-d74b-4d67-a78c-16ea597cd191.cloudpartnerservices.goog METRICS_EXPORTER_TAG ?= v0.5.1 SOURCE_REGISTRY ?= marketplace.gcr.io/google diff --git a/k8s/mariadb/apptest/tester/Dockerfile b/k8s/mariadb/apptest/tester/Dockerfile index 75e2e50915..90fff12412 100644 --- a/k8s/mariadb/apptest/tester/Dockerfile +++ b/k8s/mariadb/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 \ mariadb-client \ From ae6b58a9829a06821d9656b81340f09e322d19dc Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 09:50:42 +0100 Subject: [PATCH 08/15] K8s - MariaDB Galera - Add annotations (#2854) --- k8s/mariadb-galera/Makefile | 1 + k8s/mariadb-galera/apptest/tester/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/k8s/mariadb-galera/Makefile b/k8s/mariadb-galera/Makefile index 77f5fe086f..e813bc443d 100644 --- a/k8s/mariadb-galera/Makefile +++ b/k8s/mariadb-galera/Makefile @@ -9,6 +9,7 @@ APP_ID ?= $(CHART_NAME) VERIFY_WAIT_TIMEOUT = 1800 TRACK ?= 11.5 +SERVICE_NAME := services/8afcaf9c-1b2d-47c1-93f0-588a78dccca9.cloudpartnerservices.goog METRICS_EXPORTER_TAG ?= v0.5.1 SOURCE_REGISTRY ?= marketplace.gcr.io/google diff --git a/k8s/mariadb-galera/apptest/tester/Dockerfile b/k8s/mariadb-galera/apptest/tester/Dockerfile index a3df6c8940..40d583a23f 100644 --- a/k8s/mariadb-galera/apptest/tester/Dockerfile +++ b/k8s/mariadb-galera/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 \ mariadb-client \ From 689865198f4096fba9d9a8113cb4fdd6c370b135 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Wed, 15 Jan 2025 10:08:42 +0100 Subject: [PATCH 09/15] K8s - Prometheus - Add annotations (#2857) --- k8s/prometheus/Makefile | 1 + k8s/prometheus/apptest/tester/Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s/prometheus/Makefile b/k8s/prometheus/Makefile index 522df75c23..6a67be77af 100644 --- a/k8s/prometheus/Makefile +++ b/k8s/prometheus/Makefile @@ -7,6 +7,7 @@ CHART_NAME := prometheus APP_ID ?= $(CHART_NAME) TRACK ?= 2.54 +SERVICE_NAME := services/057070e7-b352-4b46-bc03-fc8f141fce9a.cloudpartnerservices.goog TRACK_ALERTMANAGER ?= 0.27 TRACK_KUBESTATEMETRICS ?= 2.13 TRACK_NODEEXPORTER ?= 1.8 diff --git a/k8s/prometheus/apptest/tester/Dockerfile b/k8s/prometheus/apptest/tester/Dockerfile index 30ff293d33..431be7cb9f 100644 --- a/k8s/prometheus/apptest/tester/Dockerfile +++ b/k8s/prometheus/apptest/tester/Dockerfile @@ -1,15 +1,14 @@ -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 \ curl \ && 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.23.15/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From f7d516f6ece61c03385e1432b32b6eb8624d6d6d Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Thu, 16 Jan 2025 11:36:38 +0100 Subject: [PATCH 10/15] K8s - Solr - Add annotations (#2860) --- k8s/solr/Makefile | 1 + k8s/solr/apptest/tester/Dockerfile | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/k8s/solr/Makefile b/k8s/solr/Makefile index 6c920866ec..5ed36d9c72 100644 --- a/k8s/solr/Makefile +++ b/k8s/solr/Makefile @@ -9,6 +9,7 @@ WAIT_FOR_READY_TIMEOUT := 600 TRACK ?= 9.6 ZK_TAG ?= 3.8 +SERVICE_NAME := services/effa00b5-9dfc-4626-aa25-85435f332575.cloudpartnerservices.goog METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/solr/apptest/tester/Dockerfile b/k8s/solr/apptest/tester/Dockerfile index 23fb5f9f91..563b3be197 100644 --- a/k8s/solr/apptest/tester/Dockerfile +++ b/k8s/solr/apptest/tester/Dockerfile @@ -1,17 +1,17 @@ -FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.5 +FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.8 RUN set -eu \ && apt-get update \ && apt-get install -y --no-install-recommends \ - ca-certificates \ - gettext \ - jq \ - uuid-runtime \ - wget \ - curl + ca-certificates \ + gettext \ + jq \ + uuid-runtime \ + wget \ + curl RUN set -eu \ - && wget -q -O /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.23.15/bin/linux/amd64/kubectl \ + && curl -L -o /bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.23.15/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl COPY tests/solrCloud-test.yaml /tests/solrCloud-test.yaml From 81aea59f1aee79a08c09dc13ceca2a16b9494785 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Thu, 16 Jan 2025 11:56:09 +0100 Subject: [PATCH 11/15] K8s - Spark - Add annotations (#2861) --- k8s/spark/Makefile | 1 + k8s/spark/apptest/tester/Dockerfile | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/k8s/spark/Makefile b/k8s/spark/Makefile index b398c57e16..40fd988d94 100644 --- a/k8s/spark/Makefile +++ b/k8s/spark/Makefile @@ -8,6 +8,7 @@ APP_ID ?= $(CHART_NAME) TRACK ?= 3.5 METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 +SERVICE_NAME := services/1372e838-1abc-4b08-aaf0-94d75cba452a.cloudpartnerservices.goog SOURCE_REGISTRY ?= marketplace.gcr.io/google diff --git a/k8s/spark/apptest/tester/Dockerfile b/k8s/spark/apptest/tester/Dockerfile index 8e61fcef6e..3bf4ddfc51 100644 --- a/k8s/spark/apptest/tester/Dockerfile +++ b/k8s/spark/apptest/tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,14 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -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 wget dnsutils netcat jq \ + ca-certificates curl dnsutils netcat-traditional jq \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /opt/kubectl/1.21 \ - && wget -q -O /opt/kubectl/1.21/kubectl \ + && curl -L -o /opt/kubectl/1.21/kubectl \ https://storage.googleapis.com/kubernetes-release/release/v1.21.6/bin/linux/amd64/kubectl \ && chmod 755 /opt/kubectl/1.21/kubectl \ && ln -s /opt/kubectl/1.21/kubectl /usr/bin/kubectl From fbe94f10e73c0317bf9384203a2db82dfcc5f3de Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Fri, 17 Jan 2025 15:06:16 +0100 Subject: [PATCH 12/15] K8s - NGINX - Add annotations (#2855) * K8s - NGINX - Add annotations * fix: add wget as its used in tests --- k8s/nginx/Makefile | 1 + k8s/nginx/apptest/tester/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/k8s/nginx/Makefile b/k8s/nginx/Makefile index 1f01b24231..ab052a12a8 100644 --- a/k8s/nginx/Makefile +++ b/k8s/nginx/Makefile @@ -7,6 +7,7 @@ CHART_NAME := nginx APP_ID ?= $(CHART_NAME) TRACK ?= 1.26 +SERVICE_NAME := services/ebfbb623-a7d4-4e60-ac99-416808963e17.cloudpartnerservices.goog EXPORTER_TAG ?= 1.3 METRICS_EXPORTER_TAG ?= v0.11.1-gke.1 diff --git a/k8s/nginx/apptest/tester/Dockerfile b/k8s/nginx/apptest/tester/Dockerfile index a8666ea007..1c10cc3539 100644 --- a/k8s/nginx/apptest/tester/Dockerfile +++ b/k8s/nginx/apptest/tester/Dockerfile @@ -1,15 +1,15 @@ -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 \ curl \ + wget \ && 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.12.0/bin/linux/amd64/kubectl \ && chmod 755 /bin/kubectl From 4c227cba3abf1cbcea604ccc1f323f618ee49655 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Fri, 17 Jan 2025 15:20:31 +0100 Subject: [PATCH 13/15] 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 14/15] 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 15/15] 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 \