initial commit
All checks were successful
Build and Publish TechDocs / build-and-publish (push) Successful in 1m0s

Change-Id: I5f624b221545283dafa1ca30bef9b8b722fcf0c7
This commit is contained in:
Scaffolder
2026-07-13 08:10:15 +00:00
commit 489eba335a
209 changed files with 105507 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
name: Build and Push to ACR
on:
push:
branches: [ dev ]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AZURE_FEDERATED_TOKEN_FILE: /var/run/secrets/azure/tokens/azure-identity-token
jobs:
build:
name: Build and Push
runs-on: ubuntu-latest
if: >-
github.ref != 'refs/heads/main' && (
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000')
)
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Azure CLI
run: |
command -v az &>/dev/null || curl -sL https://aka.ms/InstallAzureCLIDeb | bash
- name: Install Docker CLI
run: |
command -v docker &>/dev/null || (apt-get update -qq && apt-get install -y docker.io)
docker --version
- name: Azure login (OIDC)
run: |
az login \
--service-principal \
--username "$AZURE_CLIENT_ID" \
--tenant "$AZURE_TENANT_ID" \
--federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)"
echo "✓ Azure login successful"
- name: Get ACR details
run: |
ACR_NAME=$(az acr list --query "[0].name" -o tsv)
ACR_NAME="${ACR_NAME:-bstagecjotdevacr}"
echo "ACR_NAME=$ACR_NAME" >> $GITHUB_ENV
echo "ACR_LOGIN_SERVER=${ACR_NAME}.azurecr.io" >> $GITHUB_ENV
echo "✓ Using ACR: ${ACR_NAME}.azurecr.io"
- name: ACR Login
run: |
ACR_TOKEN=$(az acr login --name "$ACR_NAME" --expose-token --output tsv --query accessToken)
docker login "$ACR_LOGIN_SERVER" \
--username 00000000-0000-0000-0000-000000000000 \
--password "$ACR_TOKEN"
echo "✓ ACR login successful"
- name: Build and Push Docker image
run: |
IMAGE_TAG="${{ gitea.sha }}"
IMAGE_FULL="${ACR_LOGIN_SERVER}/lint-enforcement-v3:${IMAGE_TAG}"
IMAGE_LATEST="${ACR_LOGIN_SERVER}/lint-enforcement-v3:latest"
docker build -t "$IMAGE_FULL" -t "$IMAGE_LATEST" .
docker push "$IMAGE_FULL"
docker push "$IMAGE_LATEST"
echo "IMAGE_FULL=$IMAGE_FULL" >> $GITHUB_ENV
echo "✓ Pushed: $IMAGE_FULL"
- name: Build Summary
run: |
echo "### ✅ Build Successful" >> $GITHUB_STEP_SUMMARY
echo "| | |" >> $GITHUB_STEP_SUMMARY
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
echo "| **Service** | lint-enforcement-v3 |" >> $GITHUB_STEP_SUMMARY
echo "| **Commit** | ${{ gitea.sha }} |" >> $GITHUB_STEP_SUMMARY
echo "| **Image** | $IMAGE_FULL |" >> $GITHUB_STEP_SUMMARY

View File

@@ -0,0 +1,138 @@
name: Integration Test
on:
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Job 1: Platform Conformance ───────────────────────────────────────────
platform-check:
name: Platform Conformance
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate catalog-info.yaml
run: |
if [ ! -f catalog-info.yaml ]; then
echo "✗ catalog-info.yaml not found"
exit 1
fi
python3 -c "import yaml; list(yaml.safe_load_all(open('catalog-info.yaml')))" 2>/dev/null \
|| (pip install pyyaml -q && python3 -c "import yaml; list(yaml.safe_load_all(open('catalog-info.yaml')))")
echo "✓ catalog-info.yaml is valid YAML"
- name: Check platform files
run: |
ERRORS=0
for f in catalog-info.yaml; do
if [ ! -f "$f" ]; then
echo "✗ Missing: $f"
ERRORS=$((ERRORS+1))
else
echo "✓ Found: $f"
fi
done
if [ $ERRORS -gt 0 ]; then exit 1; fi
# ── Job 2: Unit Tests + Container Smoke ───────────────────────────────────
smoke-test:
name: Unit Tests + Container Smoke
runs-on: ubuntu-latest
needs: platform-check
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free disk space
run: |
docker system prune -f 2>/dev/null || true
df -h / 2>/dev/null || true
- name: Install Docker CLI
run: command -v docker &>/dev/null || (apt-get update -qq && apt-get install -y docker.io)
- name: Build container image
run: |
if [ -f Dockerfile ]; then
docker build -t ci-image:test .
else
echo "No Dockerfile found — skipping container smoke test"
echo "SKIP_SMOKE=true" >> $GITHUB_ENV
fi
- name: Start service and wait for health
if: env.SKIP_SMOKE != 'true'
run: |
CONTAINER_NAME="ci-${GITHUB_RUN_ID}"
PORT="${CONTAINER_PORT:-8080}"
HEALTH_PATH="${HEALTH_ENDPOINT:-/health}"
echo "CONTAINER_NAME=${CONTAINER_NAME}" >> $GITHUB_ENV
echo "CONTAINER_PORT=${PORT}" >> $GITHUB_ENV
echo "HEALTH_PATH=${HEALTH_PATH}" >> $GITHUB_ENV
docker run -d --name "${CONTAINER_NAME}" -e OTEL_SDK_DISABLED=true ci-image:test
for i in $(seq 1 10); do
CONTAINER_IP=$(docker inspect "${CONTAINER_NAME}" --format '{{.NetworkSettings.IPAddress}}' 2>/dev/null)
[ -n "${CONTAINER_IP}" ] && break
sleep 1
done
echo "CONTAINER_IP=${CONTAINER_IP}" >> $GITHUB_ENV
echo "Waiting for ${HEALTH_PATH} on ${CONTAINER_IP}:${PORT} (up to 180s)..."
DEADLINE=$(($(date +%s) + 180))
while true; do
if curl -sf "http://${CONTAINER_IP}:${PORT}${HEALTH_PATH}" >/dev/null 2>&1; then
break
fi
if [ $(date +%s) -ge $DEADLINE ]; then
echo "Timeout waiting for health check"
docker logs "${CONTAINER_NAME}" 2>&1 | tail -30
exit 1
fi
if ! docker ps --filter "name=${CONTAINER_NAME}" --format '{{.Status}}' | grep -q Up; then
echo "Container exited:"
docker logs "${CONTAINER_NAME}" 2>&1 | tail -30
exit 1
fi
echo " still waiting..."; sleep 3
done
echo "✓ Service healthy at ${CONTAINER_IP}:${PORT}${HEALTH_PATH}"
- name: Validate health response
if: env.SKIP_SMOKE != 'true'
run: |
curl -sf "http://${CONTAINER_IP}:${CONTAINER_PORT}${HEALTH_PATH}" > /tmp/health.json
echo "Health response:"
cat /tmp/health.json
echo ""
echo "✓ Container smoke test: PASSED"
- name: Cleanup
if: always()
run: docker rm -f "ci-${GITHUB_RUN_ID}" 2>/dev/null || true
- name: Post commit status
if: always()
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
JOB_STATUS: ${{ job.status }}
run: |
STATE=$([[ "$JOB_STATUS" == "success" ]] && echo "success" || echo "failure")
DESC=$([[ "$STATE" == "success" ]] && echo "All checks passed" || echo "Some checks failed")
curl -sf -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
-d "{\"state\":\"${STATE}\",\"context\":\"Integration Test / Unit Tests + Container Smoke (workflow_dispatch)\",\"description\":\"${DESC}\"}" \
|| true

View File

@@ -0,0 +1,219 @@
name: PR Lint and Validation Gate
on:
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
yaml-and-whitespace:
name: YAML and Whitespace
runs-on: ubuntu-latest
outputs:
elapsed_seconds: ${{ steps.elapsed.outputs.seconds }}
steps:
- name: Start timer
run: echo "START_TS=$(date +%s)" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Install yamllint
run: |
python3 -m pip install --upgrade pip
python3 -m pip install yamllint
- name: Run yamllint
run: |
yamllint -d "{extends: default, rules: {line-length: {max: 180}, truthy: disable}}" .
- name: Check trailing whitespace
run: |
if git ls-files -z | xargs -0 -I{} grep -nH -E "[[:blank:]]+$" "{}" \
--exclude="*.md" --exclude="*.svg"; then
echo "Trailing whitespace found"
exit 1
fi
- name: Capture duration
id: elapsed
if: always()
run: |
end_ts=$(date +%s)
start_ts=${START_TS:-$end_ts}
echo "seconds=$((end_ts - start_ts))" >> "$GITHUB_OUTPUT"
helm-lint:
name: Helm Lint
runs-on: ubuntu-latest
outputs:
elapsed_seconds: ${{ steps.elapsed.outputs.seconds }}
steps:
- name: Start timer
run: echo "START_TS=$(date +%s)" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Install Helm
uses: azure/setup-helm@v4
- name: Lint all charts
run: |
mapfile -t charts < <(find . -type f -name Chart.yaml -print)
if [ -z "${charts[0]:-}" ]; then
echo "No Helm charts found; skipping"
exit 0
fi
failed=0
for chart in "${charts[@]}"; do
chart_dir="$(dirname "$chart")"
echo "Linting ${chart_dir}"
if ! helm lint "$chart_dir"; then
failed=1
fi
done
exit $failed
- name: Capture duration
id: elapsed
if: always()
run: |
end_ts=$(date +%s)
start_ts=${START_TS:-$end_ts}
echo "seconds=$((end_ts - start_ts))" >> "$GITHUB_OUTPUT"
terraform-lint:
name: Terraform Validate and TFLint
runs-on: ubuntu-latest
outputs:
elapsed_seconds: ${{ steps.elapsed.outputs.seconds }}
steps:
- name: Start timer
run: echo "START_TS=$(date +%s)" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
- name: Install TFLint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: Validate Terraform directories
run: |
mapfile -t tf_dirs < <(find . -type f -name "*.tf" -exec dirname {} \; | sort -u)
if [ -z "${tf_dirs[0]:-}" ]; then
echo "No Terraform files found; skipping"
exit 0
fi
failed=0
for dir in "${tf_dirs[@]}"; do
echo "Validating ${dir}"
(
cd "$dir"
terraform init -backend=false -input=false -no-color
terraform validate -no-color
tflint --chdir .
) || failed=1
done
exit $failed
- name: Capture duration
id: elapsed
if: always()
run: |
end_ts=$(date +%s)
start_ts=${START_TS:-$end_ts}
echo "seconds=$((end_ts - start_ts))" >> "$GITHUB_OUTPUT"
policy-and-deps:
name: Policy and Dependency Scan
runs-on: ubuntu-latest
outputs:
elapsed_seconds: ${{ steps.elapsed.outputs.seconds }}
steps:
- name: Start timer
run: echo "START_TS=$(date +%s)" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Install Checkov
run: |
python3 -m pip install --upgrade pip
python3 -m pip install checkov
- name: Run Checkov (Kubernetes)
run: |
checkov -d . --framework kubernetes --skip-path "examples/default/rendered/.*" --quiet
- name: npm audit (if package.json exists)
run: |
if [ -f package.json ]; then
npm install --no-audit --no-fund
npm audit --audit-level=high
else
echo "No package.json found; skipping npm audit"
fi
- name: Maven dependency-check (if pom.xml exists)
run: |
if [ -f pom.xml ]; then
mvn -B org.owasp:dependency-check-maven:check
else
echo "No pom.xml found; skipping Maven dependency-check"
fi
- name: Capture duration
id: elapsed
if: always()
run: |
end_ts=$(date +%s)
start_ts=${START_TS:-$end_ts}
echo "seconds=$((end_ts - start_ts))" >> "$GITHUB_OUTPUT"
runtime-slo:
name: Runtime SLO (< 3 min)
if: always()
needs:
- yaml-and-whitespace
- helm-lint
- terraform-lint
- policy-and-deps
runs-on: ubuntu-latest
steps:
- name: Enforce suite runtime budget
run: |
y=${{ needs.yaml-and-whitespace.outputs.elapsed_seconds || 0 }}
h=${{ needs.helm-lint.outputs.elapsed_seconds || 0 }}
t=${{ needs.terraform-lint.outputs.elapsed_seconds || 0 }}
p=${{ needs.policy-and-deps.outputs.elapsed_seconds || 0 }}
# Jobs run in parallel; full-suite wall-clock is approximated by max(job runtimes).
suite=$y
[ $h -gt $suite ] && suite=$h
[ $t -gt $suite ] && suite=$t
[ $p -gt $suite ] && suite=$p
echo "## PR Lint Gate Runtime" >> "$GITHUB_STEP_SUMMARY"
echo "- YAML and Whitespace: ${y}s" >> "$GITHUB_STEP_SUMMARY"
echo "- Helm Lint: ${h}s" >> "$GITHUB_STEP_SUMMARY"
echo "- Terraform Validate and TFLint: ${t}s" >> "$GITHUB_STEP_SUMMARY"
echo "- Policy and Dependency Scan: ${p}s" >> "$GITHUB_STEP_SUMMARY"
echo "- Full suite (parallel max): ${suite}s" >> "$GITHUB_STEP_SUMMARY"
if [ $suite -gt 180 ]; then
echo "Runtime SLO exceeded: ${suite}s > 180s"
exit 1
fi

View File

