From 84acbaccd9826a6ff4678ccb5470404a3bfcf03f Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 18 Sep 2024 09:06:47 +0200 Subject: [PATCH] add k8s readiness probe support (#108) --- docker/run-all.sh | 3 ++- examples/python/docker-compose.oats.yml | 2 +- k8s/lgtm.yaml | 7 ++++++- oats | 1 - 4 files changed, 9 insertions(+), 4 deletions(-) delete mode 160000 oats diff --git a/docker/run-all.sh b/docker/run-all.sh index 1a87892..7d30c56 100755 --- a/docker/run-all.sh +++ b/docker/run-all.sh @@ -32,7 +32,8 @@ while ! curl -sg 'http://localhost:9090/api/v1/query?query=otelcol_process_uptim sleep 1 done -echo "The OpenTelemetry collector and the Grafana LGTM stack are up and running." +touch /tmp/ready +echo "The OpenTelemetry collector and the Grafana LGTM stack are up and running. (created /tmp/ready)" echo "Open ports:" echo " - 4317: OpenTelemetry GRPC endpoint" diff --git a/examples/python/docker-compose.oats.yml b/examples/python/docker-compose.oats.yml index 7fdf425..6e40041 100644 --- a/examples/python/docker-compose.oats.yml +++ b/examples/python/docker-compose.oats.yml @@ -2,7 +2,7 @@ version: '3.4' services: - go: + python: build: context: . dockerfile: Dockerfile diff --git a/k8s/lgtm.yaml b/k8s/lgtm.yaml index 7ac3579..a7ea377 100644 --- a/k8s/lgtm.yaml +++ b/k8s/lgtm.yaml @@ -40,4 +40,9 @@ spec: ports: - containerPort: 3000 - containerPort: 4317 - - containerPort: 4318 \ No newline at end of file + - containerPort: 4318 + readinessProbe: + exec: + command: + - cat + - /tmp/ready diff --git a/oats b/oats deleted file mode 160000 index f73c5c5..0000000 --- a/oats +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f73c5c5eb1715296d0900eb5fc7c26fd14968b3f