Skip to content

Commit

Permalink
Merge branch 'master' into miani-k8s-rabbitmq-20250114
Browse files Browse the repository at this point in the history
  • Loading branch information
armandomiani authored Jan 20, 2025
2 parents fda7f77 + b15857b commit 0f603e1
Show file tree
Hide file tree
Showing 37 changed files with 85 additions and 73 deletions.
1 change: 1 addition & 0 deletions k8s/cassandra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 14 additions & 13 deletions k8s/cassandra/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 5 additions & 5 deletions k8s/cassandra/apptest/tester/tests/basic-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions k8s/django/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions k8s/django/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions k8s/drupal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions k8s/drupal/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions k8s/drupal/apptest/tester/tests/common/drupal-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -24,4 +24,4 @@ actions:
bodyText:
html:
title:
equals: 'Log in | Drupal_Site'
equals: 'Log in | C2D_Drupal_Site'
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion k8s/drupal/chart/drupal/templates/drupal-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
path: /
port: 80
initialDelaySeconds: 300
periodSeconds: 120
periodSeconds: 60
timeoutSeconds: 5
successThreshold: 2
failureThreshold: 10
Expand Down
2 changes: 1 addition & 1 deletion k8s/drupal/chart/drupal/templates/mariadb-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions k8s/drupal/chart/drupal/templates/mariadb-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions k8s/falco/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions k8s/falco/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions k8s/falco/apptest/tester/tests/basic-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions k8s/gitea/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions k8s/gitea/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions k8s/influxdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions k8s/influxdb/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions k8s/joomla/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions k8s/joomla/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions k8s/kafka/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions k8s/kafka/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions k8s/mariadb-galera/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion k8s/mariadb-galera/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
1 change: 1 addition & 0 deletions k8s/mariadb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion k8s/mariadb/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
1 change: 1 addition & 0 deletions k8s/nginx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions k8s/nginx/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions k8s/postgresql/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 0f603e1

Please sign in to comment.