Skip to content

Commit

Permalink
[dash0] improve local k8s deployment
Browse files Browse the repository at this point in the history
Extract port forward into separate script.
  • Loading branch information
basti1302 committed Mar 11, 2024
1 parent 20b9403 commit 0ceb210
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kubernetes/local/deploy-two-namespaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ kubectl exec --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0 -- psql p
kubectl exec --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/20-ffs_data.sql

echo waiting for the frontend and frontendproxy pod to become ready
sleep 5
kubectl wait --namespace otel-demo-ns-1 --for=condition=ready pod -l app.kubernetes.io/component=frontendproxy --timeout 10s
kubectl wait --namespace otel-demo-ns-1 --for=condition=ready pod -l app.kubernetes.io/component=frontend --timeout 20s
kubectl port-forward --namespace otel-demo-ns1 service/opentelemetry-demo-ns1-frontendproxy 8080:8080
./port-forward-two-ns.sh

3 changes: 2 additions & 1 deletion kubernetes/local/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ kubectl exec --namespace otel-demo-ns opentelemetry-demo-postgresql-0 -- psql po
kubectl exec --namespace otel-demo-ns opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/20-ffs_data.sql

echo waiting for the frontend and frontendproxy pod to become ready
sleep 5
kubectl wait --namespace otel-demo-ns --for=condition=ready pod -l app.kubernetes.io/component=frontendproxy --timeout 10s
kubectl wait --namespace otel-demo-ns --for=condition=ready pod -l app.kubernetes.io/component=frontend --timeout 20s
kubectl port-forward --namespace otel-demo-ns service/opentelemetry-demo-frontendproxy 8080:8080
./port-forward.sh

6 changes: 6 additions & 0 deletions kubernetes/local/port-forward-two-ns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

kubectl port-forward --namespace otel-demo-ns1 service/opentelemetry-demo-ns1-frontendproxy 8080:8080

6 changes: 6 additions & 0 deletions kubernetes/local/port-forward.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

kubectl port-forward --namespace otel-demo-ns service/opentelemetry-demo-frontendproxy 8080:8080

0 comments on commit 0ceb210

Please sign in to comment.