@@ -0,0 +1,164 @@
name: Security Scanning
on:
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
env:
TRIVY_VERSION: "0.69.3"
GITLEAKS_VERSION: "8.18.4"
COMPONENT_ID: lint-enforcement-v3
jobs:
# ─────────────────────────────────────────────
# 1. FILESYSTEM & DEPENDENCY SCAN
# Trivy auto-detects lockfiles (pom.xml,
# package-lock.json, go.sum, requirements.txt, etc.)
# and scans for vulns, secrets, and misconfigs.
# ─────────────────────────────────────────────
trivy-scan:
name: Trivy — Filesystem & Dependency Scan
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Trivy
run: |
set -e
mkdir -p $HOME/.local/bin
curl -sSfL "https://github.com/aquasecurity/trivy/releases/download/v${{ env.TRIVY_VERSION }}/trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz" \
| tar -xz -C $HOME/.local/bin trivy
chmod +x $HOME/.local/bin/trivy
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run Trivy filesystem scan
run: |
$HOME/.local/bin/trivy fs \
--exit-code 0 \
--severity HIGH,CRITICAL \
--format sarif \
--output trivy-results.sarif \
--scanners vuln,secret,misconfig \
--dependency-tree \
.
- name: Upload SARIF report
uses: actions/upload-artifact@v3
if: always()
with:
name: trivy-sarif
path: trivy-results.sarif
retention-days: 30
- name: Print human-readable summary
run: |
$HOME/.local/bin/trivy fs \
--exit-code 0 \
--severity MEDIUM,HIGH,CRITICAL \
--format table \
--scanners vuln,secret,misconfig \
.
- name: Enforce quality gate (CRITICAL — report only)
run: |
$HOME/.local/bin/trivy fs \
--exit-code 0 \
--severity CRITICAL \
--scanners vuln,misconfig \
.
# ─────────────────────────────────────────────
# 2. SECRET SCAN — detect leaked credentials
# across full git history.
# ─────────────────────────────────────────────
gitleaks-scan:
name: Gitleaks — Secret Scan
runs-on: ubuntu-latest
steps:
- name: Checkout source (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install Gitleaks binary directly — the GitHub Action
# relies on GITHUB_TOKEN which is unavailable on Gitea Act runners.
- name: Install Gitleaks
run: |
set -e
mkdir -p $HOME/.local/bin
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${{ env.GITLEAKS_VERSION }}/gitleaks_${{ env.GITLEAKS_VERSION }}_linux_x64.tar.gz" \
| tar -xz -C $HOME/.local/bin gitleaks
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run Gitleaks
run: |
$HOME/.local/bin/gitleaks detect \
--source . \
--report-format sarif \
--report-path gitleaks-results.sarif \
--exit-code 1 \
--log-level warn
- name: Upload SARIF report
uses: actions/upload-artifact@v3
if: always()
with:
name: gitleaks-sarif
path: gitleaks-results.sarif
retention-days: 30
# ─────────────────────────────────────────────
# 3. SUMMARY — aggregate all SARIF reports
# ─────────────────────────────────────────────
security-summary:
name: Security Summary
needs:
- trivy-scan
- gitleaks-scan
runs-on: ubuntu-latest
if: always()
steps:
- name: Download Trivy SARIF
uses: actions/download-artifact@v3
with:
name: trivy-sarif
path: sarif-reports/
continue-on-error: true
- name: Download Gitleaks SARIF
uses: actions/download-artifact@v3
with:
name: gitleaks-sarif
path: sarif-reports/
continue-on-error: true
- name: List collected reports
run: ls -lh sarif-reports/ || echo "No reports found"
- name: Generate summary
run: |
echo "## Security Scan Results — ${{ env.COMPONENT_ID }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Report | Size |" >> $GITHUB_STEP_SUMMARY
echo "|--------|------|" >> $GITHUB_STEP_SUMMARY
for f in sarif-reports/*.sarif; do
[ -e "$f" ] || continue
name=$(basename "$f")
size=$(du -sh "$f" | cut -f1)
echo "| $name | $size |" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "Commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "Branch: \`${{ github.ref_name }}\`" >> $GITHUB_STEP_SUMMARY
- name: Bundle all SARIF reports
uses: actions/upload-artifact@v3
with:
name: all-sarif-reports
path: sarif-reports/
retention-days: 90

227
.gitea/workflows/sonar.yaml Normal file
View File

@@ -0,0 +1,227 @@
name: SonarQube Analysis
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
sonarqube:
name: Build, Test & Analyse
runs-on: ubuntu-latest
timeout-minutes: 15
env:
SONAR_PROJECT_KEY: lint-enforcement-v3
SONAR_ADMIN_TOKEN: ${{ secrets.SONAR_ADMIN_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
BACKSTAGE_CLEANUP_TOKEN: ${{ secrets.BACKSTAGE_CLEANUP_TOKEN }}
# NOTE: the BACKSTAGE_URL is derived from the environment that triggered the workflow.
# This allows the same workflow to be used across different environments (e.g., dev, staging, prod) without hardcoding environment-specific URLs or requiring additional secrets configuration.
# It is utilised to send a notification to Backstage in case the quality gate fails, so that the relevant teams are alerted and can take action
BACKSTAGE_URL: https://dev-shraavya.backstage.kyndemo.live
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Make Maven wrapper executable
run: chmod +x mvnw
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-${{ runner.os }}-
- name: Cache SonarQube analysis data
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: sonar-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: sonar-${{ runner.os }}-
- name: Validate required secrets
run: |
[[ -n "$SONAR_ADMIN_TOKEN" ]] || { echo "::error::SONAR_ADMIN_TOKEN is not set"; exit 1; }
[[ -n "$SONAR_HOST_URL" ]] || { echo "::error::SONAR_HOST_URL is not set"; exit 1; }
[[ -n "$SONAR_PROJECT_KEY" ]] || { echo "::error::SONAR_PROJECT_KEY is not set"; exit 1; }
SONAR_HOST_URL="${SONAR_HOST_URL%/}"
AUTH_RESPONSE=$(curl -s -o /tmp/sonar-auth-response.json -w "%{http_code}" \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/authentication/validate")
if [[ "$AUTH_RESPONSE" != "200" ]]; then
echo "::error::SonarQube is unreachable or returned HTTP ${AUTH_RESPONSE} — check SONAR_HOST_URL"
exit 1
fi
TOKEN_VALID=$(jq -r '.valid' /tmp/sonar-auth-response.json 2>/dev/null || echo "false")
if [[ "$TOKEN_VALID" != "true" ]]; then
echo "::error::SONAR_ADMIN_TOKEN is invalid or has been revoked (SonarQube returned valid=false)"
exit 1
fi
echo "✅ SONAR_ADMIN_TOKEN verified against ${SONAR_HOST_URL}"
- name: Bootstrap SonarQube project and generate scan token
id: sonar-bootstrap
run: |
PROJECT_COUNT=$(curl -sf \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/projects/search?projects=${SONAR_PROJECT_KEY}" \
| jq '.paging.total')
if [[ "$PROJECT_COUNT" == "0" ]]; then
echo "Project '${SONAR_PROJECT_KEY}' not found — creating it..."
curl -sf -X POST \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/projects/create" \
--data-urlencode "name=${SONAR_PROJECT_KEY}" \
--data-urlencode "project=${SONAR_PROJECT_KEY}" \
--data-urlencode "mainBranch=main" \
--data-urlencode "visibility=private"
echo "✅ Project created."
else
echo "✅ Project '${SONAR_PROJECT_KEY}' already exists — skipping creation."
fi
TOKEN_NAME="gitea-scan-${SONAR_PROJECT_KEY}"
curl -sf -X POST \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/user_tokens/revoke" \
--data-urlencode "name=${TOKEN_NAME}" \
> /dev/null 2>&1 || true
SCAN_TOKEN=$(curl -sf -X POST \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/user_tokens/generate" \
--data-urlencode "name=${TOKEN_NAME}" \
--data-urlencode "type=PROJECT_ANALYSIS_TOKEN" \
--data-urlencode "projectKey=${SONAR_PROJECT_KEY}" \
| jq -r '.token')
[[ -n "$SCAN_TOKEN" ]] || { echo "::error::Failed to generate scan token"; exit 1; }
echo "✅ Scan token generated for project '${SONAR_PROJECT_KEY}'"
echo "::add-mask::${SCAN_TOKEN}"
echo "SCAN_TOKEN=${SCAN_TOKEN}" >> "$GITHUB_ENV"
- name: Build and test
run: |
./mvnw -B verify \
-Dtest='!PostgresIntegrationTests,!MySqlIntegrationTests'
- name: SonarQube analysis
run: |
./mvnw -B org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \
-Dsonar.projectKey="${SONAR_PROJECT_KEY}" \
-Dsonar.host.url="${SONAR_HOST_URL}" \
-Dsonar.token="${SCAN_TOKEN}" \
-Dsonar.java.source=17 \
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
- name: Quality Gate check
id: quality-gate
run: |
echo "Waiting for SonarQube to process the analysis..."
for i in $(seq 1 24); do
RESPONSE=$(curl -sf -u "${SCAN_TOKEN}:" \
"${SONAR_HOST_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}" || true)
STATUS=$(echo "$RESPONSE" | jq -r '.projectStatus.status' 2>/dev/null || echo "NONE")
if [[ "$STATUS" =~ ^(OK|ERROR|WARN)$ ]]; then break; fi
echo " Status: ${STATUS:-pending} — retrying in 5s..."
sleep 5
done
echo ""
echo "══════════════════════════════════════════"
echo " Quality Gate: $STATUS"
echo "══════════════════════════════════════════"
echo "$RESPONSE" | jq -r '
.projectStatus.conditions[] |
if .status == "ERROR" then " ❌ \(.metricKey): \(.actualValue) (threshold: \(.errorThreshold), comparator: \(.comparator))"
elif .status == "WARN" then " ⚠️ \(.metricKey): \(.actualValue) (threshold: \(.errorThreshold), comparator: \(.comparator))"
else " ✅ \(.metricKey): \(.actualValue)"
end'
echo "══════════════════════════════════════════"
FAILED=$(echo "$RESPONSE" | jq '[.projectStatus.conditions[] | select(.status == "ERROR")] | length')
if [[ "$FAILED" -gt 0 ]]; then
echo "::error::Quality Gate FAILED — $FAILED metric(s) did not meet threshold"
exit 1
fi
- name: Notify Backstage on quality gate failure
if: always() && steps.quality-gate.outcome == 'failure'
run: |
echo "--- Backstage notification debug ---"
echo "BACKSTAGE_URL: ${BACKSTAGE_URL:-<not set>}"
echo "BACKSTAGE_CLEANUP_TOKEN set: $([[ -n "$BACKSTAGE_CLEANUP_TOKEN" ]] && echo yes || echo no)"
echo "SONAR_PROJECT_KEY: ${SONAR_PROJECT_KEY:-<not set>}"
echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-<not set>}"
if [[ -z "$BACKSTAGE_URL" ]]; then
echo "::error::BACKSTAGE_URL is not set — cannot send notification"
exit 0
fi
if [[ -z "$BACKSTAGE_CLEANUP_TOKEN" ]]; then
echo "::error::BACKSTAGE_CLEANUP_TOKEN is not set — cannot send notification"
exit 0
fi
PAYLOAD="{
\"recipients\": { \"type\": \"entity\", \"entityRef\": \"group:default/platform-engineering\" },
\"payload\": {
\"title\": \"SonarQube Quality Gate Failed\",
\"description\": \"Quality gate failed for ${SONAR_PROJECT_KEY} on branch ${GITHUB_HEAD_REF}.\",
\"link\": \"${SONAR_HOST_URL}/dashboard?id=${SONAR_PROJECT_KEY}\",
\"severity\": \"high\",
\"topic\": \"sonarqube-quality-gate\"
}
}"
echo "Sending notification to: ${BACKSTAGE_URL}/api/notifications"
HTTP_CODE=$(curl -s -o /tmp/bs-notify-response.json -w "%{http_code}" \
-X POST "${BACKSTAGE_URL}/api/notifications" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${BACKSTAGE_CLEANUP_TOKEN}" \
-d "${PAYLOAD}")
echo "HTTP response code: ${HTTP_CODE}"
echo "Response body:"
cat /tmp/bs-notify-response.json 2>/dev/null || echo "<empty response>"
if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 300 ]]; then
echo "✅ Backstage notification sent"
else
echo "⚠️ Backstage notification failed (HTTP ${HTTP_CODE})"
fi
- name: Revoke scan token
if: always()
run: |
curl -sf -X POST \
-u "${SONAR_ADMIN_TOKEN}:" \
"${SONAR_HOST_URL}/api/user_tokens/revoke" \
--data-urlencode "name=gitea-scan-${SONAR_PROJECT_KEY}" \
&& echo "✅ Scan token revoked" \
|| echo "⚠️ Token revocation failed"

View File

@@ -0,0 +1,108 @@
name: Build and Publish TechDocs
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "catalog-info.yaml"
workflow_dispatch: {}
env:
TECHDOCS_AZURE_BLOB_CONTAINER_NAME:
AZURE_FEDERATED_TOKEN_FILE: /var/run/secrets/azure/tokens/azure-identity-token
AZURE_ACCOUNT_NAME: "bstagecjotdevsttechdocs"
ENTITY_NAMESPACE: default
ENTITY_KIND: component
ENTITY_NAME: lint-enforcement-v3
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: read and set output
id: read_env
run: |
echo "$AZURE_FEDERATED_TOKEN_FILE"
env | grep AZURE
echo "$(cat $AZURE_FEDERATED_TOKEN_FILE)"
# act-based Gitea runners run as root — sudo is not available.
# apt-get is called directly; works whether root or not.
- name: Bootstrap pip
run: |
python3 --version
if python3 -m pip --version 2>/dev/null; then
echo "pip already available"
elif python3 -m ensurepip --version 2>/dev/null; then
python3 -m ensurepip --upgrade
else
apt-get update -qq
apt-get install -y python3-pip
fi
python3 -m pip install --upgrade pip
python3 -m pip --version
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install \
mkdocs-techdocs-core==1.* \
mkdocs-git-revision-date-localized-plugin \
mkdocs-awesome-pages-plugin
npm install -g @techdocs/cli
npm cache clean --force
# mkdocs has no dry-run flag — build into a temp dir to validate config
# and catch any broken links or missing pages early.
- name: Validate MkDocs config
run: mkdocs build --strict --site-dir /tmp/mkdocs-validate
- name: Build TechDocs site
run: |
techdocs-cli generate \
--source-dir . \
--output-dir ./site \
--no-docker \
--verbose
# act runners don't include az by default — install via Microsoft's
# official script which works on Debian/Ubuntu without sudo.
- name: Install Azure CLI
run: |
if command -v az &>/dev/null; then
echo "Azure CLI already installed: $(az version --query '"azure-cli"' -o tsv)"
else
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
fi
- name: Azure login (OIDC)
run: |
az login \
--service-principal \
--username "$AZURE_CLIENT_ID" \
--tenant "$AZURE_TENANT_ID" \
--federated-token "$(cat $AZURE_FEDERATED_TOKEN_FILE)"
echo "✓ Azure login successful"
- name: Publish TechDocs site
run: |
echo "$AZURE_ACCOUNT_NAME"
echo "$ENTITY_NAMESPACE"
echo "$ENTITY_KIND"
echo "$ENTITY_NAME"
techdocs-cli publish \
--publisher-type azureBlobStorage \
--storage-name "techdocs" \
--azureAccountName "$AZURE_ACCOUNT_NAME" \
--entity "$ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME"

24
.helmignore Normal file
View File

@@ -0,0 +1,24 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
examples/

3
.pages Normal file
View File

@@ -0,0 +1,3 @@
nav:
- docs
- ...

7
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

18
Chart.lock Normal file
View File

@@ -0,0 +1,18 @@
dependencies:
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.153.0
- name: jaeger
repository: https://jaegertracing.github.io/helm-charts
version: 4.7.0
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 29.6.0
- name: grafana
repository: https://grafana-community.github.io/helm-charts
version: 12.3.0
- name: opensearch
repository: https://opensearch-project.github.io/helm-charts/
version: 3.6.0
digest: sha256:5b050b6fe28057b5452bb7175b474f831b9e835a67cd8ab66c191d429175a29e
generated: "2026-05-08T10:17:39.14582+02:00"

37
Chart.yaml Normal file
View File

@@ -0,0 +1,37 @@
apiVersion: v2
type: application
name: opentelemetry-demo
version: 0.40.9
description: opentelemetry demo helm chart
home: https://opentelemetry.io/
sources:
- https://github.com/open-telemetry/opentelemetry-demo
maintainers:
- name: dmitryax
- name: jaronoff97
- name: julianocosta89
- name: puckpuck
- name: tylerhelmuth
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
appVersion: 2.2.0
dependencies:
- name: opentelemetry-collector
version: 0.153.0
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
condition: opentelemetry-collector.enabled
- name: jaeger
version: 4.7.0
repository: https://jaegertracing.github.io/helm-charts
condition: jaeger.enabled
- name: prometheus
version: 29.6.0
repository: https://prometheus-community.github.io/helm-charts
condition: prometheus.enabled
- name: grafana
version: 12.3.0
repository: https://grafana-community.github.io/helm-charts
condition: grafana.enabled
- name: opensearch
version: 3.6.0
repository: https://opensearch-project.github.io/helm-charts/
condition: opensearch.enabled

263
README.md Normal file
View File

@@ -0,0 +1,263 @@
# OpenTelemetry Demo Helm Chart
The helm chart installs the
[OpenTelemetry Demo](https://github.com/open-telemetry/opentelemetry-demo) in a
Kubernetes cluster.
## Prerequisites
- Kubernetes 1.24+
- Helm 4.0+
## Installing the Chart
Add OpenTelemetry Helm repository:
```console
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
```
To install the chart with the release name my-otel-demo, run the following
command:
```console
helm install my-otel-demo open-telemetry/opentelemetry-demo
```
## Upgrading
See [UPGRADING.md](UPGRADING.md).
## OpenShift
Installing the chart on OpenShift requires the following additional steps:
1. Create a new project:
```console
oc new-project opentelemetry-demo
```
2. Create a new service account:
```console
oc create sa opentelemetry-demo
```
3. Add the service account to the `anyuid` SCC (may require cluster admin):
```console
oc adm policy add-scc-to-user anyuid -z opentelemetry-demo
```
4. Add `view` role to the service account to allow Prometheus seeing the
services pods:
```console
oc adm policy add-role-to-user view -z opentelemetry-demo
```
5. Add `privileged` SCC to the service account to allow Grafana to run:
```console
oc adm policy add-scc-to-user privileged -z opentelemetry-demo
```
6. Install the chart with the following command:
```console
helm install my-otel-demo charts/opentelemetry-demo \
--namespace opentelemetry-demo \
--set serviceAccount.create=false \
--set serviceAccount.name=opentelemetry-demo \
--set prometheus.rbac.create=false \
--set prometheus.serviceAccounts.server.create=false \
--set prometheus.serviceAccounts.server.name=opentelemetry-demo \
--set grafana.rbac.create=false \
--set grafana.serviceAccount.create=false \
--set grafana.serviceAccount.name=opentelemetry-demo
```
## Chart Parameters
Chart parameters are separated in 4 general sections:
- Default - Used to specify defaults applied to all demo components
- Components - Used to configure the individual components (microservices) for
the demo
- Observability - Used to enable/disable dependencies
- Sub-charts - Configuration for all sub-charts
### Default parameters (applied to all demo components)
| Property | Description | Default |
|----------------------------------------|-------------------------------------------------------------------------------------------|------------------------------------------------------|
| `default.env` | Environment variables added to all components | Array of several OpenTelemetry environment variables |
| `default.envOverrides` | Used to override individual environment variables without re-specifying the entire array. | `[]` |
| `default.image.repository` | Demo components image name | `otel/demo` |
| `default.image.tag` | Demo components image tag (leave blank to use app version) | `nil` |
| `default.image.pullPolicy` | Demo components image pull policy | `IfNotPresent` |
| `default.image.pullSecrets` | Demo components image pull secrets | `[]` |
| `default.replicas` | Number of replicas for each component | `1` |
| `default.schedulingRules.nodeSelector` | Node labels for pod assignment | `{}` |
| `default.schedulingRules.affinity` | Man of node/pod affinities | `{}` |
| `default.schedulingRules.tolerations` | Tolerations for pod assignment | `[]` |
| `default.securityContext` | Demo components container security context | `{}` |
| `serviceAccount.annotations` | Annotations for the serviceAccount | `{}` |
| `serviceAccount.create` | Whether to create a serviceAccount or use an existing one | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use for demo components | `""` |
### Component parameters
The OpenTelemetry demo contains several components (microservices). Each
component is configured with a common set of parameters. All components will
be defined within `components.[NAME]` where `[NAME]` is the name of the demo
component.
> **Note**
> The following parameters require a `components.[NAME].` prefix where `[NAME]`
> is the name of the demo component
| Parameter | Description | Default |
|-----------------------------------------|------------------------------------------------------------------------------------------|---------------------------------------------------------------|
| `enabled` | Is this component enabled | `true` |
| `useDefault.env` | Use the default environment variables in this component | `true` |
| `imageOverride.repository` | Name of image for this component | Defaults to the overall default image repository |
| `imageOverride.tag` | Tag of the image for this component | Defaults to the overall default image tag |
| `imageOverride.pullPolicy` | Image pull policy for this component | `IfNotPresent` |
| `imageOverride.pullSecrets` | Image pull secrets for this component | `[]` |
| `service.type` | Service type used for this component | `ClusterIP` |
| `service.port` | Service port used for this component | `nil` |
| `service.nodePort` | Service node port used for this component | `nil` |
| `service.annotations` | Annotations to add to the component's service | `{}` |
| `ports` | Array of ports to open for deployment and service of this component | `[]` |
| `env` | Array of environment variables added to this component | Each component will have its own set of environment variables |
| `envOverrides` | Used to override individual environment variables without re-specifying the entire array | `[]` |
| `replicas` | Number of replicas for this component | `1` for kafka, and redis ; `nil` otherwise |
| `resources` | CPU/Memory resource requests/limits | Each component will have a default memory limit set |
| `schedulingRules.nodeSelector` | Node labels for pod assignment | `{}` |
| `schedulingRules.affinity` | Man of node/pod affinities | `{}` |
| `schedulingRules.tolerations` | Tolerations for pod assignment | `[]` |
| `securityContext` | Container security context | `{}` |
| `podSecurityContext` | Pod security context s | `{}` |
| `podLabels` | Pod labels for this component | `{}` |
| `podAnnotations` | Pod annotations for this component | `{}` |
| `ingress.enabled` | Enable the creation of Ingress rules | `false` |
| `ingress.annotations` | Annotations to add to the ingress rule | `{}` |
| `ingress.ingressClassName` | Ingress class to use. If not specified default Ingress class will be used. | `nil` |
| `ingress.hosts` | Array of Hosts to use for the ingress rule. | `[]` |
| `ingress.hosts[].paths` | Array of paths / routes to use for the ingress rule host. | `[]` |
| `ingress.hosts[].paths[].path` | Actual path route to use | `nil` |
| `ingress.hosts[].paths[].pathType` | Path type to use for the given path. Typically this is `Prefix`. | `nil` |
| `ingress.hosts[].paths[].port` | Port to use for the given path | `nil` |
| `ingress.additionalIngresses` | Array of additional ingress rules to add | `[]` |
| `ingress.additionalIngresses[].name` | Each additional ingress rule needs to have a unique name | `nil` |
| `command` | Command & arguments to pass to the container being spun up for this service | `[]` |
| `additionalVolumeMounts` | Array of Volumes that will be mounted | `[]` |
| `mountedConfigMaps[].name` | Name of the Volume that will be used for the ConfigMap mount | `nil` |
| `mountedConfigMaps[].mountPath` | Path where the ConfigMap data will be mounted | `nil` |
| `mountedConfigMaps[].subPath` | SubPath within the mountPath. Used to mount a single file into the path. | `nil` |
| `mountedConfigMaps[].existingConfigMap` | Name of the existing ConfigMap to mount | `nil` |
| `mountedConfigMaps[].data` | Contents of a ConfigMap. Keys should be the names of the files to be mounted. | `{}` |
| `mountedEmptyDir[].name` | Name of the EmptyDir volume that will be used for the volume mount | `nil` |
| `mountedEmptyDir[].mountPath` | Path where the EmptyDir data will be mounted | `nil` |
| `mountedEmptyDir[].subPath` | SubPath within the mountPath. Used to mount a single file into the path. | `nil` |
| `initContainers` | Array of init containers to add to the pod | `[]` |
| `initContainers[].name` | Name of the init container | `nil` |
| `initContainers[].image` | Image to use for the init container | `nil` |
| `initContainers[].command` | Command to run for the init container | `nil` |
| `sidecarContainers` | Array of sidecar containers to add to the pod | `[]` |
| `additionalVolumes` | Array of additional volumes to add to the pod | `[]` |
### Sub-charts
The OpenTelemetry Demo Helm chart depends on 5 sub-charts:
- OpenTelemetry Collector
- Jaeger
- Prometheus
- Grafana
- OpenSearch
Parameters for each sub-chart can be specified within that sub-chart's
respective top level. This chart will override some of the dependent sub-chart
parameters by default. The overriden parameters are specified below.
#### OpenTelemetry Collector
> **Note**
> The following parameters have a `opentelemetry-collector.` prefix.
| Parameter | Description | Default |
|----------------|-------------------------------------------------|---------------------------------|
| `enabled` | Install the OpenTelemetry collector | `true` |
| `nameOverride` | Name that will be used by the sub-chart release | `otel-collector` |
| `mode` | The Deployment or Daemonset mode | `deployment` |
| `resources` | CPU/Memory resource requests/limits | 200Mi memory limit |
| `service.type` | Service Type to use | `ClusterIP` |
| `config` | OpenTelemetry Collector configuration | Configuration required for demo |
#### Jaeger
> **Note**
> The following parameters have a `jaeger.` prefix.
| Parameter | Description | Default |
|-----------------------|-----------------------------------------------------------|--------------------|
| `enabled` | Install the Jaeger sub-chart | `true` |
| `jaeger.storage.type` | Sets storage type fo memory storage | `memory` |
| `jaeger.extraEnv` | Additional environment variables referenced in userconfig | |
| `jaeger.resources` | CPU/Memory resource requests/limits for Jaeger | 400Mi memory limit |
| `userconfig` | Configuration used for Jaeger's collector instance | |
#### Prometheus
> **Note**
> The following parameters have a `prometheus.` prefix.
| Parameter | Description | Default |
|----------------------------------------|------------------------------------------------|-------------------------------------------------------------------|
| `enabled` | Install the Prometheus sub-chart | `true` |
| `alertmanager.enabled` | Install the alertmanager | `false` |
| `configmapReload.prometheus.enabled` | Install the configmap-reload container | `false` |
| `kube-state-metrics.enabled` | Install the kube-state-metrics sub-chart | `false` |
| `prometheus-node-exporter.enabled` | Install the Prometheus Node Exporter sub-chart | `false` |
| `prometheus-pushgateway.enabled` | Install the Prometheus Push Gateway sub-chart | `false` |
| `server.extraFlags` | Additional flags to add to Prometheus server | `["enable-feature=exemplar-storage", "web.enable-otlp-receiver"]` |
| `server.retention` | Metrics data retention time | `7d` |
| `server.tsdb.out_of_order_time_window` | How long to allow for out of order data | `30m` |
| `server.otlp` | OTLP metrics ingest configuration | |
| `server.persistentVolume.enabled` | Create persistent volume for storage | `false` |
| `service.servicePort` | Service port used | `9090` |
| `serverFiles.resources` | CPU/Memory resource requests/limits | 200Mi memory limit |
#### Grafana
> **Note**
> The following parameters have a `grafana.` prefix.
| Parameter | Description | Default |
|-----------------|-------------------------------------|-----------------------------------------------------------------------|
| `enabled` | Install the Grafana sub-chart | `true` |
| `grafana.ini` | Grafana's primary configuration | Enables anonymous login, and proxy through the frontend-proxy service |
| `adminPassword` | Password used by `admin` user | `admin` |
| `plugins` | Array of plugins to enable | `["grafana-opensearch-datasource"]` |
| `sidecar` | Configuration for Grafana sidecar | Enable alerts, dashboards, and data sources |
| `resources` | CPU/Memory resource requests/limits | 175Mi memory limit |
#### OpenSearch
> **Note**
> The following parameters have a `opensearch.` prefix.
| Parameter | Description | Default |
|-----------------------|---------------------------------------------------|------------------------------------------|
| `enabled` | Install the OpenSearch sub-chart | `true` |
| `fullnameOverride` | Name that will be used by the sub-chart release | `otel-demo-opensearch` |
| `clusterName` | Name of the OpenSearch cluster | `demo-cluster` |
| `nodeGroup` | OpenSearch Node group configuration | `otel-demo` |
| `singleNode` | Deploy a single node OpenSearch cluster | `true` |
| `opensearchJavaOpts` | Java options for OpenSearch JVM | `-Xms400m -Xmx400m` |
| `persistence.enabled` | Enable persistent storage for OpenSearch data | `false` |
| `extraEnvs` | Additional environment variables for OpenSearch | Disables demo config and security plugin |
| `resources` | CPU/Memory resource requests/limits | 1100Mi memory limit |

155
UPGRADING.md Normal file
View File

@@ -0,0 +1,155 @@
# Upgrade guidelines
> [!NOTE]
> The OpenTelemetry Demo does not support being upgraded from one version to
> another. If you need to upgrade the chart, you must first delete the existing
> release and then install the new version.
## To 0.40.4
The `transform` processor now uses the `set_semconv_span_name()` function to
reduce span metrics cardinality explosion caused by high-cardinality span names.
See the [processor documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor#set_semconv_span_name)
and [troubleshooting guide](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/spanmetricsconnector/README.md#troubleshooting-span-metrics-high-cardinality)
for details.
## To 0.40
The product catalog has been moved to use a Postgres database. Custom products
(and product reviews) can be specified with your own init-db.sql script
contained in a custom ConfigMap, and referenced for the Postgres component.
The Jaeger sub-chart was upgraded to 4.3, which included several breaking
changes to prior configurations.
Support for `podLabels` has been added to all components.
## To 0.39
Support for IPv6 environments was introduced to the demo.
## To 0.38
A new postgresql container was introduced to the demo.
## To 0.36
The Demo 2.0 release removed the `service` suffix from many components names,
and renamed some components based on a naming standard defined in
the [#1788](https://github.com/open-telemetry/opentelemetry-demo/issues/1788)
issue in the OpenTelemetry Demo repository. Any custom configuration for a Demo
component that was renamed will need to be updated to use the new name. The
following table shows the old and new names for each component:
| Old Name | New Name |
| ---------------------- | --------------- |
| accountingservice | accounting |
| adservice | ad |
| cartservice | cart |
| checkoutservice | checkout |
| currencyservice | currency |
| emailservice | email |
| flagd | flagd |
| flagd-ui | flagd-ui |
| frauddetectionservice | fraud-detection |
| frontend | frontend |
| frontendproxy | frontend-proxy |
| frontend-web | frontend-web |
| grafana | grafana |
| imageprovider | image-provider |
| jaeger | jaeger |
| kafka | kafka |
| loadgenerator | load-generator |
| opensearch | opensearch |
| otelcollector | otel-collector |
| paymentservice | payment |
| productcatalogservice | product-catalog |
| prometheus | prometheus |
| quotesservice | quote |
| recommendationsservice | recommendation |
| shippingservice | shipping |
| valkey-cart | valkey-cart |
## To 0.35
The Helm chart release name prefix has been removed from all resources. If you
have any custom configuration that depend on the release name, you will need to
update it accordingly.
## To 0.33
The Helm prerequisite version has been updated to Helm 3.14+. Please upgrade your
Helm client to the latest version.
## To 0.28
The `configuration` property for components has been removed in favor of the new `mountedConfigMaps` property.
This new property allows you to specify the contents of the configuration using the `data` sub-property. You will also
need to specify the `mountPath` to use, and give the configuration a name. The old `configuration` property used
`/etc/config` and `config` as values for these respectively. The following example shows how to migrate from the old
`configuration` property to the new `mountedConfigMaps` property:
```yaml
# Old configuration property
configuration:
my-config.yaml: |
# Contents of my-config.yaml
# New mountedConfigMaps property
mountedConfigMaps:
- name: config
mountPath: /etc/config
data:
my-config.yaml: |
# Contents of my-config.yaml
```
## To 0.24
This release uses the [kubernetes attributes processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/k8sattributesprocessor)
to add kubernetes metadata as resource attributes. If you override the processors array in your config, you will
need to add the k8s attributes processor manually to restore `service.instance.id`
resource attribute.
## To 0.23
The Prometheus sub-chart dependency made updates to pod labels. You may need to
use the `--force` option with your Helm upgrade command, or delete the release
and re-install it.
## To 0.22
This release moves to using the `connectors` functionality in the OpenTelemetry
Collector. The `spanmetrics` processor has been moved to use `connectors`
which results in an additional required exporter in the `traces` pipeline.
Existing releases that override `exporters` in the `traces` pipeline, will
need to add `spanmetrics` to the list of exporters before upgrading. The
OpenTelemetry Collector will fail to start otherwise.
## To 0.21
The deployment labelSelector `app.kubernetes.io/name` has been renamed to
individual workload naming. If you upgrade it from charts <= 0.20, you
will have to delete all existing opentelemetry-demo deployments before running
`helm upgrade` command.
## To 0.20
The `observability.<sub chart>.enabled` parameters have been moved to an
`enabled` parameter within the sub chart itself. If you had changes to these
parameters, you will need to update your changes to work with the new structure.
## To 0.18
The `serviceType` and `servicePort` parameters have been moved under a `service`
parameter with names of `type` and `port` respectively. If you had changes to
these parameters for any demo component, you will need to update your changes
to work with the new structure for the `service` parameter.
## To 0.13
Jaeger was moved to a Helm sub-chart instead of a local chart deployment. If you
had changes specified to the `observability.jaeger` parameter, those changes
will need to be re-implemented as sub-chart parameters under the top level
`jaeger` parameter instead.

137
catalog-info.yaml Normal file
View File

@@ -0,0 +1,137 @@
# ─── System: groups all per-service Components for this application ───
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: lint-enforcement-v3
description: "lint-enforcement-v3 — deployed via ArgoCD into demo-apps"
labels:
backstage.io/environment: "dev"
app.kubernetes.io/managed-by: "backstage"
tags:
- deployment
- argocd
- opentelemetry
annotations:
argocd/app-name: "lint-enforcement-v3"
argocd/app-namespace: "argocd"
argocd/instance-name: ""
backstage.io/techdocs-ref: dir:.
backstage.io/source-location: "url:https://gitea.kyndemo.live/validate/lint-enforcement-v3/src/branch/main"
backstage.io/kubernetes-namespace: "demo-apps"
backstage.io/kubernetes-label-selector: "app.kubernetes.io/managed-by=backstage"
gitea.kyndemo.live/repo-slug: "validate/lint-enforcement-v3"
sonarqube.org/project-key: lint-enforcement-v3
grafana/grafana-instance: "default"
grafana/alert-label-selector: "app=lint-enforcement-v3"
grafana/dashboard-selector: "uid == 'otel-app-observability-v2'"
grafana.com/alert-label-selector: "app=lint-enforcement-v3"
grafana.com/dashboard-url: "https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3"
links:
- url: https://lint-enforcement-v3.kyndemo.live
title: Live Application
icon: web
- url: https://gitea.kyndemo.live/validate/lint-enforcement-v3
title: Repository
icon: github
- url: https://argocd.kyndemo.live/applications/lint-enforcement-v3
title: ArgoCD App
icon: dashboard
- url: https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3
title: Grafana Dashboard
icon: dashboard
spec:
owner: "platform-engineering"
domain: platform
dependsOn:
- component:default/argocd-service
- resource:default/otel-collector
- resource:default/otel-operator
- resource:default/k6-operator
# ─── Primary Component (always present, matches component_id) ───────
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: lint-enforcement-v3
description: "lint-enforcement-v3 — deployed via ArgoCD into demo-apps"
labels:
backstage.io/environment: "dev"
app.kubernetes.io/managed-by: "backstage"
tags:
- deployment
- argocd
- opentelemetry
- load-testing
- k6
- chaos-engineering
- chaos-mesh
annotations:
argocd/app-name: "lint-enforcement-v3"
argocd/app-namespace: "argocd"
argocd/instance-name: ""
backstage.io/techdocs-ref: dir:.
backstage.io/source-location: "url:https://gitea.kyndemo.live/validate/lint-enforcement-v3/src/branch/main"
backstage.io/kubernetes-namespace: "demo-apps"
backstage.io/kubernetes-label-selector: "app=lint-enforcement-v3"
gitea.kyndemo.live/repo-slug: "validate/lint-enforcement-v3"
sonarqube.org/project-key: lint-enforcement-v3
grafana/grafana-instance: "default"
grafana/alert-label-selector: "app=lint-enforcement-v3"
grafana/dashboard-selector: "uid == 'otel-app-observability-v2'"
grafana.com/alert-label-selector: "app=lint-enforcement-v3"
grafana.com/dashboard-url: "https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3"
k6/enabled: "true"
k6/test-configmap: "k6-test-lint-enforcement-v3"
k6/test-namespace: "demo-apps"
k6/target-service: "frontend"
chaos-mesh/enabled: "true"
links:
- url: https://lint-enforcement-v3.kyndemo.live
title: Live Application
icon: web
- url: https://gitea.kyndemo.live/validate/lint-enforcement-v3
title: Repository
icon: github
- url: https://argocd.kyndemo.live/applications/lint-enforcement-v3
title: ArgoCD App
icon: dashboard
- url: https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3
title: Grafana Dashboard
icon: dashboard
spec:
type: service
owner: "platform-engineering"
lifecycle: experimental
system: lint-enforcement-v3
dependsOn:
- component:default/argocd-service
- resource:default/otel-collector
- resource:default/k6-operator
# ─── Per-service Components (from Watcher discovery) ─────────────────

0
ci/default-values.yaml Normal file
View File

View File

@@ -0,0 +1,37 @@
components:
frontend-proxy:
ingress:
enabled: true
ingressClassName: nginx
annotations:
test.io/collector: default
hosts:
- host: defaultcollector.example.com
paths:
- path: /
pathType: Prefix
port: 4318
additionalIngresses:
- name: additional-basic
hosts:
- host: additional-basic.example.com
paths:
- path: /
pathType: Prefix
port: 4318
- name: additional-advanced
ingressClassName: nginx
annotations:
test.io/ingress: additional-advanced
hosts:
- host: additional-advanced.example.com
paths:
- path: /
pathType: Exact
port: 4318
tls:
- secretName: somesecret
hosts:
- additional-advanced.example.com

View File

@@ -0,0 +1,25 @@
components:
frontend:
envOverrides:
- name: PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
value: https://otel-demo-collector.example.com/v1/traces
frontend-proxy:
ingress:
enabled: true
hosts:
- host: otel-demo.example.com
paths:
- path: /
pathType: Prefix
port: 8080
opentelemetry-collector:
ingress:
enabled: true
hosts:
- host: otel-demo-collector.example.com
paths:
- path: /
pathType: Prefix
port: 4318

81
docs/index.md Normal file
View File

@@ -0,0 +1,81 @@
# lint-enforcement-v3
Deployed from **https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-demo** via the Backstage Hello Demo template.
| Property | Value |
|---|---|
| **Environment** | `dev` |
| **Namespace** | `demo-apps` |
| **ArgoCD Project** | `` |
| **Branch** | `main` |
| **Observability** | Enabled (OpenTelemetry) |
## Quick Links
- **Repository**: [https://gitea.kyndemo.live/validate/lint-enforcement-v3](https://gitea.kyndemo.live/validate/lint-enforcement-v3)
- **ArgoCD**: [https://argocd.kyndemo.live/applications/lint-enforcement-v3](https://argocd.kyndemo.live/applications/lint-enforcement-v3)
- **Live App**: [https://lint-enforcement-v3.kyndemo.live](https://lint-enforcement-v3.kyndemo.live)
- **Grafana Dashboard**: [https://grafana.kyndemo.live/d/otel-app-observability-v2/...?var-app=lint-enforcement-v3](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3)
## Architecture
This service was scaffolded using the **Application Migration Factory** Backstage template.
**Deployment flow:**
1. Source cloned from `https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-demo`
2. Catalog entity and CI workflows overlaid by Backstage
3. The Watcher scanned the repository and injected OpenTelemetry auto-instrumentation via Kustomize overlay
4. ArgoCD Application created targeting the `demo-apps` namespace
5. ArgoCD continuously syncs from the `main` branch
**ArgoCD sync path:** `overlays/otel`
## Development Workflow
```bash
git clone https://gitea.kyndemo.live/validate/lint-enforcement-v3.git
cd lint-enforcement-v3
# make changes, then:
git add . && git commit -m "your change" && git push origin main
```
ArgoCD monitors the repository and automatically syncs changes to the `demo-apps` namespace.
## Rollback
To roll back to a previous version:
1. Open the [ArgoCD UI](https://argocd.kyndemo.live/applications/lint-enforcement-v3)
2. Click **History and Rollback**
3. Select the desired revision and click **Rollback**
Alternatively, revert the commit in Git and push — ArgoCD will auto-sync the rollback.
## Observability
This service has OpenTelemetry auto-instrumentation enabled. Traces, metrics, and logs are exported to the OTel Collector and visualised in Grafana.
**Viewing telemetry:**
- Open the [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=lint-enforcement-v3)
- Filter by `app=lint-enforcement-v3` to see service-specific data
- Check the **Alerts** tab in Backstage for any firing Grafana alerts
**OTel Collector endpoint:** `http://otel-collector.monitoring.svc.cluster.local:4318`
## SLOs and Monitoring
Define your service level objectives here once the service is stable:
| SLI | Target | Dashboard |
|---|---|---|
| Availability | 99.9% | [Grafana](https://grafana.kyndemo.live) |
| Latency (p99) | < 500ms | [Grafana](https://grafana.kyndemo.live) |
| Error rate | < 1% | [Grafana](https://grafana.kyndemo.live) |

12
examples/README.md Normal file
View File

@@ -0,0 +1,12 @@
# Examples of chart configuration
Here is a collection of common configurations for the OpenTelemetry demo. Each folder contains an example `values.yaml` and the resulting configurations that are generated by the opentelemetry-demo helm charts.
- [Default configuration](default)
- [Bring your own Observability](bring-your-own-observability)
- [Collector as a Daemonset](collector-as-daemonset)
- [Custom Environment Variables](custom-environment-variables)
- [Kubernetes Infrastructure Monitoring](kubernetes-infra-monitoring)
- [Public Hosted Ingress](public-hosted-ingress)
The manifests are rendered using the `helm template` command and the specific example folder's values.yaml.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
---
# Source: opentelemetry-demo/templates/flagd-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: flagd-config
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
demo.flagd.json: |
{
"$schema": "https://flagd.dev/schema/v0/flags.json",
"flags": {
"llmInaccurateResponse": {
"defaultVariant": "off",
"description": "LLM returns an inaccurate product summary for product ID L9ECAV7KIM",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"llmRateLimitError": {
"defaultVariant": "off",
"description": "LLM intermittently returns a rate limit error",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"productCatalogFailure": {
"description": "Fail product catalog service on a specific product",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"recommendationCacheFailure": {
"description": "Fail recommendation service cache",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adManualGc": {
"description": "Triggers full manual garbage collections in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adHighCpu": {
"description": "Triggers high cpu load in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adFailure": {
"description": "Fail ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"kafkaQueueProblems": {
"description": "Overloads Kafka queue while simultaneously introducing a consumer side delay leading to a lag spike",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"cartFailure": {
"description": "Fail cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"paymentFailure": {
"description": "Fail payment service charge requests n%",
"state": "ENABLED",
"variants": {
"100%": 1,
"90%": 0.95,
"75%": 0.75,
"50%": 0.5,
"25%": 0.25,
"10%": 0.1,
"off": 0
},
"defaultVariant": "off"
},
"paymentUnreachable": {
"description": "Payment service is unavailable",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"loadGeneratorFloodHomepage": {
"description": "Flood the frontend with a large amount of requests.",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"imageSlowLoad": {
"description": "slow loading images in the frontend",
"state": "ENABLED",
"variants": {
"10sec": 10000,
"5sec": 5000,
"off": 0
},
"defaultVariant": "off"
},
"failedReadinessProbe": {
"description": "readiness probe failure for cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"emailMemoryLeak": {
"description": "Memory leak in the email service.",
"state": "ENABLED",
"variants": {
"off": 0,
"1x": 1,
"10x": 10,
"100x": 100,
"1000x": 1000,
"10000x": 10000
},
"defaultVariant": "off"
}
}
}

View File

@@ -0,0 +1,65 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: opensearch-config
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
data:
opensearch.yml: |
cluster.name: opensearch-cluster
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
network.host: 0.0.0.0
# Setting network.host to a non-loopback address enables the annoying bootstrap checks. "Single-node" mode disables them again.
# Implicitly done if ".singleNode" is set to "true".
# discovery.type: single-node
# Start OpenSearch Security Demo Configuration
# WARNING: revise all the lines below before you go into production
# plugins:
# security:
# ssl:
# transport:
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# enforce_hostname_verification: false
# http:
# enabled: true
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# allow_unsafe_democertificates: true
# allow_default_init_securityindex: true
# authcz:
# admin_dn:
# - CN=kirk,OU=client,O=client,L=test,C=de
# audit.type: internal_opensearch
# enable_snapshot_restore_privilege: true
# check_snapshot_restore_write_privileges: true
# restapi:
# roles_enabled: ["all_access", "security_rest_api_access"]
# system_indices:
# enabled: true
# indices:
# [
# ".opendistro-alerting-config",
# ".opendistro-alerting-alert*",
# ".opendistro-anomaly-results*",
# ".opendistro-anomaly-detector*",
# ".opendistro-anomaly-checkpoints",
# ".opendistro-anomaly-detection-state",
# ".opendistro-reports-*",
# ".opendistro-notifications-*",
# ".opendistro-notebooks",
# ".opendistro-asynchronous-search-response*",
# ]
######## End OpenSearch Security Demo Configuration ########

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/poddisruptionbudget.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: "opensearch-pdb"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example

View File

@@ -0,0 +1,59 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
{}
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
protocol: TCP
port: 9200
- name: transport
protocol: TCP
port: 9300
- name: metrics
protocol: TCP
port: 9600
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch-headless
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None # This is needed for statefulset hostnames like opensearch-0 to resolve
# Create endpoints also if the related pod isn't ready
publishNotReadyAddresses: true
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
port: 9200
- name: transport
port: 9300
- name: metrics
port: 9600

View File

@@ -0,0 +1,154 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
majorVersion: "3"
spec:
serviceName: opensearch-headless
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
replicas: 1
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
template:
metadata:
name: "opensearch"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 93c3f240fa93e351cd611722b36240809ba0f30edfe66389a6198c4b284c681
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
automountServiceAccountToken: false
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/instance
operator: In
values:
- example
- key: app.kubernetes.io/name
operator: In
values:
- opensearch
terminationGracePeriodSeconds: 120
volumes:
- name: config
configMap:
name: opensearch-config
- emptyDir: {}
name: config-emptydir
enableServiceLinks: true
initContainers:
- name: configfile
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
command:
- sh
- -c
- |
#!/usr/bin/env bash
cp -r /tmp/configfolder/* /tmp/config/
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
resources:
{}
volumeMounts:
- mountPath: /tmp/config/
name: config-emptydir
- name: config
mountPath: /tmp/configfolder/opensearch.yml
subPath: opensearch.yml
containers:
- name: "opensearch"
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
readinessProbe:
failureThreshold: 3
periodSeconds: 5
tcpSocket:
port: 9200
timeoutSeconds: 3
startupProbe:
failureThreshold: 30
initialDelaySeconds: 5
periodSeconds: 10
tcpSocket:
port: 9200
timeoutSeconds: 3
ports:
- name: http
containerPort: 9200
- name: transport
containerPort: 9300
- name: metrics
containerPort: 9600
resources:
limits:
memory: 1100Mi
requests:
cpu: 1000m
memory: 100Mi
env:
- name: node.name
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: discovery.seed_hosts
value: "opensearch-cluster-master-headless"
- name: cluster.name
value: "demo-cluster"
- name: network.host
value: "0.0.0.0"
- name: OPENSEARCH_JAVA_OPTS
value: "-Xms400m -Xmx400m"
- name: node.roles
value: "master,ingest,data,remote_cluster_client,"
- name: discovery.type
value: "single-node"
- name: bootstrap.memory_lock
value: "true"
- name: DISABLE_INSTALL_DEMO_CONFIG
value: "true"
- name: DISABLE_SECURITY_PLUGIN
value: "true"
volumeMounts:
- name: config-emptydir
mountPath: /usr/share/opensearch/config/opensearch.yml
subPath: opensearch.yml

View File

@@ -0,0 +1,48 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get","list","watch","create","update","patch","delete"]
- apiGroups: [""]
resources: ["pods", "namespaces"]
verbs: ["get", "watch", "list"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events", "namespaces", "namespaces/status", "nodes", "nodes/spec", "pods", "pods/status", "replicationcontrollers", "replicationcontrollers/status", "resourcequotas", "services" ]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["daemonsets", "deployments", "replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes/stats"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]

View File

@@ -0,0 +1,22 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otel-collector
subjects:
- kind: ServiceAccount
name: otel-collector
namespace: default

View File

@@ -0,0 +1,295 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap-agent.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
data:
relay: |
connectors:
spanmetrics: {}
exporters:
debug: {}
opensearch:
http:
endpoint: http://opensearch:9200
tls:
insecure: true
logs_index: otel-logs
logs_index_time_format: yyyy-MM-dd
otlp/jaeger:
endpoint: jaeger:4317
sending_queue:
batch: {}
tls:
insecure: true
otlp/my-own-observability-endpoint:
endpoint: my-observability-endpoint:4317
tls:
insecure: true
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue:
batch: {}
tls:
insecure: true
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
k8s_leader_elector/k8s_cluster:
auth_type: serviceAccount
lease_name: k8s.cluster.receiver.opentelemetry.io
lease_namespace: default
k8s_observer:
auth_type: serviceAccount
node: ${env:K8S_NODE_NAME}
processors:
batch: {}
k8sattributes:
extract:
metadata:
- k8s.namespace.name
- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.pod.start_time
- k8s.deployment.name
- k8s.replicaset.name
- k8s.replicaset.uid
- k8s.daemonset.name
- k8s.daemonset.uid
- k8s.job.name
- k8s.job.uid
- k8s.container.name
- k8s.cronjob.name
- k8s.statefulset.name
- k8s.statefulset.uid
- container.image.tag
- container.image.name
- k8s.cluster.uid
- service.namespace
- service.name
- service.version
- service.instance.id
otel_annotations: true
filter:
node_from_env_var: K8S_NODE_NAME
passthrough: false
pod_association:
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25
resource:
attributes:
- action: insert
from_attribute: k8s.pod.uid
key: service.instance.id
resourcedetection:
detectors:
- env
- system
transform:
error_mode: ignore
trace_statements:
- conditions:
- span.kind == SPAN_KIND_SERVER and resource.attributes["service.name"] == "frontend"
and span.attributes["http.route"] == nil
context: span
statements:
- set(span.attributes["http.route"], "/api/cart") where IsMatch(span.attributes["http.target"],
"\\/api\\/cart")
- set(span.attributes["http.route"], "/api/checkout") where IsMatch(span.attributes["http.target"],
"\\/api\\/checkout")
- set(span.attributes["http.route"], "/api/products/{productId}") where IsMatch(span.attributes["http.target"],
"\\/api\\/products\\/.*")
- set(span.attributes["http.route"], "/api/recommendations") where IsMatch(span.attributes["http.target"],
"\\/api\\/recommendations")
- set(span.attributes["http.route"], "/api/data") where IsMatch(span.attributes["http.target"],
"\\/api\\/data.*")
- context: span
statements:
- set_semconv_span_name("1.37.0", "unsanitized_span_name")
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
filesystem:
exclude_fs_types:
fs_types:
- autofs
- binfmt_misc
- bpf
- cgroup2
- configfs
- debugfs
- devpts
- devtmpfs
- fusectl
- hugetlbfs
- iso9660
- mqueue
- nsfs
- overlay
- proc
- procfs
- pstore
- rpc_pipefs
- securityfs
- selinuxfs
- squashfs
- sysfs
- tracefs
match_type: strict
exclude_mount_points:
match_type: regexp
mount_points:
- /dev/*
- /proc/*
- /sys/*
- /run/k3s/containerd/*
- /var/lib/docker/*
- /var/lib/kubelet/*
- /snap/*
load: null
memory: null
network: null
jaeger:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:14250
thrift_compact:
endpoint: ${env:MY_POD_IP}:6831
thrift_http:
endpoint: ${env:MY_POD_IP}:14268
k8s_cluster:
collection_interval: 10s
k8s_leader_elector: k8s_leader_elector/k8s_cluster
kafkametrics:
brokers:
- kafka:9092
collection_interval: 10s
scrapers:
- brokers
- topics
- consumers
kubeletstats:
auth_type: serviceAccount
collection_interval: 20s
endpoint: ${env:K8S_NODE_IP}:10250
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
cors:
allowed_origins:
- http://*
- https://*
endpoint: ${env:MY_POD_IP}:4318
prometheus:
config:
scrape_configs:
- job_name: opentelemetry-collector
scrape_interval: 10s
static_configs:
- targets:
- ${env:MY_POD_IP}:8888
receiver_creator/metrics:
discovery:
enabled: true
watch_observers:
- k8s_observer
zipkin:
endpoint: ${env:MY_POD_IP}:9411
service:
extensions:
- health_check
- k8s_observer
- k8s_leader_elector/k8s_cluster
pipelines:
logs:
exporters:
- otlp/my-own-observability-endpoint
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
metrics:
exporters:
- otlp/my-own-observability-endpoint
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
- kafkametrics
- spanmetrics
- receiver_creator/metrics
- hostmetrics
- kubeletstats
- k8s_cluster
traces:
exporters:
- otlp/my-own-observability-endpoint
- debug
- spanmetrics
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- transform
- batch
receivers:
- otlp
- jaeger
- zipkin
telemetry:
metrics:
level: detailed
readers:
- periodic:
exporter:
otlp:
endpoint: http://otel-collector:4318
insecure: true
protocol: http/protobuf
interval: 10000
timeout: 5000
resource:
host.name: ${env:OTEL_K8S_NODE_NAME}
k8s.namespace.name: ${env:OTEL_K8S_NAMESPACE}
k8s.node.ip: ${env:OTEL_K8S_NODE_IP}
k8s.node.name: ${env:OTEL_K8S_NODE_NAME}
k8s.pod.ip: ${env:OTEL_K8S_POD_IP}
k8s.pod.name: ${env:OTEL_K8S_POD_NAME}

View File

@@ -0,0 +1,147 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 3b9e8e3155265c099ef9804a738034d79a9416cc5a4a66961350cb1e097f710c
labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
spec:
serviceAccountName: otel-collector
automountServiceAccountToken: true
securityContext:
{}
containers:
- name: opentelemetry-collector
args:
- --config=/conf/relay.yaml
securityContext:
{}
image: "otel/opentelemetry-collector-contrib:0.151.0"
imagePullPolicy: IfNotPresent
ports:
- name: jaeger-compact
containerPort: 6831
protocol: UDP
hostPort: 6831
- name: jaeger-grpc
containerPort: 14250
protocol: TCP
hostPort: 14250
- name: jaeger-thrift
containerPort: 14268
protocol: TCP
hostPort: 14268
- name: metrics
containerPort: 8888
protocol: TCP
- name: otlp
containerPort: 4317
protocol: TCP
hostPort: 4317
- name: otlp-http
containerPort: 4318
protocol: TCP
hostPort: 4318
- name: zipkin
containerPort: 9411
protocol: TCP
hostPort: 9411
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OTEL_K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OTEL_K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: GOMEMLIMIT
value: "160MiB"
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
resources:
limits:
memory: 200Mi
volumeMounts:
- mountPath: /conf
name: opentelemetry-collector-configmap
- name: hostfs
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
terminationGracePeriodSeconds: 30
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: false
hostPID: false

View File

@@ -0,0 +1,54 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
component: agent-collector
spec:
type: ClusterIP
ports:
- name: jaeger-compact
port: 6831
targetPort: 6831
protocol: UDP
- name: jaeger-grpc
port: 14250
targetPort: 14250
protocol: TCP
- name: jaeger-thrift
port: 14268
targetPort: 14268
protocol: TCP
- name: metrics
port: 8888
targetPort: 8888
protocol: TCP
- name: otlp
port: 4317
targetPort: 4317
protocol: TCP
appProtocol: grpc
- name: otlp-http
port: 4318
targetPort: 4318
protocol: TCP
- name: zipkin
port: 9411
targetPort: 9411
protocol: TCP
selector:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
internalTrafficPolicy: Local

View File

@@ -0,0 +1,15 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector

View File

@@ -0,0 +1,173 @@
---
# Source: opentelemetry-demo/templates/posgresql-init-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-init
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
init.sql: |
-- Copyright The OpenTelemetry Authors
-- SPDX-License-Identifier: Apache-2.0
CREATE USER otelu WITH PASSWORD 'otelp';
-- Accounting Service: create a schema
CREATE SCHEMA accounting;
GRANT USAGE ON SCHEMA accounting TO otelu;
-- Accounting Service: create tables
CREATE TABLE accounting."order" (
order_id TEXT PRIMARY KEY
);
CREATE TABLE accounting.shipping (
shipping_tracking_id TEXT PRIMARY KEY,
shipping_cost_currency_code TEXT NOT NULL,
shipping_cost_units BIGINT NOT NULL,
shipping_cost_nanos INT NOT NULL,
street_address TEXT,
city TEXT,
state TEXT,
country TEXT,
zip_code TEXT,
order_id TEXT NOT NULL,
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
CREATE TABLE accounting.orderitem (
item_cost_currency_code TEXT NOT NULL,
item_cost_units BIGINT NOT NULL,
item_cost_nanos INT NOT NULL,
product_id TEXT NOT NULL,
quantity INT NOT NULL,
order_id TEXT NOT NULL,
PRIMARY KEY (order_id, product_id),
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
-- Accounting Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA accounting TO otelu;
-- Product Review Service: create a schema
CREATE SCHEMA reviews;
GRANT USAGE ON SCHEMA reviews TO otelu;
-- Product Review Service: create tables
CREATE TABLE reviews.productreviews (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
product_id VARCHAR(16) NOT NULL,
username VARCHAR(64) NOT NULL,
description VARCHAR(1024),
score NUMERIC(2,1) NOT NULL
);
-- Product Review Service: create index for product_id lookups
CREATE INDEX product_id_index ON reviews.productreviews (product_id);
-- Product Review Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA reviews TO otelu;
-- Product Review Service: add product review data
INSERT INTO reviews.productreviews (product_id, username, description, score)
VALUES
('OLJCESPC7Z', 'stargazer_mike', 'Great entry-level telescope! Easy to set up and provides clear views of the moon and brighter planets. Highly recommend for new astronomers.', '4.5'),
('OLJCESPC7Z', 'nightskylover', 'For the price, this Explorascope delivers excellent performance. I was able to see Jupiter''s moons clearly. A fantastic purchase for casual viewing.', '4.0'),
('OLJCESPC7Z', 'beginner_astro', 'A bit tricky to get used to the manual controls, but once you do, it''s very rewarding. Saw the Orion Nebula for the first time! Good value.', '3.5'),
('OLJCESPC7Z', 'celestial_explorer', 'Perfect for camping trips. It''s lightweight and portable, making it easy to take anywhere. The views are surprisingly good for its size.', '4.0'),
('OLJCESPC7Z', 'telescope_fan', 'Not the most powerful scope, but it''s great for kids and beginners. My children love looking at the moon with it. A solid choice for family fun.', '3.0'),
('66VCHSJNUP', 'tech_astro', 'The StarSense app is revolutionary! It made finding celestial objects incredibly easy. This telescope is a game-changer for beginners.', '5.0'),
('66VCHSJNUP', 'app_user', 'Amazing technology, the smartphone integration works flawlessly. I''ve never had so much fun exploring the night sky. Worth every penny.', '4.5'),
('66VCHSJNUP', 'innovator_john', 'Setup was a breeze, and the tutorials in the app are very helpful. The views are crisp and clear. My only minor gripe is battery drain on the phone.', '4.0'),
('66VCHSJNUP', 'clear_skies', 'Finally, a telescope that takes the guesswork out of stargazing. The real-time positioning is incredibly accurate. Highly recommended for anyone new to astronomy.', '5.0'),
('66VCHSJNUP', 'gadget_geek', 'Fantastic product, the app truly guides you. It''s like having a personal astronomer with you. The optical quality is also very good.', '4.5'),
('1YMWWN1N4O', 'solar_viewer', 'Perfect for solar observations! The Solar Safe filter gives peace of mind. I used it for the last partial eclipse and it was fantastic.', '5.0'),
('1YMWWN1N4O', 'eclipse_chaser', 'Compact and easy to carry, this telescope is ideal for eclipse events. The included backpack is a nice touch. Views of the sun are incredibly clear and safe.', '4.5'),
('1YMWWN1N4O', 'travel_astro', 'Excellent travel scope for solar viewing. The magnification is much better than binoculars for the sun. A must-have for any solar enthusiast.', '4.0'),
('1YMWWN1N4O', 'sun_gazer', 'Very impressed with the safety features and clarity. Sharing the sun with family has never been easier or safer. Great value for a dedicated solar scope.', '5.0'),
('1YMWWN1N4O', 'safe_viewer', 'The ISO compliant filter is reassuring. It''s a well-designed product for safe solar observation. Highly recommend for educational purposes too.', '4.5'),
('L9ECAV7KIM', 'clean_optics', 'This kit is a lifesaver for all my optics. The brush and wipes work perfectly without leaving any residue. My lenses have never been cleaner.', '5.0'),
('L9ECAV7KIM', 'photog_pro', 'Essential for any photographer or telescope owner. It safely removes dust and fingerprints. A high-quality cleaning solution.', '4.5'),
('L9ECAV7KIM', 'daily_cleaner', 'I use this on my binoculars, camera lenses, and even my phone screen. It''s very effective and gentle. A versatile cleaning kit.', '4.0'),
('L9ECAV7KIM', 'tech_maintenance', 'Great value for money. The different cleaning options cover all needs. Keeps my expensive equipment in pristine condition.', '5.0'),
('L9ECAV7KIM', 'sharp_view', 'Works as advertised, my telescope views are much clearer after using this. The fluid and cloth are excellent. Definitely recommend.', '4.5'),
('2ZYFJ3GM2N', 'bird_watcher', 'Incredible clarity and brightness, perfect for bird watching. The ED glass really makes a difference. I can spot the subtlest markings.', '5.0'),
('2ZYFJ3GM2N', 'nature_lover', 'These binoculars are fantastic for nature observation. The close focus is a huge advantage for viewing nearby wildlife. Very comfortable to hold.', '4.5'),
('2ZYFJ3GM2N', 'hiker_guy', 'Lightweight and durable, these are my go-to binoculars for hiking. The wide field of view is excellent. Highly recommend for outdoor enthusiasts.', '4.0'),
('2ZYFJ3GM2N', 'stadium_fan', 'Took these to a game and had an amazing view of the action. They perform great in various lighting conditions. A solid all-around binocular.', '4.0'),
('2ZYFJ3GM2N', 'outdoor_adventurer', 'Excellent build quality and optical performance. They feel robust and provide sharp images. A great investment for any outdoor activity.', '4.5'),
('0PUK6V6EV0', 'astro_photog', 'This imager is a fantastic step up for planetary photography. The color quality is superb. Easy to use with my existing telescope setup.', '5.0'),
('0PUK6V6EV0', 'planet_shooter', 'Finally capturing stunning images of Saturn and Jupiter! The NexImage 10 makes it so accessible. Great for beginners in astrophotography.', '4.5'),
('0PUK6V6EV0', 'imager_pro', 'Excellent resolution and color rendition for its price point. It''s a perfect solution for those looking to start imaging planets. Highly satisfied.', '4.0'),
('0PUK6V6EV0', 'space_artist', 'The detail I can capture with this imager is incredible. It integrates well with various software. A must-have for serious planetary observers.', '5.0'),
('0PUK6V6EV0', 'digital_sky', 'A solid choice for getting into solar system imaging. The setup was straightforward. Produces beautiful, vibrant planetary images.', '4.5'),
('LS4PSXUNUM', 'night_walker', 'The red light is perfect for preserving night vision during astronomy sessions. The hand warmer is an unexpected bonus. Very practical device.', '5.0'),
('LS4PSXUNUM', 'star_party_goer', 'This flashlight is indispensable for star parties. The red mode is gentle on the eyes, and the power bank feature is super handy. Love it!', '4.5'),
('LS4PSXUNUM', 'camper_chris', 'Rugged and versatile, this flashlight is great for camping and night walks. The hand warmer function is a game-changer on cold nights. Highly recommend.', '4.5'),
('LS4PSXUNUM', 'emergency_kit', 'A fantastic multi-tool for my emergency kit. The red light is useful, and the power bank means I can charge my phone. Great design.', '4.0'),
('LS4PSXUNUM', 'astro_accessory', 'Every astronomer needs one of these. The red light is essential, and the hand warmer and power bank make it incredibly useful. A top-tier accessory.', '5.0'),
('9SIQT8TOJO', 'deep_sky_master', 'The RASA V2 is a dream come true for deep-sky imaging. The f/2.2 speed drastically cuts down exposure times. My best astrophotography investment yet.', '5.0'),
('9SIQT8TOJO', 'pro_astro', 'Unbelievable performance for wide-field astrophotography. The short focal length makes guiding less critical. Produces stunning, detailed images.', '5.0'),
('9SIQT8TOJO', 'imaging_guru', 'This OTA is a beast! The fast optics mean more data in less time. If you''re serious about deep-sky imaging, this is the one.', '4.5'),
('9SIQT8TOJO', 'advanced_scope', 'Worth every penny for the quality and speed it offers. My images have never been sharper or more vibrant. A truly professional piece of equipment.', '5.0'),
('9SIQT8TOJO', 'precision_optics', 'The engineering behind this RASA is exceptional. It''s incredibly efficient for capturing faint objects. A high-end choice for dedicated imagers.', '4.5'),
('6E92ZMYYFZ', 'solar_safety', 'Essential for safe solar viewing with my 8-inch telescope. The Velcro straps ensure it stays securely in place. Peace of mind during solar observations.', '5.0'),
('6E92ZMYYFZ', 'telescope_upgrade', 'This EclipSmart filter is a perfect addition to my setup. The ISO compliance is crucial. Highly recommend for anyone looking to view the sun safely.', '4.5'),
('6E92ZMYYFZ', 'safe_sun_gazer', 'Easy to attach and provides crystal clear, safe views of the sun. The build quality is excellent. A must-have accessory for solar enthusiasts.', '5.0'),
('6E92ZMYYFZ', 'filter_fan', 'Works perfectly with my 8-inch scope. No more worries about accidental dislodgement. Great product for protecting your eyes and equipment.', '4.5'),
('6E92ZMYYFZ', 'eclipse_ready', 'Bought this for the upcoming eclipse, and it fits perfectly. Tested it out, and the views are fantastic and safe. Very happy with this purchase.', '5.0'),
('HQTGWGPNH4', 'history_buff', 'A fascinating glimpse into historical astronomical thought. The content is incredibly insightful. A must-read for anyone interested in the history of science.', '5.0'),
('HQTGWGPNH4', 'bookworm_astro', 'Beautifully presented historical document. It''s amazing to see how comets were understood centuries ago. A valuable addition to any astronomy library.', '4.5'),
('HQTGWGPNH4', 'ancient_texts', 'Such a unique and intriguing read. The historical context is captivating. It offers a different perspective on celestial events.', '4.0'),
('HQTGWGPNH4', 'celestial_history', 'I love historical astronomy, and this book delivers. It''s well-researched and provides a window into past beliefs. Highly recommended for scholars.', '5.0'),
('HQTGWGPNH4', 'rare_find', 'A truly special book for enthusiasts of astronomical history. The details about ancient astrologers are very interesting. Great for a deeper understanding.', '4.5');
-- Product Catalog Service: create a schema
CREATE SCHEMA catalog;
GRANT USAGE ON SCHEMA catalog TO otelu;
-- Product Catalog Service: create tables
CREATE TABLE catalog.products (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
picture TEXT,
price_currency_code TEXT NOT NULL,
price_units BIGINT NOT NULL,
price_nanos INT NOT NULL,
categories TEXT
);
-- Product Catalog Service: grant permission to schema
GRANT SELECT ON ALL TABLES IN SCHEMA catalog TO otelu;
-- Product Catalog Service: add product data
INSERT INTO catalog.products (id, name, description, picture, price_currency_code, price_units, price_nanos, categories)
VALUES
('OLJCESPC7Z', 'National Park Foundation Explorascope', 'The National Park Foundation''s (NPF) Explorascope 60AZ is a manual alt-azimuth, refractor telescope perfect for celestial viewing on the go. The NPF Explorascope 60 can view the planets, moon, star clusters and brighter deep sky objects like the Orion Nebula and Andromeda Galaxy.', 'NationalParkFoundationExplorascope.jpg', 'USD', 101, 960000000, 'telescopes'),
('66VCHSJNUP', 'Starsense Explorer Refractor Telescope', 'The first telescope that uses your smartphone to analyze the night sky and calculate its position in real time. StarSense Explorer is ideal for beginners thanks to the app''s user-friendly interface and detailed tutorials. It''s like having your own personal tour guide of the night sky', 'StarsenseExplorer.jpg', 'USD', 349, 950000000, 'telescopes'),
('1YMWWN1N4O', 'Eclipsmart Travel Refractor Telescope', 'Dedicated white-light solar scope for the observer on the go. The 50mm refracting solar scope uses Solar Safe, ISO compliant, full-aperture glass filter material to ensure the safest view of solar events. The kit comes complete with everything you need, including the dedicated travel solar scope, a Solar Safe finderscope, tripod, a high quality 20mm (18x) Kellner eyepiece and a nylon backpack to carry everything in. This Travel Solar Scope makes it easy to share the Sun as well as partial and total solar eclipses with the whole family and offers much higher magnifications than you would otherwise get using handheld solar viewers or binoculars.', 'EclipsmartTravelRefractorTelescope.jpg', 'USD', 129, 950000000, 'telescopes,travel'),
('L9ECAV7KIM', 'Lens Cleaning Kit', 'Wipe away dust, dirt, fingerprints and other particles on your lenses to see clearly with the Lens Cleaning Kit. This cleaning kit works on all glass and optical surfaces, including telescopes, binoculars, spotting scopes, monoculars, microscopes, and even your camera lenses, computer screens, and mobile devices. The kit comes complete with a retractable lens brush to remove dust particles and dirt and two options to clean smudges and fingerprints off of your optics, pre-moistened lens wipes and a bottled lens cleaning fluid with soft cloth.', 'LensCleaningKit.jpg', 'USD', 21, 950000000, 'accessories'),
('2ZYFJ3GM2N', 'Roof Binoculars', 'This versatile, all-around binocular is a great choice for the trail, the stadium, the arena, or just about anywhere you want a close-up view of the action without sacrificing brightness or detail. It''s an especially great companion for nature observation and bird watching, with ED glass that helps you spot the subtlest field markings and a close focus of just 6.5 feet.', 'RoofBinoculars.jpg', 'USD', 209, 950000000, 'binoculars'),
('0PUK6V6EV0', 'Solar System Color Imager', 'You have your new telescope and have observed Saturn and Jupiter. Now you''re ready to take the next step and start imaging them. But where do you begin? The NexImage 10 Solar System Imager is the perfect solution.', 'SolarSystemColorImager.jpg', 'USD', 175, 0, 'accessories,telescopes'),
('LS4PSXUNUM', 'Red Flashlight', 'This 3-in-1 device features a 3-mode red flashlight, a hand warmer, and a portable power bank for recharging your personal electronics on the go. Whether you use it to light the way at an astronomy star party, a night walk, or wildlife research, ThermoTorch 3 Astro Red''s rugged, IPX4-rated design will withstand your everyday activities.', 'RedFlashlight.jpg', 'USD', 57, 80000000, 'accessories,flashlights'),
('9SIQT8TOJO', 'Optical Tube Assembly', 'Capturing impressive deep-sky astroimages is easier than ever with Rowe-Ackermann Schmidt Astrograph (RASA) V2, the perfect companion to today''s top DSLR or astronomical CCD cameras. This fast, wide-field f/2.2 system allows for shorter exposure times compared to traditional f/10 astroimaging, without sacrificing resolution. Because shorter sub-exposure times are possible, your equatorial mount won''t need to accurately track over extended periods. The short focal length also lessens equatorial tracking demands. In many cases, autoguiding will not be required.', 'OpticalTubeAssembly.jpg', 'USD', 3599, 0, 'accessories,telescopes,assembly'),
('6E92ZMYYFZ', 'Solar Filter', 'Enhance your viewing experience with EclipSmart Solar Filter for 8" telescopes. With two Velcro straps and four self-adhesive Velcro pads for added safety, you can be assured that the solar filter cannot be accidentally knocked off and will provide Solar Safe, ISO compliant viewing.', 'SolarFilter.jpg', 'USD', 69, 950000000, 'accessories,telescopes'),
('HQTGWGPNH4', 'The Comet Book', 'A 16th-century treatise on comets, created anonymously in Flanders (now northern France) and now held at the Universitätsbibliothek Kassel. Commonly known as The Comet Book (or Kometenbuch in German), its full title translates as "Comets and their General and Particular Meanings, According to Ptolomeé, Albumasar, Haly, Aliquind and other Astrologers". The image is from https://publicdomainreview.org/collection/the-comet-book, made available by the Universitätsbibliothek Kassel under a CC-BY SA 4.0 license (https://creativecommons.org/licenses/by-sa/4.0/)', 'TheCometBook.jpg', 'USD', 0, 990000000, 'books');

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm

View File

@@ -0,0 +1,25 @@
opentelemetry-collector:
config:
exporters:
otlp/my-own-observability-endpoint:
endpoint: "my-observability-endpoint:4317"
tls:
insecure: true
service:
pipelines:
traces:
exporters: [otlp/my-own-observability-endpoint, debug, spanmetrics]
metrics:
exporters: [otlp/my-own-observability-endpoint, debug]
logs:
exporters: [otlp/my-own-observability-endpoint, debug]
jaeger:
enabled: false
prometheus:
enabled: false
grafana:
enabled: false

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
---
# Source: opentelemetry-demo/templates/flagd-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: flagd-config
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
demo.flagd.json: |
{
"$schema": "https://flagd.dev/schema/v0/flags.json",
"flags": {
"llmInaccurateResponse": {
"defaultVariant": "off",
"description": "LLM returns an inaccurate product summary for product ID L9ECAV7KIM",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"llmRateLimitError": {
"defaultVariant": "off",
"description": "LLM intermittently returns a rate limit error",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"productCatalogFailure": {
"description": "Fail product catalog service on a specific product",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"recommendationCacheFailure": {
"description": "Fail recommendation service cache",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adManualGc": {
"description": "Triggers full manual garbage collections in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adHighCpu": {
"description": "Triggers high cpu load in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adFailure": {
"description": "Fail ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"kafkaQueueProblems": {
"description": "Overloads Kafka queue while simultaneously introducing a consumer side delay leading to a lag spike",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"cartFailure": {
"description": "Fail cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"paymentFailure": {
"description": "Fail payment service charge requests n%",
"state": "ENABLED",
"variants": {
"100%": 1,
"90%": 0.95,
"75%": 0.75,
"50%": 0.5,
"25%": 0.25,
"10%": 0.1,
"off": 0
},
"defaultVariant": "off"
},
"paymentUnreachable": {
"description": "Payment service is unavailable",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"loadGeneratorFloodHomepage": {
"description": "Flood the frontend with a large amount of requests.",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"imageSlowLoad": {
"description": "slow loading images in the frontend",
"state": "ENABLED",
"variants": {
"10sec": 10000,
"5sec": 5000,
"off": 0
},
"defaultVariant": "off"
},
"failedReadinessProbe": {
"description": "readiness probe failure for cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"emailMemoryLeak": {
"description": "Memory leak in the email service.",
"state": "ENABLED",
"variants": {
"off": 0,
"1x": 1,
"10x": 10,
"100x": 100,
"1000x": 1000,
"10000x": 10000
},
"defaultVariant": "off"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana-clusterrole
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["configmaps", "secrets"]
verbs: ["get", "watch", "list"]

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: grafana-clusterrolebinding
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
subjects:
- kind: ServiceAccount
name: grafana
namespace: default
roleRef:
kind: ClusterRole
name: grafana-clusterrole
apiGroup: rbac.authorization.k8s.io

View File

@@ -0,0 +1,27 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap-dashboard-provider.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana-config-dashboards
namespace: default
data:
provider.yaml: |-
apiVersion: 1
providers:
- name: 'sidecarProvider'
orgId: 1
folder: ''
folderUid: ''
type: file
disableDeletion: false
allowUiUpdates: false
updateIntervalSeconds: 30
options:
foldersFromFilesStructure: false
path: /tmp/dashboards

View File

@@ -0,0 +1,37 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
data:
plugins: grafana-opensearch-datasource
grafana.ini: |
[analytics]
check_for_updates = true
[auth]
disable_login_form = true
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Admin
[log]
mode = console
[paths]
data = /var/lib/grafana/
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
provisioning = /etc/grafana/provisioning
[server]
domain = ''
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
serve_from_sub_path = true
[unified_storage]
index_path = /var/lib/grafana-search/bleve

View File

@@ -0,0 +1,272 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
strategy:
type: RollingUpdate
template:
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
annotations:
checksum/config: e30f2a2d3b08516a19231e9e993baac3b014e72d908283c5a560fbdbcf4f265a
checksum/sc-dashboard-provider-config: e70bf6a851099d385178a76de9757bb0bef8299da6d8443602590e44f05fdf24
checksum/secret: bed677784356b2af7fb0d87455db21f077853059b594101a4f6532bfbd962a7f
kubectl.kubernetes.io/default-container: grafana
spec:
serviceAccountName: grafana
automountServiceAccountToken: true
shareProcessNamespace: false
securityContext:
fsGroup: 472
runAsGroup: 472
runAsNonRoot: true
runAsUser: 472
enableServiceLinks: true
containers:
- name: grafana-sc-alerts
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_alert"
- name: FOLDER
value: "/etc/grafana/provisioning/alerting"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/alerting/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-alerts-volume
mountPath: "/etc/grafana/provisioning/alerting"
- name: grafana-sc-dashboard
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_dashboard"
- name: FOLDER
value: "/tmp/dashboards"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/dashboards/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: grafana-sc-datasources
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_datasource"
- name: FOLDER
value: "/etc/grafana/provisioning/datasources"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/datasources/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
- name: grafana
image: "docker.io/grafana/grafana:13.0.1"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: "/etc/grafana/grafana.ini"
subPath: grafana.ini
- name: storage
mountPath: "/var/lib/grafana"
- name: search
mountPath: "/var/lib/grafana-search"
- name: sc-alerts-volume
mountPath: "/etc/grafana/provisioning/alerting"
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: sc-dashboard-provider
mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml"
subPath: provider.yaml
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
ports:
- name: grafana
containerPort: 3000
protocol: TCP
- name: gossip-tcp
containerPort: 9094
protocol: TCP
- name: gossip-udp
containerPort: 9094
protocol: UDP
- name: profiling
containerPort: 6060
protocol: TCP
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: GF_PLUGINS_PREINSTALL_SYNC
valueFrom:
configMapKeyRef:
name: grafana
key: plugins
- name: GF_PATHS_DATA
value: /var/lib/grafana/
- name: GF_PATHS_LOGS
value: /var/log/grafana
- name: GF_PATHS_PLUGINS
value: /var/lib/grafana/plugins
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning
- name: GF_UNIFIED_STORAGE_INDEX_PATH
value: /var/lib/grafana-search/bleve
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
divisor: "1"
resource: limits.memory
livenessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: grafana
initialDelaySeconds: 60
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /api/health
port: grafana
resources:
limits:
memory: 300Mi
volumes:
- name: config
configMap:
name: grafana
- name: storage
emptyDir: {}
- name: search
emptyDir: {}
- name: sc-alerts-volume
emptyDir: {}
- name: sc-dashboard-volume
emptyDir: {}
- name: sc-dashboard-provider
configMap:
name: grafana-config-dashboards
- name: sc-datasources-volume
emptyDir: {}

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
rules: []

View File

@@ -0,0 +1,20 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: grafana
subjects:
- kind: ServiceAccount
name: grafana
namespace: default

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
app.kubernetes.io/component: admin-secret
type: Opaque
data:
admin-user: "YWRtaW4="
admin-password: "YWRtaW4="
ldap-toml: ""

View File

@@ -0,0 +1,22 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
spec:
type: ClusterIP
ports:
- name: service
port: 80
protocol: TCP
targetPort: grafana
selector:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: false
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana
namespace: default

View File

@@ -0,0 +1,116 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one
template:
metadata:
labels:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one
annotations:
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
spec:
containers:
- env:
- name: MEMORY_MAX_TRACES
value: "25000"
- name: PROMETHEUS_ADDR
value: prometheus:9090
- name: OTEL_COLLECTOR_HOST
value: otel-collector
- name: OTEL_COLLECTOR_PORT_HTTP
value: "4318"
- name: JAEGER_HOST
value: 0.0.0.0
- name: JAEGER_GRPC_PORT
value: "4317"
securityContext:
{}
image: jaegertracing/jaeger:2.17.0
imagePullPolicy: IfNotPresent
name: jaeger
args:
- "--config"
- "/etc/jaeger/user-config.yaml"
ports:
- containerPort: 5775
protocol: UDP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
- containerPort: 5778
protocol: TCP
- containerPort: 16686
protocol: TCP
- containerPort: 16685
protocol: TCP
- containerPort: 9411
protocol: TCP
- containerPort: 4317
protocol: TCP
- containerPort: 4318
protocol: TCP
- containerPort: 13133
protocol: TCP
- containerPort: 8888
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 600Mi
volumeMounts:
- name: user-config
mountPath: /etc/jaeger/user-config.yaml
subPath: user-config.yaml
securityContext:
fsGroup: 10001
runAsGroup: 10001
runAsUser: 10001
serviceAccountName: jaeger
volumes:
- name: user-config
configMap:
name: user-config

View File

@@ -0,0 +1,14 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
automountServiceAccountToken: true

View File

@@ -0,0 +1,76 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-service.yaml
apiVersion: v1
kind: Service
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
spec:
type: ClusterIP
ports:
# Agent Ports
- name: zk-compact-trft
port: 5775
protocol: UDP
targetPort: 5775
- name: config-rest
port: 5778
targetPort: 5778
- name: jg-compact-trft
port: 6831
protocol: UDP
targetPort: 6831
- name: jg-binary-trft
port: 6832
protocol: UDP
targetPort: 6832
# Collector Ports
- name: http-zipkin
port: 9411
targetPort: 9411
appProtocol: http
- name: grpc-http
port: 14250
targetPort: 14250
appProtocol: grpc
- name: c-tchan-trft
port: 14267
targetPort: 14267
- name: http-c-binary-trft
port: 14268
targetPort: 14268
appProtocol: http
- name: otlp-grpc
port: 4317
targetPort: 4317
appProtocol: grpc
- name: otlp-http
port: 4318
targetPort: 4318
appProtocol: http
# Query Ports
- name: http-query
port: 16686
targetPort: 16686
- name: grpc-query
port: 16685
targetPort: 16685
# Metrics Ports
- name: internal-metrics
port: 8888
targetPort: 8888
appProtocol: http
- name: span-metrics
port: 8889
targetPort: 8889
appProtocol: http
selector:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one

View File

@@ -0,0 +1,76 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-user-config.yaml
# Generates a config map from a file provided by user via `--set-file userconfig=`
apiVersion: v1
kind: ConfigMap
metadata:
name: user-config
namespace: default
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
data:
user-config.yaml: |
exporters:
jaeger_storage_exporter:
trace_storage: memory_backend
extensions:
healthcheckv2:
http:
endpoint: 0.0.0.0:13133
use_v2: true
jaeger_query:
base_path: /jaeger/ui
storage:
metrics: metrics_backend
traces: memory_backend
jaeger_storage:
backends:
memory_backend:
memory:
max_traces: ${env:MEMORY_MAX_TRACES}
metric_backends:
metrics_backend:
prometheus:
endpoint: http://${env:PROMETHEUS_ADDR}
normalize_calls: true
normalize_duration: true
processors:
batch: {}
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:JAEGER_HOST}:${env:JAEGER_GRPC_PORT}
service:
extensions:
- jaeger_storage
- jaeger_query
- healthcheckv2
pipelines:
traces:
exporters:
- jaeger_storage_exporter
processors:
- batch
receivers:
- otlp
telemetry:
logs:
level: info
metrics:
level: detailed
readers:
- periodic:
exporter:
otlp:
endpoint: http://${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
insecure: true
protocol: http/protobuf
interval: 10000
timeout: 5000
resource:
service.name: jaeger

View File

@@ -0,0 +1,65 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: opensearch-config
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
data:
opensearch.yml: |
cluster.name: opensearch-cluster
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
network.host: 0.0.0.0
# Setting network.host to a non-loopback address enables the annoying bootstrap checks. "Single-node" mode disables them again.
# Implicitly done if ".singleNode" is set to "true".
# discovery.type: single-node
# Start OpenSearch Security Demo Configuration
# WARNING: revise all the lines below before you go into production
# plugins:
# security:
# ssl:
# transport:
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# enforce_hostname_verification: false
# http:
# enabled: true
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# allow_unsafe_democertificates: true
# allow_default_init_securityindex: true
# authcz:
# admin_dn:
# - CN=kirk,OU=client,O=client,L=test,C=de
# audit.type: internal_opensearch
# enable_snapshot_restore_privilege: true
# check_snapshot_restore_write_privileges: true
# restapi:
# roles_enabled: ["all_access", "security_rest_api_access"]
# system_indices:
# enabled: true
# indices:
# [
# ".opendistro-alerting-config",
# ".opendistro-alerting-alert*",
# ".opendistro-anomaly-results*",
# ".opendistro-anomaly-detector*",
# ".opendistro-anomaly-checkpoints",
# ".opendistro-anomaly-detection-state",
# ".opendistro-reports-*",
# ".opendistro-notifications-*",
# ".opendistro-notebooks",
# ".opendistro-asynchronous-search-response*",
# ]
######## End OpenSearch Security Demo Configuration ########

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/poddisruptionbudget.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: "opensearch-pdb"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example

View File

@@ -0,0 +1,59 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
{}
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
protocol: TCP
port: 9200
- name: transport
protocol: TCP
port: 9300
- name: metrics
protocol: TCP
port: 9600
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch-headless
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None # This is needed for statefulset hostnames like opensearch-0 to resolve
# Create endpoints also if the related pod isn't ready
publishNotReadyAddresses: true
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
port: 9200
- name: transport
port: 9300
- name: metrics
port: 9600

View File

@@ -0,0 +1,154 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
majorVersion: "3"
spec:
serviceName: opensearch-headless
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
replicas: 1
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
template:
metadata:
name: "opensearch"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 93c3f240fa93e351cd611722b36240809ba0f30edfe66389a6198c4b284c681
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
automountServiceAccountToken: false
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/instance
operator: In
values:
- example
- key: app.kubernetes.io/name
operator: In
values:
- opensearch
terminationGracePeriodSeconds: 120
volumes:
- name: config
configMap:
name: opensearch-config
- emptyDir: {}
name: config-emptydir
enableServiceLinks: true
initContainers:
- name: configfile
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
command:
- sh
- -c
- |
#!/usr/bin/env bash
cp -r /tmp/configfolder/* /tmp/config/
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
resources:
{}
volumeMounts:
- mountPath: /tmp/config/
name: config-emptydir
- name: config
mountPath: /tmp/configfolder/opensearch.yml
subPath: opensearch.yml
containers:
- name: "opensearch"
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
readinessProbe:
failureThreshold: 3
periodSeconds: 5
tcpSocket:
port: 9200
timeoutSeconds: 3
startupProbe:
failureThreshold: 30
initialDelaySeconds: 5
periodSeconds: 10
tcpSocket:
port: 9200
timeoutSeconds: 3
ports:
- name: http
containerPort: 9200
- name: transport
containerPort: 9300
- name: metrics
containerPort: 9600
resources:
limits:
memory: 1100Mi
requests:
cpu: 1000m
memory: 100Mi
env:
- name: node.name
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: discovery.seed_hosts
value: "opensearch-cluster-master-headless"
- name: cluster.name
value: "demo-cluster"
- name: network.host
value: "0.0.0.0"
- name: OPENSEARCH_JAVA_OPTS
value: "-Xms400m -Xmx400m"
- name: node.roles
value: "master,ingest,data,remote_cluster_client,"
- name: discovery.type
value: "single-node"
- name: bootstrap.memory_lock
value: "true"
- name: DISABLE_INSTALL_DEMO_CONFIG
value: "true"
- name: DISABLE_SECURITY_PLUGIN
value: "true"
volumeMounts:
- name: config-emptydir
mountPath: /usr/share/opensearch/config/opensearch.yml
subPath: opensearch.yml

View File

@@ -0,0 +1,48 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get","list","watch","create","update","patch","delete"]
- apiGroups: [""]
resources: ["pods", "namespaces"]
verbs: ["get", "watch", "list"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events", "namespaces", "namespaces/status", "nodes", "nodes/spec", "pods", "pods/status", "replicationcontrollers", "replicationcontrollers/status", "resourcequotas", "services" ]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["daemonsets", "deployments", "replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes/stats"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]

View File

@@ -0,0 +1,22 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otel-collector
subjects:
- kind: ServiceAccount
name: otel-collector
namespace: default

View File

@@ -0,0 +1,299 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap-agent.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
data:
relay: |
connectors:
spanmetrics: {}
exporters:
debug: {}
opensearch:
http:
endpoint: http://opensearch:9200
tls:
insecure: true
logs_index: otel-logs
logs_index_time_format: yyyy-MM-dd
otlp/jaeger:
endpoint: jaeger:4317
sending_queue:
batch: {}
tls:
insecure: true
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue:
batch: {}
tls:
insecure: true
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
k8s_leader_elector/k8s_cluster:
auth_type: serviceAccount
lease_name: k8s.cluster.receiver.opentelemetry.io
lease_namespace: default
k8s_observer:
auth_type: serviceAccount
node: ${env:K8S_NODE_NAME}
processors:
attributes:
actions:
- action: insert
key: app.eng.team
value: ring
include:
match_type: strict
services:
- frontend-proxy
batch: {}
k8sattributes:
extract:
metadata:
- k8s.namespace.name
- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.pod.start_time
- k8s.deployment.name
- k8s.replicaset.name
- k8s.replicaset.uid
- k8s.daemonset.name
- k8s.daemonset.uid
- k8s.job.name
- k8s.job.uid
- k8s.container.name
- k8s.cronjob.name
- k8s.statefulset.name
- k8s.statefulset.uid
- container.image.tag
- container.image.name
- k8s.cluster.uid
- service.namespace
- service.name
- service.version
- service.instance.id
otel_annotations: true
filter:
node_from_env_var: K8S_NODE_NAME
passthrough: false
pod_association:
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25
resource:
attributes:
- action: insert
from_attribute: k8s.pod.uid
key: service.instance.id
resourcedetection:
detectors:
- env
- system
transform:
error_mode: ignore
trace_statements:
- conditions:
- span.kind == SPAN_KIND_SERVER and resource.attributes["service.name"] == "frontend"
and span.attributes["http.route"] == nil
context: span
statements:
- set(span.attributes["http.route"], "/api/cart") where IsMatch(span.attributes["http.target"],
"\\/api\\/cart")
- set(span.attributes["http.route"], "/api/checkout") where IsMatch(span.attributes["http.target"],
"\\/api\\/checkout")
- set(span.attributes["http.route"], "/api/products/{productId}") where IsMatch(span.attributes["http.target"],
"\\/api\\/products\\/.*")
- set(span.attributes["http.route"], "/api/recommendations") where IsMatch(span.attributes["http.target"],
"\\/api\\/recommendations")
- set(span.attributes["http.route"], "/api/data") where IsMatch(span.attributes["http.target"],
"\\/api\\/data.*")
- context: span
statements:
- set_semconv_span_name("1.37.0", "unsanitized_span_name")
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
filesystem:
exclude_fs_types:
fs_types:
- autofs
- binfmt_misc
- bpf
- cgroup2
- configfs
- debugfs
- devpts
- devtmpfs
- fusectl
- hugetlbfs
- iso9660
- mqueue
- nsfs
- overlay
- proc
- procfs
- pstore
- rpc_pipefs
- securityfs
- selinuxfs
- squashfs
- sysfs
- tracefs
match_type: strict
exclude_mount_points:
match_type: regexp
mount_points:
- /dev/*
- /proc/*
- /sys/*
- /run/k3s/containerd/*
- /var/lib/docker/*
- /var/lib/kubelet/*
- /snap/*
load: null
memory: null
network: null
jaeger:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:14250
thrift_compact:
endpoint: ${env:MY_POD_IP}:6831
thrift_http:
endpoint: ${env:MY_POD_IP}:14268
k8s_cluster:
collection_interval: 10s
k8s_leader_elector: k8s_leader_elector/k8s_cluster
kafkametrics:
brokers:
- kafka:9092
collection_interval: 10s
scrapers:
- brokers
- topics
- consumers
kubeletstats:
auth_type: serviceAccount
collection_interval: 20s
endpoint: ${env:K8S_NODE_IP}:10250
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
cors:
allowed_origins:
- http://*
- https://*
endpoint: ${env:MY_POD_IP}:4318
prometheus:
config:
scrape_configs:
- job_name: opentelemetry-collector
scrape_interval: 10s
static_configs:
- targets:
- ${env:MY_POD_IP}:8888
receiver_creator/metrics:
discovery:
enabled: true
watch_observers:
- k8s_observer
zipkin:
endpoint: ${env:MY_POD_IP}:9411
service:
extensions:
- health_check
- k8s_observer
- k8s_leader_elector/k8s_cluster
pipelines:
logs:
exporters:
- opensearch
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
metrics:
exporters:
- otlphttp/prometheus
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
- kafkametrics
- spanmetrics
- receiver_creator/metrics
- hostmetrics
- kubeletstats
- k8s_cluster
traces:
exporters:
- otlp/jaeger
- debug
- spanmetrics
processors:
- k8sattributes
- memory_limiter
- attributes
- spanmetrics
- batch
receivers:
- otlp
- jaeger
- zipkin
telemetry:
metrics:
level: detailed
readers:
- periodic:
exporter:
otlp:
endpoint: http://otel-collector:4318
insecure: true
protocol: http/protobuf
interval: 10000
timeout: 5000
resource:
host.name: ${env:OTEL_K8S_NODE_NAME}
k8s.namespace.name: ${env:OTEL_K8S_NAMESPACE}
k8s.node.ip: ${env:OTEL_K8S_NODE_IP}
k8s.node.name: ${env:OTEL_K8S_NODE_NAME}
k8s.pod.ip: ${env:OTEL_K8S_POD_IP}
k8s.pod.name: ${env:OTEL_K8S_POD_NAME}

View File

@@ -0,0 +1,147 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 6a0dc12fe16c1a5edcb95b3feb75fd9472f30f6e2a962938e71a3110ad57542c
labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
spec:
serviceAccountName: otel-collector
automountServiceAccountToken: true
securityContext:
{}
containers:
- name: opentelemetry-collector
args:
- --config=/conf/relay.yaml
securityContext:
{}
image: "otel/opentelemetry-collector-contrib:0.151.0"
imagePullPolicy: IfNotPresent
ports:
- name: jaeger-compact
containerPort: 6831
protocol: UDP
hostPort: 6831
- name: jaeger-grpc
containerPort: 14250
protocol: TCP
hostPort: 14250
- name: jaeger-thrift
containerPort: 14268
protocol: TCP
hostPort: 14268
- name: metrics
containerPort: 8888
protocol: TCP
- name: otlp
containerPort: 4317
protocol: TCP
hostPort: 4317
- name: otlp-http
containerPort: 4318
protocol: TCP
hostPort: 4318
- name: zipkin
containerPort: 9411
protocol: TCP
hostPort: 9411
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OTEL_K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OTEL_K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: GOMEMLIMIT
value: "160MiB"
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
resources:
limits:
memory: 200Mi
volumeMounts:
- mountPath: /conf
name: opentelemetry-collector-configmap
- name: hostfs
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
terminationGracePeriodSeconds: 30
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: false
hostPID: false

View File

@@ -0,0 +1,54 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
component: agent-collector
spec:
type: ClusterIP
ports:
- name: jaeger-compact
port: 6831
targetPort: 6831
protocol: UDP
- name: jaeger-grpc
port: 14250
targetPort: 14250
protocol: TCP
- name: jaeger-thrift
port: 14268
targetPort: 14268
protocol: TCP
- name: metrics
port: 8888
targetPort: 8888
protocol: TCP
- name: otlp
port: 4317
targetPort: 4317
protocol: TCP
appProtocol: grpc
- name: otlp-http
port: 4318
targetPort: 4318
protocol: TCP
- name: zipkin
port: 9411
targetPort: 9411
protocol: TCP
selector:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
internalTrafficPolicy: Local

View File

@@ -0,0 +1,15 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector

View File

@@ -0,0 +1,173 @@
---
# Source: opentelemetry-demo/templates/posgresql-init-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-init
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
init.sql: |
-- Copyright The OpenTelemetry Authors
-- SPDX-License-Identifier: Apache-2.0
CREATE USER otelu WITH PASSWORD 'otelp';
-- Accounting Service: create a schema
CREATE SCHEMA accounting;
GRANT USAGE ON SCHEMA accounting TO otelu;
-- Accounting Service: create tables
CREATE TABLE accounting."order" (
order_id TEXT PRIMARY KEY
);
CREATE TABLE accounting.shipping (
shipping_tracking_id TEXT PRIMARY KEY,
shipping_cost_currency_code TEXT NOT NULL,
shipping_cost_units BIGINT NOT NULL,
shipping_cost_nanos INT NOT NULL,
street_address TEXT,
city TEXT,
state TEXT,
country TEXT,
zip_code TEXT,
order_id TEXT NOT NULL,
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
CREATE TABLE accounting.orderitem (
item_cost_currency_code TEXT NOT NULL,
item_cost_units BIGINT NOT NULL,
item_cost_nanos INT NOT NULL,
product_id TEXT NOT NULL,
quantity INT NOT NULL,
order_id TEXT NOT NULL,
PRIMARY KEY (order_id, product_id),
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
-- Accounting Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA accounting TO otelu;
-- Product Review Service: create a schema
CREATE SCHEMA reviews;
GRANT USAGE ON SCHEMA reviews TO otelu;
-- Product Review Service: create tables
CREATE TABLE reviews.productreviews (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
product_id VARCHAR(16) NOT NULL,
username VARCHAR(64) NOT NULL,
description VARCHAR(1024),
score NUMERIC(2,1) NOT NULL
);
-- Product Review Service: create index for product_id lookups
CREATE INDEX product_id_index ON reviews.productreviews (product_id);
-- Product Review Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA reviews TO otelu;
-- Product Review Service: add product review data
INSERT INTO reviews.productreviews (product_id, username, description, score)
VALUES
('OLJCESPC7Z', 'stargazer_mike', 'Great entry-level telescope! Easy to set up and provides clear views of the moon and brighter planets. Highly recommend for new astronomers.', '4.5'),
('OLJCESPC7Z', 'nightskylover', 'For the price, this Explorascope delivers excellent performance. I was able to see Jupiter''s moons clearly. A fantastic purchase for casual viewing.', '4.0'),
('OLJCESPC7Z', 'beginner_astro', 'A bit tricky to get used to the manual controls, but once you do, it''s very rewarding. Saw the Orion Nebula for the first time! Good value.', '3.5'),
('OLJCESPC7Z', 'celestial_explorer', 'Perfect for camping trips. It''s lightweight and portable, making it easy to take anywhere. The views are surprisingly good for its size.', '4.0'),
('OLJCESPC7Z', 'telescope_fan', 'Not the most powerful scope, but it''s great for kids and beginners. My children love looking at the moon with it. A solid choice for family fun.', '3.0'),
('66VCHSJNUP', 'tech_astro', 'The StarSense app is revolutionary! It made finding celestial objects incredibly easy. This telescope is a game-changer for beginners.', '5.0'),
('66VCHSJNUP', 'app_user', 'Amazing technology, the smartphone integration works flawlessly. I''ve never had so much fun exploring the night sky. Worth every penny.', '4.5'),
('66VCHSJNUP', 'innovator_john', 'Setup was a breeze, and the tutorials in the app are very helpful. The views are crisp and clear. My only minor gripe is battery drain on the phone.', '4.0'),
('66VCHSJNUP', 'clear_skies', 'Finally, a telescope that takes the guesswork out of stargazing. The real-time positioning is incredibly accurate. Highly recommended for anyone new to astronomy.', '5.0'),
('66VCHSJNUP', 'gadget_geek', 'Fantastic product, the app truly guides you. It''s like having a personal astronomer with you. The optical quality is also very good.', '4.5'),
('1YMWWN1N4O', 'solar_viewer', 'Perfect for solar observations! The Solar Safe filter gives peace of mind. I used it for the last partial eclipse and it was fantastic.', '5.0'),
('1YMWWN1N4O', 'eclipse_chaser', 'Compact and easy to carry, this telescope is ideal for eclipse events. The included backpack is a nice touch. Views of the sun are incredibly clear and safe.', '4.5'),
('1YMWWN1N4O', 'travel_astro', 'Excellent travel scope for solar viewing. The magnification is much better than binoculars for the sun. A must-have for any solar enthusiast.', '4.0'),
('1YMWWN1N4O', 'sun_gazer', 'Very impressed with the safety features and clarity. Sharing the sun with family has never been easier or safer. Great value for a dedicated solar scope.', '5.0'),
('1YMWWN1N4O', 'safe_viewer', 'The ISO compliant filter is reassuring. It''s a well-designed product for safe solar observation. Highly recommend for educational purposes too.', '4.5'),
('L9ECAV7KIM', 'clean_optics', 'This kit is a lifesaver for all my optics. The brush and wipes work perfectly without leaving any residue. My lenses have never been cleaner.', '5.0'),
('L9ECAV7KIM', 'photog_pro', 'Essential for any photographer or telescope owner. It safely removes dust and fingerprints. A high-quality cleaning solution.', '4.5'),
('L9ECAV7KIM', 'daily_cleaner', 'I use this on my binoculars, camera lenses, and even my phone screen. It''s very effective and gentle. A versatile cleaning kit.', '4.0'),
('L9ECAV7KIM', 'tech_maintenance', 'Great value for money. The different cleaning options cover all needs. Keeps my expensive equipment in pristine condition.', '5.0'),
('L9ECAV7KIM', 'sharp_view', 'Works as advertised, my telescope views are much clearer after using this. The fluid and cloth are excellent. Definitely recommend.', '4.5'),
('2ZYFJ3GM2N', 'bird_watcher', 'Incredible clarity and brightness, perfect for bird watching. The ED glass really makes a difference. I can spot the subtlest markings.', '5.0'),
('2ZYFJ3GM2N', 'nature_lover', 'These binoculars are fantastic for nature observation. The close focus is a huge advantage for viewing nearby wildlife. Very comfortable to hold.', '4.5'),
('2ZYFJ3GM2N', 'hiker_guy', 'Lightweight and durable, these are my go-to binoculars for hiking. The wide field of view is excellent. Highly recommend for outdoor enthusiasts.', '4.0'),
('2ZYFJ3GM2N', 'stadium_fan', 'Took these to a game and had an amazing view of the action. They perform great in various lighting conditions. A solid all-around binocular.', '4.0'),
('2ZYFJ3GM2N', 'outdoor_adventurer', 'Excellent build quality and optical performance. They feel robust and provide sharp images. A great investment for any outdoor activity.', '4.5'),
('0PUK6V6EV0', 'astro_photog', 'This imager is a fantastic step up for planetary photography. The color quality is superb. Easy to use with my existing telescope setup.', '5.0'),
('0PUK6V6EV0', 'planet_shooter', 'Finally capturing stunning images of Saturn and Jupiter! The NexImage 10 makes it so accessible. Great for beginners in astrophotography.', '4.5'),
('0PUK6V6EV0', 'imager_pro', 'Excellent resolution and color rendition for its price point. It''s a perfect solution for those looking to start imaging planets. Highly satisfied.', '4.0'),
('0PUK6V6EV0', 'space_artist', 'The detail I can capture with this imager is incredible. It integrates well with various software. A must-have for serious planetary observers.', '5.0'),
('0PUK6V6EV0', 'digital_sky', 'A solid choice for getting into solar system imaging. The setup was straightforward. Produces beautiful, vibrant planetary images.', '4.5'),
('LS4PSXUNUM', 'night_walker', 'The red light is perfect for preserving night vision during astronomy sessions. The hand warmer is an unexpected bonus. Very practical device.', '5.0'),
('LS4PSXUNUM', 'star_party_goer', 'This flashlight is indispensable for star parties. The red mode is gentle on the eyes, and the power bank feature is super handy. Love it!', '4.5'),
('LS4PSXUNUM', 'camper_chris', 'Rugged and versatile, this flashlight is great for camping and night walks. The hand warmer function is a game-changer on cold nights. Highly recommend.', '4.5'),
('LS4PSXUNUM', 'emergency_kit', 'A fantastic multi-tool for my emergency kit. The red light is useful, and the power bank means I can charge my phone. Great design.', '4.0'),
('LS4PSXUNUM', 'astro_accessory', 'Every astronomer needs one of these. The red light is essential, and the hand warmer and power bank make it incredibly useful. A top-tier accessory.', '5.0'),
('9SIQT8TOJO', 'deep_sky_master', 'The RASA V2 is a dream come true for deep-sky imaging. The f/2.2 speed drastically cuts down exposure times. My best astrophotography investment yet.', '5.0'),
('9SIQT8TOJO', 'pro_astro', 'Unbelievable performance for wide-field astrophotography. The short focal length makes guiding less critical. Produces stunning, detailed images.', '5.0'),
('9SIQT8TOJO', 'imaging_guru', 'This OTA is a beast! The fast optics mean more data in less time. If you''re serious about deep-sky imaging, this is the one.', '4.5'),
('9SIQT8TOJO', 'advanced_scope', 'Worth every penny for the quality and speed it offers. My images have never been sharper or more vibrant. A truly professional piece of equipment.', '5.0'),
('9SIQT8TOJO', 'precision_optics', 'The engineering behind this RASA is exceptional. It''s incredibly efficient for capturing faint objects. A high-end choice for dedicated imagers.', '4.5'),
('6E92ZMYYFZ', 'solar_safety', 'Essential for safe solar viewing with my 8-inch telescope. The Velcro straps ensure it stays securely in place. Peace of mind during solar observations.', '5.0'),
('6E92ZMYYFZ', 'telescope_upgrade', 'This EclipSmart filter is a perfect addition to my setup. The ISO compliance is crucial. Highly recommend for anyone looking to view the sun safely.', '4.5'),
('6E92ZMYYFZ', 'safe_sun_gazer', 'Easy to attach and provides crystal clear, safe views of the sun. The build quality is excellent. A must-have accessory for solar enthusiasts.', '5.0'),
('6E92ZMYYFZ', 'filter_fan', 'Works perfectly with my 8-inch scope. No more worries about accidental dislodgement. Great product for protecting your eyes and equipment.', '4.5'),
('6E92ZMYYFZ', 'eclipse_ready', 'Bought this for the upcoming eclipse, and it fits perfectly. Tested it out, and the views are fantastic and safe. Very happy with this purchase.', '5.0'),
('HQTGWGPNH4', 'history_buff', 'A fascinating glimpse into historical astronomical thought. The content is incredibly insightful. A must-read for anyone interested in the history of science.', '5.0'),
('HQTGWGPNH4', 'bookworm_astro', 'Beautifully presented historical document. It''s amazing to see how comets were understood centuries ago. A valuable addition to any astronomy library.', '4.5'),
('HQTGWGPNH4', 'ancient_texts', 'Such a unique and intriguing read. The historical context is captivating. It offers a different perspective on celestial events.', '4.0'),
('HQTGWGPNH4', 'celestial_history', 'I love historical astronomy, and this book delivers. It''s well-researched and provides a window into past beliefs. Highly recommended for scholars.', '5.0'),
('HQTGWGPNH4', 'rare_find', 'A truly special book for enthusiasts of astronomical history. The details about ancient astrologers are very interesting. Great for a deeper understanding.', '4.5');
-- Product Catalog Service: create a schema
CREATE SCHEMA catalog;
GRANT USAGE ON SCHEMA catalog TO otelu;
-- Product Catalog Service: create tables
CREATE TABLE catalog.products (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
picture TEXT,
price_currency_code TEXT NOT NULL,
price_units BIGINT NOT NULL,
price_nanos INT NOT NULL,
categories TEXT
);
-- Product Catalog Service: grant permission to schema
GRANT SELECT ON ALL TABLES IN SCHEMA catalog TO otelu;
-- Product Catalog Service: add product data
INSERT INTO catalog.products (id, name, description, picture, price_currency_code, price_units, price_nanos, categories)
VALUES
('OLJCESPC7Z', 'National Park Foundation Explorascope', 'The National Park Foundation''s (NPF) Explorascope 60AZ is a manual alt-azimuth, refractor telescope perfect for celestial viewing on the go. The NPF Explorascope 60 can view the planets, moon, star clusters and brighter deep sky objects like the Orion Nebula and Andromeda Galaxy.', 'NationalParkFoundationExplorascope.jpg', 'USD', 101, 960000000, 'telescopes'),
('66VCHSJNUP', 'Starsense Explorer Refractor Telescope', 'The first telescope that uses your smartphone to analyze the night sky and calculate its position in real time. StarSense Explorer is ideal for beginners thanks to the app''s user-friendly interface and detailed tutorials. It''s like having your own personal tour guide of the night sky', 'StarsenseExplorer.jpg', 'USD', 349, 950000000, 'telescopes'),
('1YMWWN1N4O', 'Eclipsmart Travel Refractor Telescope', 'Dedicated white-light solar scope for the observer on the go. The 50mm refracting solar scope uses Solar Safe, ISO compliant, full-aperture glass filter material to ensure the safest view of solar events. The kit comes complete with everything you need, including the dedicated travel solar scope, a Solar Safe finderscope, tripod, a high quality 20mm (18x) Kellner eyepiece and a nylon backpack to carry everything in. This Travel Solar Scope makes it easy to share the Sun as well as partial and total solar eclipses with the whole family and offers much higher magnifications than you would otherwise get using handheld solar viewers or binoculars.', 'EclipsmartTravelRefractorTelescope.jpg', 'USD', 129, 950000000, 'telescopes,travel'),
('L9ECAV7KIM', 'Lens Cleaning Kit', 'Wipe away dust, dirt, fingerprints and other particles on your lenses to see clearly with the Lens Cleaning Kit. This cleaning kit works on all glass and optical surfaces, including telescopes, binoculars, spotting scopes, monoculars, microscopes, and even your camera lenses, computer screens, and mobile devices. The kit comes complete with a retractable lens brush to remove dust particles and dirt and two options to clean smudges and fingerprints off of your optics, pre-moistened lens wipes and a bottled lens cleaning fluid with soft cloth.', 'LensCleaningKit.jpg', 'USD', 21, 950000000, 'accessories'),
('2ZYFJ3GM2N', 'Roof Binoculars', 'This versatile, all-around binocular is a great choice for the trail, the stadium, the arena, or just about anywhere you want a close-up view of the action without sacrificing brightness or detail. It''s an especially great companion for nature observation and bird watching, with ED glass that helps you spot the subtlest field markings and a close focus of just 6.5 feet.', 'RoofBinoculars.jpg', 'USD', 209, 950000000, 'binoculars'),
('0PUK6V6EV0', 'Solar System Color Imager', 'You have your new telescope and have observed Saturn and Jupiter. Now you''re ready to take the next step and start imaging them. But where do you begin? The NexImage 10 Solar System Imager is the perfect solution.', 'SolarSystemColorImager.jpg', 'USD', 175, 0, 'accessories,telescopes'),
('LS4PSXUNUM', 'Red Flashlight', 'This 3-in-1 device features a 3-mode red flashlight, a hand warmer, and a portable power bank for recharging your personal electronics on the go. Whether you use it to light the way at an astronomy star party, a night walk, or wildlife research, ThermoTorch 3 Astro Red''s rugged, IPX4-rated design will withstand your everyday activities.', 'RedFlashlight.jpg', 'USD', 57, 80000000, 'accessories,flashlights'),
('9SIQT8TOJO', 'Optical Tube Assembly', 'Capturing impressive deep-sky astroimages is easier than ever with Rowe-Ackermann Schmidt Astrograph (RASA) V2, the perfect companion to today''s top DSLR or astronomical CCD cameras. This fast, wide-field f/2.2 system allows for shorter exposure times compared to traditional f/10 astroimaging, without sacrificing resolution. Because shorter sub-exposure times are possible, your equatorial mount won''t need to accurately track over extended periods. The short focal length also lessens equatorial tracking demands. In many cases, autoguiding will not be required.', 'OpticalTubeAssembly.jpg', 'USD', 3599, 0, 'accessories,telescopes,assembly'),
('6E92ZMYYFZ', 'Solar Filter', 'Enhance your viewing experience with EclipSmart Solar Filter for 8" telescopes. With two Velcro straps and four self-adhesive Velcro pads for added safety, you can be assured that the solar filter cannot be accidentally knocked off and will provide Solar Safe, ISO compliant viewing.', 'SolarFilter.jpg', 'USD', 69, 950000000, 'accessories,telescopes'),
('HQTGWGPNH4', 'The Comet Book', 'A 16th-century treatise on comets, created anonymously in Flanders (now northern France) and now held at the Universitätsbibliothek Kassel. Commonly known as The Comet Book (or Kometenbuch in German), its full title translates as "Comets and their General and Particular Meanings, According to Ptolomeé, Albumasar, Haly, Aliquind and other Astrologers". The image is from https://publicdomainreview.org/collection/the-comet-book, made available by the Universitätsbibliothek Kassel under a CC-BY SA 4.0 license (https://creativecommons.org/licenses/by-sa/4.0/)', 'TheCometBook.jpg', 'USD', 0, 990000000, 'books');

View File

@@ -0,0 +1,49 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/metrics
- services
- endpoints
- pods
- ingresses
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- "networking.k8s.io"
resources:
- ingresses/status
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- "discovery.k8s.io"
resources:
- endpointslices
verbs:
- get
- list
- watch
- nonResourceURLs:
- "/metrics"
verbs:
- get

View File

@@ -0,0 +1,21 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus

View File

@@ -0,0 +1,353 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/cm.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
namespace: default
data:
allow-snippet-annotations: "false"
alerting_rules.yml: |
{}
alerts: |
{}
prometheus.yml: |
global:
evaluation_interval: 1m
scrape_interval: 1m
scrape_timeout: 10s
storage:
tsdb:
out_of_order_time_window: 30m
otlp:
keep_identifying_resource_attributes: true
promote_resource_attributes:
- service.instance.id
- service.name
- service.namespace
- service.version
- cloud.availability_zone
- cloud.region
- deployment.environment.name
- k8s.cluster.name
- k8s.container.name
- k8s.cronjob.name
- k8s.daemonset.name
- k8s.deployment.name
- k8s.job.name
- k8s.namespace.name
- k8s.node.name
- k8s.pod.name
- k8s.replicaset.name
- k8s.statefulset.name
- container.name
- host.name
- postgresql.database.name
- postgresql.schema.name
- postgresql.table.name
- postgresql.index.name
scrape_configs:
- job_name: kubernetes-api-servers
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: endpointslice
relabel_configs:
- action: keep
regex: default;kubernetes;https
source_labels:
- __meta_kubernetes_namespace
- __meta_kubernetes_service_name
- __meta_kubernetes_endpointslice_port_name
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- job_name: kubernetes-nodes
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
- job_name: kubernetes-nodes-cadvisor
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: node
metrics_path: /metrics/cadvisor
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- source_labels:
- __metrics_path__
target_label: metrics_path
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
insecure_skip_verify: true
- job_name: kubernetes-pods
honor_labels: true
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
- action: drop
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
replacement: '[$2]:$1'
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_port
- __meta_kubernetes_pod_ip
target_label: __address__
- action: replace
regex: (\d+);((([0-9]+?)(\.|$)){4})
replacement: $2:$1
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_port
- __meta_kubernetes_pod_ip
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: node
- job_name: kubernetes-pods-slow
honor_labels: true
kubernetes_sd_configs:
- role: pod
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
replacement: '[$2]:$1'
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_port
- __meta_kubernetes_pod_ip
target_label: __address__
- action: replace
regex: (\d+);((([0-9]+?)(\.|$)){4})
replacement: $2:$1
source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_port
- __meta_kubernetes_pod_ip
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: drop
regex: Pending|Succeeded|Failed|Completed
source_labels:
- __meta_kubernetes_pod_phase
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: node
scrape_interval: 5m
scrape_timeout: 30s
- job_name: kubernetes-service-endpoints
honor_labels: true
kubernetes_sd_configs:
- role: endpointslice
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape
- action: drop
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: (.+?)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_service_name
target_label: service
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: node
- job_name: kubernetes-service-endpoints-slow
honor_labels: true
kubernetes_sd_configs:
- role: endpointslice
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
- action: replace
regex: (https?)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_scheme
target_label: __scheme__
- action: replace
regex: (.+)
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_path
target_label: __metrics_path__
- action: replace
regex: (.+?)(?::\d+)?;(\d+)
replacement: $1:$2
source_labels:
- __address__
- __meta_kubernetes_service_annotation_prometheus_io_port
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
replacement: __param_$1
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- action: replace
source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- action: replace
source_labels:
- __meta_kubernetes_service_name
target_label: service
- action: replace
source_labels:
- __meta_kubernetes_pod_node_name
target_label: node
scrape_interval: 5m
scrape_timeout: 30s
- job_name: kubernetes-services
honor_labels: true
kubernetes_sd_configs:
- role: service
metrics_path: /probe
params:
module:
- http_2xx
relabel_configs:
- action: keep
regex: true
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe
- source_labels:
- __address__
target_label: __param_target
- replacement: blackbox
target_label: __address__
- source_labels:
- __param_target
target_label: instance
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace
- source_labels:
- __meta_kubernetes_service_name
target_label: service
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: prometheus-pushgateway
honor_labels: true
kubernetes_sd_configs:
- role: service
relabel_configs:
- action: keep
regex: pushgateway
source_labels:
- __meta_kubernetes_service_annotation_prometheus_io_probe
rule_files:
- /etc/config/recording_rules.yml
- /etc/config/alerting_rules.yml
- /etc/config/rules
- /etc/config/alerts
recording_rules.yml: |
{}
rules: |
{}

View File

@@ -0,0 +1,95 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
namespace: default
spec:
strategy:
type: Recreate
rollingUpdate: null
selector:
matchLabels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
replicas: 1
revisionHistoryLimit: 10
template:
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
spec:
enableServiceLinks: true
serviceAccountName: prometheus
containers:
- name: prometheus-server
image: "quay.io/prometheus/prometheus:v3.11.3"
imagePullPolicy: "IfNotPresent"
args:
- --storage.tsdb.retention.time=7d
- --config.file=/etc/config/prometheus.yml
- --storage.tsdb.path=/data
- --web.console.libraries=/etc/prometheus/console_libraries
- --web.console.templates=/etc/prometheus/consoles
- --enable-feature=exemplar-storage
- --web.enable-otlp-receiver
ports:
- containerPort: 9090
readinessProbe:
httpGet:
path: /-/ready
port: 9090
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 5
timeoutSeconds: 4
failureThreshold: 3
successThreshold: 1
livenessProbe:
httpGet:
path: /-/healthy
port: 9090
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 10
failureThreshold: 3
successThreshold: 1
resources:
limits:
memory: 400Mi
volumeMounts:
- name: config-volume
mountPath: /etc/config
- name: storage-volume
mountPath: /data
subPath: ""
dnsPolicy: ClusterFirst
securityContext:
fsGroup: 65534
runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
terminationGracePeriodSeconds: 300
volumes:
- name: config-volume
configMap:
name: prometheus
- name: storage-volume
emptyDir:
{}

View File

@@ -0,0 +1,26 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
namespace: default
spec:
ports:
- name: http
port: 9090
protocol: TCP
targetPort: 9090
selector:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
sessionAffinity: None
type: "ClusterIP"

View File

@@ -0,0 +1,16 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
namespace: default
annotations:
{}

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: example
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm

View File

@@ -0,0 +1,97 @@
default:
envOverrides:
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.name=$(OTEL_SERVICE_NAME),service.instance.id=$(OTEL_K8S_POD_UID),service.namespace=opentelemetry-demo,k8s.namespace.name=$(OTEL_K8S_NAMESPACE),k8s.node.name=$(OTEL_K8S_NODE_NAME),k8s.pod.name=$(OTEL_K8S_POD_NAME),app.eng.team=$(TEAM_NAME)
components:
accounting:
envOverrides:
- name: TEAM_NAME
value: orion
ad:
envOverrides:
- name: TEAM_NAME
value: helix
cart:
envOverrides:
- name: TEAM_NAME
value: ring
checkout:
envOverrides:
- name: TEAM_NAME
value: orion
currency:
envOverrides:
- name: TEAM_NAME
value: orion
email:
envOverrides:
- name: TEAM_NAME
value: orion
fraud-detection:
envOverrides:
- name: TEAM_NAME
value: orion
frontend:
envOverrides:
- name: TEAM_NAME
value: ring
load-generator:
envOverrides:
- name: TEAM_NAME
value: ring
payment:
envOverrides:
- name: TEAM_NAME
value: orion
product-catalog:
envOverrides:
- name: TEAM_NAME
value: helix
quote:
envOverrides:
- name: TEAM_NAME
value: orion
recommendation:
envOverrides:
- name: TEAM_NAME
value: helix
shipping:
envOverrides:
- name: TEAM_NAME
value: orion
opentelemetry-collector:
config:
processors:
attributes:
include:
match_type: strict
services:
- frontend-proxy
actions:
- key: "app.eng.team"
value: "ring"
action: insert
service:
pipelines:
traces:
processors:
- memory_limiter
- attributes
- spanmetrics
- batch

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
---
# Source: opentelemetry-demo/templates/flagd-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: flagd-config
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
demo.flagd.json: |
{
"$schema": "https://flagd.dev/schema/v0/flags.json",
"flags": {
"llmInaccurateResponse": {
"defaultVariant": "off",
"description": "LLM returns an inaccurate product summary for product ID L9ECAV7KIM",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"llmRateLimitError": {
"defaultVariant": "off",
"description": "LLM intermittently returns a rate limit error",
"state": "ENABLED",
"variants": {
"off": false,
"on": true
}
},
"productCatalogFailure": {
"description": "Fail product catalog service on a specific product",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"recommendationCacheFailure": {
"description": "Fail recommendation service cache",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adManualGc": {
"description": "Triggers full manual garbage collections in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adHighCpu": {
"description": "Triggers high cpu load in the ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"adFailure": {
"description": "Fail ad service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"kafkaQueueProblems": {
"description": "Overloads Kafka queue while simultaneously introducing a consumer side delay leading to a lag spike",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"cartFailure": {
"description": "Fail cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"paymentFailure": {
"description": "Fail payment service charge requests n%",
"state": "ENABLED",
"variants": {
"100%": 1,
"90%": 0.95,
"75%": 0.75,
"50%": 0.5,
"25%": 0.25,
"10%": 0.1,
"off": 0
},
"defaultVariant": "off"
},
"paymentUnreachable": {
"description": "Payment service is unavailable",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"loadGeneratorFloodHomepage": {
"description": "Flood the frontend with a large amount of requests.",
"state": "ENABLED",
"variants": {
"on": 100,
"off": 0
},
"defaultVariant": "off"
},
"imageSlowLoad": {
"description": "slow loading images in the frontend",
"state": "ENABLED",
"variants": {
"10sec": 10000,
"5sec": 5000,
"off": 0
},
"defaultVariant": "off"
},
"failedReadinessProbe": {
"description": "readiness probe failure for cart service",
"state": "ENABLED",
"variants": {
"on": true,
"off": false
},
"defaultVariant": "off"
},
"emailMemoryLeak": {
"description": "Memory leak in the email service.",
"state": "ENABLED",
"variants": {
"off": 0,
"1x": 1,
"10x": 10,
"100x": 100,
"1000x": 1000,
"10000x": 10000
},
"defaultVariant": "off"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/clusterrole.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana-clusterrole
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["configmaps", "secrets"]
verbs: ["get", "watch", "list"]

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/clusterrolebinding.yaml
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: grafana-clusterrolebinding
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
subjects:
- kind: ServiceAccount
name: grafana
namespace: default
roleRef:
kind: ClusterRole
name: grafana-clusterrole
apiGroup: rbac.authorization.k8s.io

View File

@@ -0,0 +1,27 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap-dashboard-provider.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana-config-dashboards
namespace: default
data:
provider.yaml: |-
apiVersion: 1
providers:
- name: 'sidecarProvider'
orgId: 1
folder: ''
folderUid: ''
type: file
disableDeletion: false
allowUiUpdates: false
updateIntervalSeconds: 30
options:
foldersFromFilesStructure: false
path: /tmp/dashboards

View File

@@ -0,0 +1,37 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
data:
plugins: grafana-opensearch-datasource
grafana.ini: |
[analytics]
check_for_updates = true
[auth]
disable_login_form = true
[auth.anonymous]
enabled = true
org_name = Main Org.
org_role = Admin
[log]
mode = console
[paths]
data = /var/lib/grafana/
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
provisioning = /etc/grafana/provisioning
[server]
domain = ''
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
serve_from_sub_path = true
[unified_storage]
index_path = /var/lib/grafana-search/bleve

View File

@@ -0,0 +1,272 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
strategy:
type: RollingUpdate
template:
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
annotations:
checksum/config: e30f2a2d3b08516a19231e9e993baac3b014e72d908283c5a560fbdbcf4f265a
checksum/sc-dashboard-provider-config: e70bf6a851099d385178a76de9757bb0bef8299da6d8443602590e44f05fdf24
checksum/secret: bed677784356b2af7fb0d87455db21f077853059b594101a4f6532bfbd962a7f
kubectl.kubernetes.io/default-container: grafana
spec:
serviceAccountName: grafana
automountServiceAccountToken: true
shareProcessNamespace: false
securityContext:
fsGroup: 472
runAsGroup: 472
runAsNonRoot: true
runAsUser: 472
enableServiceLinks: true
containers:
- name: grafana-sc-alerts
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_alert"
- name: FOLDER
value: "/etc/grafana/provisioning/alerting"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/alerting/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-alerts-volume
mountPath: "/etc/grafana/provisioning/alerting"
- name: grafana-sc-dashboard
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_dashboard"
- name: FOLDER
value: "/tmp/dashboards"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/dashboards/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: grafana-sc-datasources
image: "quay.io/kiwigrid/k8s-sidecar:2.7.1"
imagePullPolicy: IfNotPresent
env:
- name: METHOD
value: WATCH
- name: LABEL
value: "grafana_datasource"
- name: FOLDER
value: "/etc/grafana/provisioning/datasources"
- name: RESOURCE
value: "both"
- name: REQ_USERNAME
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: REQ_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: REQ_URL
value: http://localhost:3000/api/admin/provisioning/datasources/reload
- name: REQ_METHOD
value: POST
resources:
limits:
cpu: 150m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
- name: grafana
image: "docker.io/grafana/grafana:13.0.1"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: "/etc/grafana/grafana.ini"
subPath: grafana.ini
- name: storage
mountPath: "/var/lib/grafana"
- name: search
mountPath: "/var/lib/grafana-search"
- name: sc-alerts-volume
mountPath: "/etc/grafana/provisioning/alerting"
- name: sc-dashboard-volume
mountPath: "/tmp/dashboards"
- name: sc-dashboard-provider
mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml"
subPath: provider.yaml
- name: sc-datasources-volume
mountPath: "/etc/grafana/provisioning/datasources"
ports:
- name: grafana
containerPort: 3000
protocol: TCP
- name: gossip-tcp
containerPort: 9094
protocol: TCP
- name: gossip-udp
containerPort: 9094
protocol: UDP
- name: profiling
containerPort: 6060
protocol: TCP
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: GF_PLUGINS_PREINSTALL_SYNC
valueFrom:
configMapKeyRef:
name: grafana
key: plugins
- name: GF_PATHS_DATA
value: /var/lib/grafana/
- name: GF_PATHS_LOGS
value: /var/log/grafana
- name: GF_PATHS_PLUGINS
value: /var/lib/grafana/plugins
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning
- name: GF_UNIFIED_STORAGE_INDEX_PATH
value: /var/lib/grafana-search/bleve
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
divisor: "1"
resource: limits.memory
livenessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: grafana
initialDelaySeconds: 60
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /api/health
port: grafana
resources:
limits:
memory: 300Mi
volumes:
- name: config
configMap:
name: grafana
- name: storage
emptyDir: {}
- name: search
emptyDir: {}
- name: sc-alerts-volume
emptyDir: {}
- name: sc-dashboard-volume
emptyDir: {}
- name: sc-dashboard-provider
configMap:
name: grafana-config-dashboards
- name: sc-datasources-volume
emptyDir: {}

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
rules: []

View File

@@ -0,0 +1,20 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: grafana
subjects:
- kind: ServiceAccount
name: grafana
namespace: default

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
app.kubernetes.io/component: admin-secret
type: Opaque
data:
admin-user: "YWRtaW4="
admin-password: "YWRtaW4="
ldap-toml: ""

View File

@@ -0,0 +1,22 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
spec:
type: ClusterIP
ports:
- name: service
port: 80
protocol: TCP
targetPort: grafana
selector:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example

View File

@@ -0,0 +1,13 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: false
metadata:
labels:
helm.sh/chart: grafana-12.3.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "13.0.1"
name: grafana
namespace: default

View File

@@ -0,0 +1,116 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one
template:
metadata:
labels:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one
annotations:
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
spec:
containers:
- env:
- name: MEMORY_MAX_TRACES
value: "25000"
- name: PROMETHEUS_ADDR
value: prometheus:9090
- name: OTEL_COLLECTOR_HOST
value: otel-collector
- name: OTEL_COLLECTOR_PORT_HTTP
value: "4318"
- name: JAEGER_HOST
value: 0.0.0.0
- name: JAEGER_GRPC_PORT
value: "4317"
securityContext:
{}
image: jaegertracing/jaeger:2.17.0
imagePullPolicy: IfNotPresent
name: jaeger
args:
- "--config"
- "/etc/jaeger/user-config.yaml"
ports:
- containerPort: 5775
protocol: UDP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
- containerPort: 5778
protocol: TCP
- containerPort: 16686
protocol: TCP
- containerPort: 16685
protocol: TCP
- containerPort: 9411
protocol: TCP
- containerPort: 4317
protocol: TCP
- containerPort: 4318
protocol: TCP
- containerPort: 13133
protocol: TCP
- containerPort: 8888
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 13133
scheme: HTTP
initialDelaySeconds: 1
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
memory: 600Mi
volumeMounts:
- name: user-config
mountPath: /etc/jaeger/user-config.yaml
subPath: user-config.yaml
securityContext:
fsGroup: 10001
runAsGroup: 10001
runAsUser: 10001
serviceAccountName: jaeger
volumes:
- name: user-config
configMap:
name: user-config

View File

@@ -0,0 +1,14 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
automountServiceAccountToken: true

View File

@@ -0,0 +1,76 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-service.yaml
apiVersion: v1
kind: Service
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
spec:
type: ClusterIP
ports:
# Agent Ports
- name: zk-compact-trft
port: 5775
protocol: UDP
targetPort: 5775
- name: config-rest
port: 5778
targetPort: 5778
- name: jg-compact-trft
port: 6831
protocol: UDP
targetPort: 6831
- name: jg-binary-trft
port: 6832
protocol: UDP
targetPort: 6832
# Collector Ports
- name: http-zipkin
port: 9411
targetPort: 9411
appProtocol: http
- name: grpc-http
port: 14250
targetPort: 14250
appProtocol: grpc
- name: c-tchan-trft
port: 14267
targetPort: 14267
- name: http-c-binary-trft
port: 14268
targetPort: 14268
appProtocol: http
- name: otlp-grpc
port: 4317
targetPort: 4317
appProtocol: grpc
- name: otlp-http
port: 4318
targetPort: 4318
appProtocol: http
# Query Ports
- name: http-query
port: 16686
targetPort: 16686
- name: grpc-query
port: 16685
targetPort: 16685
# Metrics Ports
- name: internal-metrics
port: 8888
targetPort: 8888
appProtocol: http
- name: span-metrics
port: 8889
targetPort: 8889
appProtocol: http
selector:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one

View File

@@ -0,0 +1,76 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger/jaeger-user-config.yaml
# Generates a config map from a file provided by user via `--set-file userconfig=`
apiVersion: v1
kind: ConfigMap
metadata:
name: user-config
namespace: default
labels:
helm.sh/chart: jaeger-4.7.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.17.0"
app.kubernetes.io/managed-by: Helm
data:
user-config.yaml: |
exporters:
jaeger_storage_exporter:
trace_storage: memory_backend
extensions:
healthcheckv2:
http:
endpoint: 0.0.0.0:13133
use_v2: true
jaeger_query:
base_path: /jaeger/ui
storage:
metrics: metrics_backend
traces: memory_backend
jaeger_storage:
backends:
memory_backend:
memory:
max_traces: ${env:MEMORY_MAX_TRACES}
metric_backends:
metrics_backend:
prometheus:
endpoint: http://${env:PROMETHEUS_ADDR}
normalize_calls: true
normalize_duration: true
processors:
batch: {}
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:JAEGER_HOST}:${env:JAEGER_GRPC_PORT}
service:
extensions:
- jaeger_storage
- jaeger_query
- healthcheckv2
pipelines:
traces:
exporters:
- jaeger_storage_exporter
processors:
- batch
receivers:
- otlp
telemetry:
logs:
level: info
metrics:
level: detailed
readers:
- periodic:
exporter:
otlp:
endpoint: http://${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
insecure: true
protocol: http/protobuf
interval: 10000
timeout: 5000
resource:
service.name: jaeger

View File

@@ -0,0 +1,65 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: opensearch-config
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
data:
opensearch.yml: |
cluster.name: opensearch-cluster
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
network.host: 0.0.0.0
# Setting network.host to a non-loopback address enables the annoying bootstrap checks. "Single-node" mode disables them again.
# Implicitly done if ".singleNode" is set to "true".
# discovery.type: single-node
# Start OpenSearch Security Demo Configuration
# WARNING: revise all the lines below before you go into production
# plugins:
# security:
# ssl:
# transport:
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# enforce_hostname_verification: false
# http:
# enabled: true
# pemcert_filepath: esnode.pem
# pemkey_filepath: esnode-key.pem
# pemtrustedcas_filepath: root-ca.pem
# allow_unsafe_democertificates: true
# allow_default_init_securityindex: true
# authcz:
# admin_dn:
# - CN=kirk,OU=client,O=client,L=test,C=de
# audit.type: internal_opensearch
# enable_snapshot_restore_privilege: true
# check_snapshot_restore_write_privileges: true
# restapi:
# roles_enabled: ["all_access", "security_rest_api_access"]
# system_indices:
# enabled: true
# indices:
# [
# ".opendistro-alerting-config",
# ".opendistro-alerting-alert*",
# ".opendistro-anomaly-results*",
# ".opendistro-anomaly-detector*",
# ".opendistro-anomaly-checkpoints",
# ".opendistro-anomaly-detection-state",
# ".opendistro-reports-*",
# ".opendistro-notifications-*",
# ".opendistro-notebooks",
# ".opendistro-asynchronous-search-response*",
# ]
######## End OpenSearch Security Demo Configuration ########

View File

@@ -0,0 +1,19 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/poddisruptionbudget.yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: "opensearch-pdb"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example

View File

@@ -0,0 +1,59 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
{}
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
protocol: TCP
port: 9200
- name: transport
protocol: TCP
port: 9300
- name: metrics
protocol: TCP
port: 9600
---
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
kind: Service
apiVersion: v1
metadata:
name: opensearch-headless
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
clusterIP: None # This is needed for statefulset hostnames like opensearch-0 to resolve
# Create endpoints also if the related pod isn't ready
publishNotReadyAddresses: true
selector:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
ports:
- name: http
port: 9200
- name: transport
port: 9300
- name: metrics
port: 9600

View File

@@ -0,0 +1,154 @@
---
# Source: opentelemetry-demo/charts/opensearch/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: opensearch
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
majorVersion: "3"
spec:
serviceName: opensearch-headless
selector:
matchLabels:
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
replicas: 1
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
template:
metadata:
name: "opensearch"
labels:
helm.sh/chart: opensearch-3.6.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.6.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 93c3f240fa93e351cd611722b36240809ba0f30edfe66389a6198c4b284c681
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
automountServiceAccountToken: false
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app.kubernetes.io/instance
operator: In
values:
- example
- key: app.kubernetes.io/name
operator: In
values:
- opensearch
terminationGracePeriodSeconds: 120
volumes:
- name: config
configMap:
name: opensearch-config
- emptyDir: {}
name: config-emptydir
enableServiceLinks: true
initContainers:
- name: configfile
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
command:
- sh
- -c
- |
#!/usr/bin/env bash
cp -r /tmp/configfolder/* /tmp/config/
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
resources:
{}
volumeMounts:
- mountPath: /tmp/config/
name: config-emptydir
- name: config
mountPath: /tmp/configfolder/opensearch.yml
subPath: opensearch.yml
containers:
- name: "opensearch"
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
image: "opensearchproject/opensearch:3.6.0"
imagePullPolicy: "IfNotPresent"
readinessProbe:
failureThreshold: 3
periodSeconds: 5
tcpSocket:
port: 9200
timeoutSeconds: 3
startupProbe:
failureThreshold: 30
initialDelaySeconds: 5
periodSeconds: 10
tcpSocket:
port: 9200
timeoutSeconds: 3
ports:
- name: http
containerPort: 9200
- name: transport
containerPort: 9300
- name: metrics
containerPort: 9600
resources:
limits:
memory: 1100Mi
requests:
cpu: 1000m
memory: 100Mi
env:
- name: node.name
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: discovery.seed_hosts
value: "opensearch-cluster-master-headless"
- name: cluster.name
value: "demo-cluster"
- name: network.host
value: "0.0.0.0"
- name: OPENSEARCH_JAVA_OPTS
value: "-Xms400m -Xmx400m"
- name: node.roles
value: "master,ingest,data,remote_cluster_client,"
- name: discovery.type
value: "single-node"
- name: bootstrap.memory_lock
value: "true"
- name: DISABLE_INSTALL_DEMO_CONFIG
value: "true"
- name: DISABLE_SECURITY_PLUGIN
value: "true"
volumeMounts:
- name: config-emptydir
mountPath: /usr/share/opensearch/config/opensearch.yml
subPath: opensearch.yml

View File

@@ -0,0 +1,48 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get","list","watch","create","update","patch","delete"]
- apiGroups: [""]
resources: ["pods", "namespaces"]
verbs: ["get", "watch", "list"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events", "namespaces", "namespaces/status", "nodes", "nodes/spec", "pods", "pods/status", "replicationcontrollers", "replicationcontrollers/status", "resourcequotas", "services" ]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["daemonsets", "deployments", "replicasets", "statefulsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["daemonsets", "deployments", "replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes/stats"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]

View File

@@ -0,0 +1,22 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: otel-collector
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: otel-collector
subjects:
- kind: ServiceAccount
name: otel-collector
namespace: default

View File

@@ -0,0 +1,291 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/configmap-agent.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
data:
relay: |
connectors:
spanmetrics: {}
exporters:
debug: {}
opensearch:
http:
endpoint: http://opensearch:9200
tls:
insecure: true
logs_index: otel-logs
logs_index_time_format: yyyy-MM-dd
otlp/jaeger:
endpoint: jaeger:4317
sending_queue:
batch: {}
tls:
insecure: true
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue:
batch: {}
tls:
insecure: true
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
k8s_leader_elector/k8s_cluster:
auth_type: serviceAccount
lease_name: k8s.cluster.receiver.opentelemetry.io
lease_namespace: default
k8s_observer:
auth_type: serviceAccount
node: ${env:K8S_NODE_NAME}
processors:
batch: {}
k8sattributes:
extract:
metadata:
- k8s.namespace.name
- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.pod.start_time
- k8s.deployment.name
- k8s.replicaset.name
- k8s.replicaset.uid
- k8s.daemonset.name
- k8s.daemonset.uid
- k8s.job.name
- k8s.job.uid
- k8s.container.name
- k8s.cronjob.name
- k8s.statefulset.name
- k8s.statefulset.uid
- container.image.tag
- container.image.name
- k8s.cluster.uid
- service.namespace
- service.name
- service.version
- service.instance.id
otel_annotations: true
filter:
node_from_env_var: K8S_NODE_NAME
passthrough: false
pod_association:
- sources:
- from: resource_attribute
name: k8s.pod.ip
- sources:
- from: resource_attribute
name: k8s.pod.uid
- sources:
- from: connection
memory_limiter:
check_interval: 5s
limit_percentage: 80
spike_limit_percentage: 25
resource:
attributes:
- action: insert
from_attribute: k8s.pod.uid
key: service.instance.id
resourcedetection:
detectors:
- env
- system
transform:
error_mode: ignore
trace_statements:
- conditions:
- span.kind == SPAN_KIND_SERVER and resource.attributes["service.name"] == "frontend"
and span.attributes["http.route"] == nil
context: span
statements:
- set(span.attributes["http.route"], "/api/cart") where IsMatch(span.attributes["http.target"],
"\\/api\\/cart")
- set(span.attributes["http.route"], "/api/checkout") where IsMatch(span.attributes["http.target"],
"\\/api\\/checkout")
- set(span.attributes["http.route"], "/api/products/{productId}") where IsMatch(span.attributes["http.target"],
"\\/api\\/products\\/.*")
- set(span.attributes["http.route"], "/api/recommendations") where IsMatch(span.attributes["http.target"],
"\\/api\\/recommendations")
- set(span.attributes["http.route"], "/api/data") where IsMatch(span.attributes["http.target"],
"\\/api\\/data.*")
- context: span
statements:
- set_semconv_span_name("1.37.0", "unsanitized_span_name")
receivers:
hostmetrics:
collection_interval: 10s
root_path: /hostfs
scrapers:
cpu: null
disk: null
filesystem:
exclude_fs_types:
fs_types:
- autofs
- binfmt_misc
- bpf
- cgroup2
- configfs
- debugfs
- devpts
- devtmpfs
- fusectl
- hugetlbfs
- iso9660
- mqueue
- nsfs
- overlay
- proc
- procfs
- pstore
- rpc_pipefs
- securityfs
- selinuxfs
- squashfs
- sysfs
- tracefs
match_type: strict
exclude_mount_points:
match_type: regexp
mount_points:
- /dev/*
- /proc/*
- /sys/*
- /run/k3s/containerd/*
- /var/lib/docker/*
- /var/lib/kubelet/*
- /snap/*
load: null
memory: null
network: null
jaeger:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:14250
thrift_compact:
endpoint: ${env:MY_POD_IP}:6831
thrift_http:
endpoint: ${env:MY_POD_IP}:14268
k8s_cluster:
collection_interval: 10s
k8s_leader_elector: k8s_leader_elector/k8s_cluster
kafkametrics:
brokers:
- kafka:9092
collection_interval: 10s
scrapers:
- brokers
- topics
- consumers
kubeletstats:
auth_type: serviceAccount
collection_interval: 20s
endpoint: ${env:K8S_NODE_IP}:10250
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
http:
cors:
allowed_origins:
- http://*
- https://*
endpoint: ${env:MY_POD_IP}:4318
prometheus:
config:
scrape_configs:
- job_name: opentelemetry-collector
scrape_interval: 10s
static_configs:
- targets:
- ${env:MY_POD_IP}:8888
receiver_creator/metrics:
discovery:
enabled: true
watch_observers:
- k8s_observer
zipkin:
endpoint: ${env:MY_POD_IP}:9411
service:
extensions:
- health_check
- k8s_observer
- k8s_leader_elector/k8s_cluster
pipelines:
logs:
exporters:
- opensearch
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
metrics:
exporters:
- otlphttp/prometheus
- debug
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- batch
receivers:
- otlp
- kafkametrics
- spanmetrics
- receiver_creator/metrics
- hostmetrics
- kubeletstats
- k8s_cluster
traces:
exporters:
- otlp/jaeger
- debug
- spanmetrics
processors:
- k8sattributes
- memory_limiter
- resourcedetection
- resource
- transform
- batch
receivers:
- otlp
- jaeger
- zipkin
telemetry:
metrics:
level: detailed
readers:
- periodic:
exporter:
otlp:
endpoint: http://otel-collector:4318
insecure: true
protocol: http/protobuf
interval: 10000
timeout: 5000
resource:
host.name: ${env:OTEL_K8S_NODE_NAME}
k8s.namespace.name: ${env:OTEL_K8S_NAMESPACE}
k8s.node.ip: ${env:OTEL_K8S_NODE_IP}
k8s.node.name: ${env:OTEL_K8S_NODE_NAME}
k8s.pod.ip: ${env:OTEL_K8S_POD_IP}
k8s.pod.name: ${env:OTEL_K8S_POD_NAME}

View File

@@ -0,0 +1,147 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: otel-collector-agent
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
updateStrategy:
type: RollingUpdate
template:
metadata:
annotations:
checksum/config: 6905c8bfe1e3660dcfd4a40edbb287b285935519de9716e4069ce2b1b49b71e0
labels:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
spec:
serviceAccountName: otel-collector
automountServiceAccountToken: true
securityContext:
{}
containers:
- name: opentelemetry-collector
args:
- --config=/conf/relay.yaml
securityContext:
{}
image: "otel/opentelemetry-collector-contrib:0.151.0"
imagePullPolicy: IfNotPresent
ports:
- name: jaeger-compact
containerPort: 6831
protocol: UDP
hostPort: 6831
- name: jaeger-grpc
containerPort: 14250
protocol: TCP
hostPort: 14250
- name: jaeger-thrift
containerPort: 14268
protocol: TCP
hostPort: 14268
- name: metrics
containerPort: 8888
protocol: TCP
- name: otlp
containerPort: 4317
protocol: TCP
hostPort: 4317
- name: otlp-http
containerPort: 4318
protocol: TCP
hostPort: 4318
- name: zipkin
containerPort: 9411
protocol: TCP
hostPort: 9411
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: OTEL_K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: OTEL_K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: OTEL_K8S_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: OTEL_K8S_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: OTEL_K8S_POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: K8S_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: GOMEMLIMIT
value: "160MiB"
livenessProbe:
httpGet:
path: /
port: 13133
readinessProbe:
httpGet:
path: /
port: 13133
resources:
limits:
memory: 200Mi
volumeMounts:
- mountPath: /conf
name: opentelemetry-collector-configmap
- name: hostfs
mountPath: /hostfs
readOnly: true
mountPropagation: HostToContainer
terminationGracePeriodSeconds: 30
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: false
hostPID: false

View File

@@ -0,0 +1,54 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector
component: agent-collector
spec:
type: ClusterIP
ports:
- name: jaeger-compact
port: 6831
targetPort: 6831
protocol: UDP
- name: jaeger-grpc
port: 14250
targetPort: 14250
protocol: TCP
- name: jaeger-thrift
port: 14268
targetPort: 14268
protocol: TCP
- name: metrics
port: 8888
targetPort: 8888
protocol: TCP
- name: otlp
port: 4317
targetPort: 4317
protocol: TCP
appProtocol: grpc
- name: otlp-http
port: 4318
targetPort: 4318
protocol: TCP
- name: zipkin
port: 9411
targetPort: 9411
protocol: TCP
selector:
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
component: agent-collector
internalTrafficPolicy: Local

View File

@@ -0,0 +1,15 @@
---
# Source: opentelemetry-demo/charts/opentelemetry-collector/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: otel-collector
namespace: default
labels:
helm.sh/chart: opentelemetry-collector-0.153.0
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.151.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: opentelemetry-collector
app.kubernetes.io/component: agent-collector

View File

@@ -0,0 +1,173 @@
---
# Source: opentelemetry-demo/templates/posgresql-init-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-init
namespace: default
labels:
helm.sh/chart: opentelemetry-demo-0.40.9
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm
data:
init.sql: |
-- Copyright The OpenTelemetry Authors
-- SPDX-License-Identifier: Apache-2.0
CREATE USER otelu WITH PASSWORD 'otelp';
-- Accounting Service: create a schema
CREATE SCHEMA accounting;
GRANT USAGE ON SCHEMA accounting TO otelu;
-- Accounting Service: create tables
CREATE TABLE accounting."order" (
order_id TEXT PRIMARY KEY
);
CREATE TABLE accounting.shipping (
shipping_tracking_id TEXT PRIMARY KEY,
shipping_cost_currency_code TEXT NOT NULL,
shipping_cost_units BIGINT NOT NULL,
shipping_cost_nanos INT NOT NULL,
street_address TEXT,
city TEXT,
state TEXT,
country TEXT,
zip_code TEXT,
order_id TEXT NOT NULL,
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
CREATE TABLE accounting.orderitem (
item_cost_currency_code TEXT NOT NULL,
item_cost_units BIGINT NOT NULL,
item_cost_nanos INT NOT NULL,
product_id TEXT NOT NULL,
quantity INT NOT NULL,
order_id TEXT NOT NULL,
PRIMARY KEY (order_id, product_id),
FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE
);
-- Accounting Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA accounting TO otelu;
-- Product Review Service: create a schema
CREATE SCHEMA reviews;
GRANT USAGE ON SCHEMA reviews TO otelu;
-- Product Review Service: create tables
CREATE TABLE reviews.productreviews (
id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
product_id VARCHAR(16) NOT NULL,
username VARCHAR(64) NOT NULL,
description VARCHAR(1024),
score NUMERIC(2,1) NOT NULL
);
-- Product Review Service: create index for product_id lookups
CREATE INDEX product_id_index ON reviews.productreviews (product_id);
-- Product Review Service: grant permission to schema
GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA reviews TO otelu;
-- Product Review Service: add product review data
INSERT INTO reviews.productreviews (product_id, username, description, score)
VALUES
('OLJCESPC7Z', 'stargazer_mike', 'Great entry-level telescope! Easy to set up and provides clear views of the moon and brighter planets. Highly recommend for new astronomers.', '4.5'),
('OLJCESPC7Z', 'nightskylover', 'For the price, this Explorascope delivers excellent performance. I was able to see Jupiter''s moons clearly. A fantastic purchase for casual viewing.', '4.0'),
('OLJCESPC7Z', 'beginner_astro', 'A bit tricky to get used to the manual controls, but once you do, it''s very rewarding. Saw the Orion Nebula for the first time! Good value.', '3.5'),
('OLJCESPC7Z', 'celestial_explorer', 'Perfect for camping trips. It''s lightweight and portable, making it easy to take anywhere. The views are surprisingly good for its size.', '4.0'),
('OLJCESPC7Z', 'telescope_fan', 'Not the most powerful scope, but it''s great for kids and beginners. My children love looking at the moon with it. A solid choice for family fun.', '3.0'),
('66VCHSJNUP', 'tech_astro', 'The StarSense app is revolutionary! It made finding celestial objects incredibly easy. This telescope is a game-changer for beginners.', '5.0'),
('66VCHSJNUP', 'app_user', 'Amazing technology, the smartphone integration works flawlessly. I''ve never had so much fun exploring the night sky. Worth every penny.', '4.5'),
('66VCHSJNUP', 'innovator_john', 'Setup was a breeze, and the tutorials in the app are very helpful. The views are crisp and clear. My only minor gripe is battery drain on the phone.', '4.0'),
('66VCHSJNUP', 'clear_skies', 'Finally, a telescope that takes the guesswork out of stargazing. The real-time positioning is incredibly accurate. Highly recommended for anyone new to astronomy.', '5.0'),
('66VCHSJNUP', 'gadget_geek', 'Fantastic product, the app truly guides you. It''s like having a personal astronomer with you. The optical quality is also very good.', '4.5'),
('1YMWWN1N4O', 'solar_viewer', 'Perfect for solar observations! The Solar Safe filter gives peace of mind. I used it for the last partial eclipse and it was fantastic.', '5.0'),
('1YMWWN1N4O', 'eclipse_chaser', 'Compact and easy to carry, this telescope is ideal for eclipse events. The included backpack is a nice touch. Views of the sun are incredibly clear and safe.', '4.5'),
('1YMWWN1N4O', 'travel_astro', 'Excellent travel scope for solar viewing. The magnification is much better than binoculars for the sun. A must-have for any solar enthusiast.', '4.0'),
('1YMWWN1N4O', 'sun_gazer', 'Very impressed with the safety features and clarity. Sharing the sun with family has never been easier or safer. Great value for a dedicated solar scope.', '5.0'),
('1YMWWN1N4O', 'safe_viewer', 'The ISO compliant filter is reassuring. It''s a well-designed product for safe solar observation. Highly recommend for educational purposes too.', '4.5'),
('L9ECAV7KIM', 'clean_optics', 'This kit is a lifesaver for all my optics. The brush and wipes work perfectly without leaving any residue. My lenses have never been cleaner.', '5.0'),
('L9ECAV7KIM', 'photog_pro', 'Essential for any photographer or telescope owner. It safely removes dust and fingerprints. A high-quality cleaning solution.', '4.5'),
('L9ECAV7KIM', 'daily_cleaner', 'I use this on my binoculars, camera lenses, and even my phone screen. It''s very effective and gentle. A versatile cleaning kit.', '4.0'),
('L9ECAV7KIM', 'tech_maintenance', 'Great value for money. The different cleaning options cover all needs. Keeps my expensive equipment in pristine condition.', '5.0'),
('L9ECAV7KIM', 'sharp_view', 'Works as advertised, my telescope views are much clearer after using this. The fluid and cloth are excellent. Definitely recommend.', '4.5'),
('2ZYFJ3GM2N', 'bird_watcher', 'Incredible clarity and brightness, perfect for bird watching. The ED glass really makes a difference. I can spot the subtlest markings.', '5.0'),
('2ZYFJ3GM2N', 'nature_lover', 'These binoculars are fantastic for nature observation. The close focus is a huge advantage for viewing nearby wildlife. Very comfortable to hold.', '4.5'),
('2ZYFJ3GM2N', 'hiker_guy', 'Lightweight and durable, these are my go-to binoculars for hiking. The wide field of view is excellent. Highly recommend for outdoor enthusiasts.', '4.0'),
('2ZYFJ3GM2N', 'stadium_fan', 'Took these to a game and had an amazing view of the action. They perform great in various lighting conditions. A solid all-around binocular.', '4.0'),
('2ZYFJ3GM2N', 'outdoor_adventurer', 'Excellent build quality and optical performance. They feel robust and provide sharp images. A great investment for any outdoor activity.', '4.5'),
('0PUK6V6EV0', 'astro_photog', 'This imager is a fantastic step up for planetary photography. The color quality is superb. Easy to use with my existing telescope setup.', '5.0'),
('0PUK6V6EV0', 'planet_shooter', 'Finally capturing stunning images of Saturn and Jupiter! The NexImage 10 makes it so accessible. Great for beginners in astrophotography.', '4.5'),
('0PUK6V6EV0', 'imager_pro', 'Excellent resolution and color rendition for its price point. It''s a perfect solution for those looking to start imaging planets. Highly satisfied.', '4.0'),
('0PUK6V6EV0', 'space_artist', 'The detail I can capture with this imager is incredible. It integrates well with various software. A must-have for serious planetary observers.', '5.0'),
('0PUK6V6EV0', 'digital_sky', 'A solid choice for getting into solar system imaging. The setup was straightforward. Produces beautiful, vibrant planetary images.', '4.5'),
('LS4PSXUNUM', 'night_walker', 'The red light is perfect for preserving night vision during astronomy sessions. The hand warmer is an unexpected bonus. Very practical device.', '5.0'),
('LS4PSXUNUM', 'star_party_goer', 'This flashlight is indispensable for star parties. The red mode is gentle on the eyes, and the power bank feature is super handy. Love it!', '4.5'),
('LS4PSXUNUM', 'camper_chris', 'Rugged and versatile, this flashlight is great for camping and night walks. The hand warmer function is a game-changer on cold nights. Highly recommend.', '4.5'),
('LS4PSXUNUM', 'emergency_kit', 'A fantastic multi-tool for my emergency kit. The red light is useful, and the power bank means I can charge my phone. Great design.', '4.0'),
('LS4PSXUNUM', 'astro_accessory', 'Every astronomer needs one of these. The red light is essential, and the hand warmer and power bank make it incredibly useful. A top-tier accessory.', '5.0'),
('9SIQT8TOJO', 'deep_sky_master', 'The RASA V2 is a dream come true for deep-sky imaging. The f/2.2 speed drastically cuts down exposure times. My best astrophotography investment yet.', '5.0'),
('9SIQT8TOJO', 'pro_astro', 'Unbelievable performance for wide-field astrophotography. The short focal length makes guiding less critical. Produces stunning, detailed images.', '5.0'),
('9SIQT8TOJO', 'imaging_guru', 'This OTA is a beast! The fast optics mean more data in less time. If you''re serious about deep-sky imaging, this is the one.', '4.5'),
('9SIQT8TOJO', 'advanced_scope', 'Worth every penny for the quality and speed it offers. My images have never been sharper or more vibrant. A truly professional piece of equipment.', '5.0'),
('9SIQT8TOJO', 'precision_optics', 'The engineering behind this RASA is exceptional. It''s incredibly efficient for capturing faint objects. A high-end choice for dedicated imagers.', '4.5'),
('6E92ZMYYFZ', 'solar_safety', 'Essential for safe solar viewing with my 8-inch telescope. The Velcro straps ensure it stays securely in place. Peace of mind during solar observations.', '5.0'),
('6E92ZMYYFZ', 'telescope_upgrade', 'This EclipSmart filter is a perfect addition to my setup. The ISO compliance is crucial. Highly recommend for anyone looking to view the sun safely.', '4.5'),
('6E92ZMYYFZ', 'safe_sun_gazer', 'Easy to attach and provides crystal clear, safe views of the sun. The build quality is excellent. A must-have accessory for solar enthusiasts.', '5.0'),
('6E92ZMYYFZ', 'filter_fan', 'Works perfectly with my 8-inch scope. No more worries about accidental dislodgement. Great product for protecting your eyes and equipment.', '4.5'),
('6E92ZMYYFZ', 'eclipse_ready', 'Bought this for the upcoming eclipse, and it fits perfectly. Tested it out, and the views are fantastic and safe. Very happy with this purchase.', '5.0'),
('HQTGWGPNH4', 'history_buff', 'A fascinating glimpse into historical astronomical thought. The content is incredibly insightful. A must-read for anyone interested in the history of science.', '5.0'),
('HQTGWGPNH4', 'bookworm_astro', 'Beautifully presented historical document. It''s amazing to see how comets were understood centuries ago. A valuable addition to any astronomy library.', '4.5'),
('HQTGWGPNH4', 'ancient_texts', 'Such a unique and intriguing read. The historical context is captivating. It offers a different perspective on celestial events.', '4.0'),
('HQTGWGPNH4', 'celestial_history', 'I love historical astronomy, and this book delivers. It''s well-researched and provides a window into past beliefs. Highly recommended for scholars.', '5.0'),
('HQTGWGPNH4', 'rare_find', 'A truly special book for enthusiasts of astronomical history. The details about ancient astrologers are very interesting. Great for a deeper understanding.', '4.5');
-- Product Catalog Service: create a schema
CREATE SCHEMA catalog;
GRANT USAGE ON SCHEMA catalog TO otelu;
-- Product Catalog Service: create tables
CREATE TABLE catalog.products (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
description TEXT,
picture TEXT,
price_currency_code TEXT NOT NULL,
price_units BIGINT NOT NULL,
price_nanos INT NOT NULL,
categories TEXT
);
-- Product Catalog Service: grant permission to schema
GRANT SELECT ON ALL TABLES IN SCHEMA catalog TO otelu;
-- Product Catalog Service: add product data
INSERT INTO catalog.products (id, name, description, picture, price_currency_code, price_units, price_nanos, categories)
VALUES
('OLJCESPC7Z', 'National Park Foundation Explorascope', 'The National Park Foundation''s (NPF) Explorascope 60AZ is a manual alt-azimuth, refractor telescope perfect for celestial viewing on the go. The NPF Explorascope 60 can view the planets, moon, star clusters and brighter deep sky objects like the Orion Nebula and Andromeda Galaxy.', 'NationalParkFoundationExplorascope.jpg', 'USD', 101, 960000000, 'telescopes'),
('66VCHSJNUP', 'Starsense Explorer Refractor Telescope', 'The first telescope that uses your smartphone to analyze the night sky and calculate its position in real time. StarSense Explorer is ideal for beginners thanks to the app''s user-friendly interface and detailed tutorials. It''s like having your own personal tour guide of the night sky', 'StarsenseExplorer.jpg', 'USD', 349, 950000000, 'telescopes'),
('1YMWWN1N4O', 'Eclipsmart Travel Refractor Telescope', 'Dedicated white-light solar scope for the observer on the go. The 50mm refracting solar scope uses Solar Safe, ISO compliant, full-aperture glass filter material to ensure the safest view of solar events. The kit comes complete with everything you need, including the dedicated travel solar scope, a Solar Safe finderscope, tripod, a high quality 20mm (18x) Kellner eyepiece and a nylon backpack to carry everything in. This Travel Solar Scope makes it easy to share the Sun as well as partial and total solar eclipses with the whole family and offers much higher magnifications than you would otherwise get using handheld solar viewers or binoculars.', 'EclipsmartTravelRefractorTelescope.jpg', 'USD', 129, 950000000, 'telescopes,travel'),
('L9ECAV7KIM', 'Lens Cleaning Kit', 'Wipe away dust, dirt, fingerprints and other particles on your lenses to see clearly with the Lens Cleaning Kit. This cleaning kit works on all glass and optical surfaces, including telescopes, binoculars, spotting scopes, monoculars, microscopes, and even your camera lenses, computer screens, and mobile devices. The kit comes complete with a retractable lens brush to remove dust particles and dirt and two options to clean smudges and fingerprints off of your optics, pre-moistened lens wipes and a bottled lens cleaning fluid with soft cloth.', 'LensCleaningKit.jpg', 'USD', 21, 950000000, 'accessories'),
('2ZYFJ3GM2N', 'Roof Binoculars', 'This versatile, all-around binocular is a great choice for the trail, the stadium, the arena, or just about anywhere you want a close-up view of the action without sacrificing brightness or detail. It''s an especially great companion for nature observation and bird watching, with ED glass that helps you spot the subtlest field markings and a close focus of just 6.5 feet.', 'RoofBinoculars.jpg', 'USD', 209, 950000000, 'binoculars'),
('0PUK6V6EV0', 'Solar System Color Imager', 'You have your new telescope and have observed Saturn and Jupiter. Now you''re ready to take the next step and start imaging them. But where do you begin? The NexImage 10 Solar System Imager is the perfect solution.', 'SolarSystemColorImager.jpg', 'USD', 175, 0, 'accessories,telescopes'),
('LS4PSXUNUM', 'Red Flashlight', 'This 3-in-1 device features a 3-mode red flashlight, a hand warmer, and a portable power bank for recharging your personal electronics on the go. Whether you use it to light the way at an astronomy star party, a night walk, or wildlife research, ThermoTorch 3 Astro Red''s rugged, IPX4-rated design will withstand your everyday activities.', 'RedFlashlight.jpg', 'USD', 57, 80000000, 'accessories,flashlights'),
('9SIQT8TOJO', 'Optical Tube Assembly', 'Capturing impressive deep-sky astroimages is easier than ever with Rowe-Ackermann Schmidt Astrograph (RASA) V2, the perfect companion to today''s top DSLR or astronomical CCD cameras. This fast, wide-field f/2.2 system allows for shorter exposure times compared to traditional f/10 astroimaging, without sacrificing resolution. Because shorter sub-exposure times are possible, your equatorial mount won''t need to accurately track over extended periods. The short focal length also lessens equatorial tracking demands. In many cases, autoguiding will not be required.', 'OpticalTubeAssembly.jpg', 'USD', 3599, 0, 'accessories,telescopes,assembly'),
('6E92ZMYYFZ', 'Solar Filter', 'Enhance your viewing experience with EclipSmart Solar Filter for 8" telescopes. With two Velcro straps and four self-adhesive Velcro pads for added safety, you can be assured that the solar filter cannot be accidentally knocked off and will provide Solar Safe, ISO compliant viewing.', 'SolarFilter.jpg', 'USD', 69, 950000000, 'accessories,telescopes'),
('HQTGWGPNH4', 'The Comet Book', 'A 16th-century treatise on comets, created anonymously in Flanders (now northern France) and now held at the Universitätsbibliothek Kassel. Commonly known as The Comet Book (or Kometenbuch in German), its full title translates as "Comets and their General and Particular Meanings, According to Ptolomeé, Albumasar, Haly, Aliquind and other Astrologers". The image is from https://publicdomainreview.org/collection/the-comet-book, made available by the Universitätsbibliothek Kassel under a CC-BY SA 4.0 license (https://creativecommons.org/licenses/by-sa/4.0/)', 'TheCometBook.jpg', 'USD', 0, 990000000, 'books');

View File

@@ -0,0 +1,49 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/metrics
- services
- endpoints
- pods
- ingresses
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- "networking.k8s.io"
resources:
- ingresses/status
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- "discovery.k8s.io"
resources:
- endpointslices
verbs:
- get
- list
- watch
- nonResourceURLs:
- "/metrics"
verbs:
- get

View File

@@ -0,0 +1,21 @@
---
# Source: opentelemetry-demo/charts/prometheus/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: prometheus
app.kubernetes.io/instance: example
app.kubernetes.io/version: v3.11.3
helm.sh/chart: prometheus-29.6.0
app.kubernetes.io/part-of: prometheus
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus

Some files were not shown because too many files have changed in this diff Show More