From b62ead717c2b3f320d08b7af2671ac02e36fcdcf Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Mon, 13 Jan 2025 12:53:23 +0100 Subject: [PATCH 1/2] K8s - Falco - Add annotations --- k8s/falco/Makefile | 1 + k8s/falco/apptest/tester/Dockerfile | 5 ++--- 2 files changed, 3 insertions(+), 3 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 From 25f0326f2530fe6e058b989b425b43871a404b34 Mon Sep 17 00:00:00 2001 From: Armando Miani Date: Tue, 14 Jan 2025 14:01:15 +0100 Subject: [PATCH 2/2] fix: tests --- k8s/falco/apptest/tester/tests/basic-suite.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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