Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions gsoc-otel-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

A GSoC 2026 sample that packages the [OpenTelemetry Astronomy Shop](https://opentelemetry.io/docs/demo/) — a microservices e‑commerce demo — as a composable [kpt](https://kpt.dev) package and shows how the same package can be rebranded, regionalized, wired up for telemetry, and updated safely using **Configuration as Data** and **KRM Functions**.

<!-- <p align="center">
<!-- Project banner / architecture image / GIF — replace with your own -->
<!-- ![banner](./docs/images/banner.png) -->
<!-- </p> -->



---
Expand Down Expand Up @@ -85,7 +82,12 @@ app/ (ROOT PACKAGE)
### Prerequisites

- A working Kubernetes cluster (kind, minikube, or any conformant cluster).
- Docker as container engine
- Docker as container engine.
- If you want to build the images, you may run the provided script (this is for a kind cluster):
```bash
./scripts/build_and_load.sh <cluster_name>
```

- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) — for cluster interaction.
- [`kpt`](https://kpt.dev/installation/kpt-cli) — for fetching, rendering, and applying the package.
- Create a namespace called `otel-demo`
Expand Down
48 changes: 0 additions & 48 deletions gsoc-otel-demo/app/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,51 +31,3 @@ pipeline:
configPath: profiles/validator-profile.yaml
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
configPath: chaos/validator-chaos.yaml
status:
conditions:
- type: Rendered
status: "True"
reason: RenderSuccess
renderStatus:
mutationSteps:
- image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.4.5
exitCode: 0
results:
- message: all matching namespaces are already "otel-demo". no value changed
severity: info
- message: all `depends-on` annotations are up-to-date. no `namespace` changed
severity: info
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.4.5
exitCode: 0
results:
- message: all matching namespaces are already "otel-demo". no value changed
severity: info
- message: all `depends-on` annotations are up-to-date. no `namespace` changed
severity: info
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/apply-replacements:v0.1.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/apply-replacements:v0.1.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/apply-replacements:v0.1.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
validationSteps:
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
- image: ghcr.io/kptdev/krm-functions-catalog/starlark:v0.5.5
exitCode: 0
50 changes: 50 additions & 0 deletions gsoc-otel-demo/scripts/build_and_load.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status
set -e

echo "Starting build and load process for astronomy and florist resources..."

KIND_CLUSTER_NAME=${1:-"kind"} # Default kind cluster name is 'kind', or use the first argument

build_and_load() {
local app=$1
local service=$2
local dir="$app/$service"
local image_name="${app}-${service}:v1"

if [ -f "$dir/Dockerfile" ]; then
echo "--------------------------------------------------------"
echo "🏗️ Building image $image_name from $dir..."
if [ "$service" = "ad" ]; then
docker build --build-arg OTEL_JAVA_AGENT_VERSION=2.8.0 -t "$image_name" "$dir"
else
docker build -t "$image_name" "$dir"
fi

echo "🚢 Loading image $image_name into kind cluster '$KIND_CLUSTER_NAME'..."
kind load docker-image "$image_name" --name "$KIND_CLUSTER_NAME"
echo "✅ Successfully loaded $image_name"
else
echo "⚠️ No Dockerfile found in $dir, skipping..."
fi
}

# Iterate over the two main apps
for app in astronomy florist; do
if [ -d "$app" ]; then
echo "Processing $app resources..."
for service_dir in "$app"/*; do
if [ -d "$service_dir" ]; then
service=$(basename "$service_dir")
build_and_load "$app" "$service"
fi
done
else
echo "❌ Directory $app not found! Run this script from the root of the project."
exit 1
fi
done

echo "--------------------------------------------------------"
echo "🎉 All astronomy and florist images have been built and loaded into the '$KIND_CLUSTER_NAME' kind cluster successfully!"