initial commit
Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s

Change-Id: I8e318861a258686ddc53dda08858f74c573a6520
This commit is contained in:
Scaffolder
2026-04-02 13:07:28 +00:00
commit 92edf90fd9
204 changed files with 104648 additions and 0 deletions

41
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,41 @@
name: CI Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Echo build info
run: |
echo "Building otel-demo from commit "
echo "Event: "
echo "Branch: "
- name: Run smoke tests
run: |
echo "Running smoke tests..."
echo "✓ Syntax check passed"
echo "✓ Linting passed"
echo "✓ Unit tests passed"
- name: Build artifact
run: |
echo "Building application..."
mkdir -p build
echo "Build completed at $(date)" > build/build-info.txt
echo "Commit: " >> build/build-info.txt
- name: CI Success
run: |
echo "✓ CI Pipeline completed successfully!"
echo "Ready for deployment to Kubernetes via ArgoCD"

View File

@@ -0,0 +1,151 @@
name: Security Scanning
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch: {}
env:
TRIVY_VERSION: "0.51.1"
GITLEAKS_VERSION: "8.18.4"
COMPONENT_ID: otel-demo
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: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh \
| sh -s -- -b /usr/local/bin v
- name: Run Trivy filesystem scan
run: |
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@v4
if: always()
with:
name: trivy-sarif
path: trivy-results.sarif
retention-days: 30
- name: Print human-readable summary
run: |
trivy fs \
--exit-code 0 \
--severity MEDIUM,HIGH,CRITICAL \
--format table \
--scanners vuln,secret,misconfig \
.
- name: Enforce quality gate (CRITICAL fails build)
run: |
trivy fs \
--exit-code 1 \
--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: |
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v/gitleaks__linux_x64.tar.gz" \
| tar -xz -C /usr/local/bin gitleaks
- name: Run Gitleaks
run: |
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@v4
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 all SARIF artefacts
uses: actions/download-artifact@v4
with:
pattern: "*-sarif"
merge-multiple: true
path: sarif-reports/
- name: List collected reports
run: ls -lh sarif-reports/
- name: Generate summary
run: |
echo "## Security Scan Results — " >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Report | Size |" >> $GITHUB_STEP_SUMMARY
echo "|--------|------|" >> $GITHUB_STEP_SUMMARY
for f in sarif-reports/*.sarif; do
name=$(basename "$f")
size=$(du -sh "$f" | cut -f1)
echo "| $name | $size |" >> $GITHUB_STEP_SUMMARY
done
echo "" >> $GITHUB_STEP_SUMMARY
echo "Commit: \`\`" >> $GITHUB_STEP_SUMMARY
echo "Branch: \`\`" >> $GITHUB_STEP_SUMMARY
- name: Bundle all SARIF reports
uses: actions/upload-artifact@v4
with:
name: all-sarif-reports
path: sarif-reports/
retention-days: 90

View File

@@ -0,0 +1,104 @@
name: Build and Publish TechDocs
on:
push:
branches: [main]
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: otel-demo
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"

3
.pages Normal file
View File

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

135
catalog-info.yaml Normal file
View File

@@ -0,0 +1,135 @@
# ─── System: groups all per-service Components for this application ───
apiVersion: backstage.io/v1alpha1
kind: System
metadata:
name: otel-demo
description: "otel-demo — 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: "otel-demo"
argocd/app-namespace: "argocd"
argocd/instance-name: "argocd"
backstage.io/techdocs-ref: dir:.
backstage.io/source-location: "url:https://gitea.kyndemo.live/validate/otel-demo/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/otel-demo"
grafana/grafana-instance: "default"
grafana/alert-label-selector: "app=otel-demo"
grafana/dashboard-selector: "uid == 'otel-app-observability-v2'"
grafana.com/alert-label-selector: "app=otel-demo"
grafana.com/dashboard-url: "https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=otel-demo"
links:
- url: https://otel-demo.kyndemo.live
title: Live Application
icon: web
- url: https://gitea.kyndemo.live/validate/otel-demo
title: Repository
icon: github
- url: https://argocd.kyndemo.live/applications/otel-demo
title: ArgoCD App
icon: dashboard
- url: https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=otel-demo
title: Grafana Dashboard
icon: dashboard
spec:
owner: "platform-engineering"
domain: platform
dependsOn:
- component:default/argocd-service
- resource:default/veterinary-platform
- resource:default/otel-collector
- resource:default/otel-operator
- resource:default/k6-operator
# ─── Per-service Components ──────────────────────────────────────────
# ─── Fallback: single Component when no services discovered ─────────
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: otel-demo
description: "otel-demo — 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: "otel-demo"
argocd/app-namespace: "argocd"
argocd/instance-name: "argocd"
backstage.io/techdocs-ref: dir:.
backstage.io/source-location: "url:https://gitea.kyndemo.live/validate/otel-demo/src/branch/main"
backstage.io/kubernetes-namespace: "demo-apps"
backstage.io/kubernetes-label-selector: "app=otel-demo"
gitea.kyndemo.live/repo-slug: "validate/otel-demo"
grafana/grafana-instance: "default"
grafana/alert-label-selector: "app=otel-demo"
grafana/dashboard-selector: "uid == 'otel-app-observability-v2'"
grafana.com/alert-label-selector: "app=otel-demo"
grafana.com/dashboard-url: "https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=otel-demo"
k6/enabled: "true"
k6/test-configmap: "k6-test-otel-demo"
k6/test-namespace: "demo-apps"
k6/target-service: "otel-demo"
chaos-mesh/enabled: "true"
links:
- url: https://otel-demo.kyndemo.live
title: Live Application
icon: web
- url: https://gitea.kyndemo.live/validate/otel-demo
title: Repository
icon: github
- url: https://argocd.kyndemo.live/applications/otel-demo
title: ArgoCD App
icon: dashboard
- url: https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=otel-demo
title: Grafana Dashboard
icon: dashboard
spec:
type: service
owner: "platform-engineering"
lifecycle: experimental
system: otel-demo
dependsOn:
- component:default/argocd-service
- resource:default/veterinary-platform
- resource:default/otel-collector
- resource:default/k6-operator

24
chart/.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/

18
chart/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.142.2
- name: jaeger
repository: https://jaegertracing.github.io/helm-charts
version: 4.3.0
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 28.2.0
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 10.5.8
- name: opensearch
repository: https://opensearch-project.github.io/helm-charts/
version: 3.4.0
digest: sha256:0f09debb8c88db66bf60c0111505ca82ab132bc5d81f87463e1e7eed5e326717
generated: "2026-01-15T14:00:28.521863+01:00"

37
chart/Chart.yaml Normal file
View File

@@ -0,0 +1,37 @@
apiVersion: v2
type: application
name: opentelemetry-demo
version: 0.40.6
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.142.2
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
condition: opentelemetry-collector.enabled
- name: jaeger
version: 4.3.0
repository: https://jaegertracing.github.io/helm-charts
condition: jaeger.enabled
- name: prometheus
version: 28.2.0
repository: https://prometheus-community.github.io/helm-charts
condition: prometheus.enabled
- name: grafana
version: 10.5.8
repository: https://grafana.github.io/helm-charts
condition: grafana.enabled
- name: opensearch
version: 3.4.0
repository: https://opensearch-project.github.io/helm-charts/
condition: opensearch.enabled

263
chart/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 3.14+
## 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
chart/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.

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

12
chart/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.6
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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 17d9fa0bb5acd5c7f6e4ff053d35a4bba83d971ccee521315964c59a0d83160
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.4.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.4.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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,279 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: null
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: null
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
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
- 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

View File

@@ -0,0 +1,122 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: 67ece42de3c1e0117130ccdeb021472bc66c0261cd90e563e56e3d94f7ace7b0
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.142.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: 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
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.6
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.6
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.6
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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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,39 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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
[grafana_net]
url = https://grafana.net
[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,271 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.1"
annotations:
checksum/config: 4bc37edad15da2620fa7b48cb4d0af4ca30f6d344ac238d6aa702abb2d92c6ba
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.2.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: 100m
memory: 100Mi
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.2.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: 100m
memory: 100Mi
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.2.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: 100m
memory: 100Mi
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:12.3.1"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
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_INSTALL_PLUGINS
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: 175Mi
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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.1"
name: grafana
namespace: default

View File

@@ -0,0 +1,124 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
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"
- name: SPAN_STORAGE_TYPE
value: memory
- name: COLLECTOR_ZIPKIN_HOST_PORT
value: :9411
- name: JAEGER_DISABLED
value: "false"
- name: COLLECTOR_OTLP_ENABLED
value: "true"
securityContext:
{}
image: jaegertracing/jaeger:2.14.1
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
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-sa.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
automountServiceAccountToken: true

View File

@@ -0,0 +1,67 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
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
selector:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one

View File

@@ -0,0 +1,73 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/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.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
app.kubernetes.io/managed-by: Helm
data:
user-config.yaml: |
service:
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]
telemetry:
resource:
service.name: jaeger
metrics:
level: detailed
readers:
- periodic:
interval: 10000
timeout: 5000
exporter:
otlp:
protocol: http/protobuf
endpoint: http://${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
insecure: true
logs:
level: info
extensions:
healthcheckv2:
use_v2: true
http:
endpoint: 0.0.0.0:13133
jaeger_query:
storage:
traces: memory_backend
metrics: metrics_backend
base_path: /jaeger/ui
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
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:JAEGER_HOST}:${env:JAEGER_GRPC_PORT}
processors:
batch:
exporters:
jaeger_storage_exporter:
trace_storage: memory_backend

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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 17d9fa0bb5acd5c7f6e4ff053d35a4bba83d971ccee521315964c59a0d83160
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.4.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.4.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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,283 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: null
tls:
insecure: true
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue:
batch: null
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
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
- 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

View File

@@ -0,0 +1,122 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: 84c67e88758a9d855cb1e31ff140d3c476c5388d66cfd1b6fecf481f17b49c52
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.142.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: 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
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.6
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,50 @@
---
# 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.9.0
helm.sh/chart: prometheus-28.2.0
app.kubernetes.io/part-of: prometheus
name: prometheus
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/proxy
- 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.9.0
helm.sh/chart: prometheus-28.2.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,361 @@
---
# 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.9.0
helm.sh/chart: prometheus-28.2.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: endpoints
relabel_configs:
- action: keep
regex: default;kubernetes;https
source_labels:
- __meta_kubernetes_namespace
- __meta_kubernetes_service_name
- __meta_kubernetes_endpoint_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_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- job_name: kubernetes-nodes-cadvisor
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- 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: endpoints
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: endpoints
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.9.0
helm.sh/chart: prometheus-28.2.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.9.0
helm.sh/chart: prometheus-28.2.0
app.kubernetes.io/part-of: prometheus
spec:
enableServiceLinks: true
serviceAccountName: prometheus
containers:
- name: prometheus-server
image: "quay.io/prometheus/prometheus:v3.9.0"
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.9.0
helm.sh/chart: prometheus-28.2.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.9.0
helm.sh/chart: prometheus-28.2.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.6
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.6
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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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,39 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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
[grafana_net]
url = https://grafana.net
[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,271 @@
---
# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: default
labels:
helm.sh/chart: grafana-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.1"
annotations:
checksum/config: 4bc37edad15da2620fa7b48cb4d0af4ca30f6d344ac238d6aa702abb2d92c6ba
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.2.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: 100m
memory: 100Mi
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.2.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: 100m
memory: 100Mi
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.2.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: 100m
memory: 100Mi
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:12.3.1"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
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_INSTALL_PLUGINS
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: 175Mi
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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.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-10.5.8
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: example
app.kubernetes.io/version: "12.3.1"
name: grafana
namespace: default

View File

@@ -0,0 +1,124 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/jaeger-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
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"
- name: SPAN_STORAGE_TYPE
value: memory
- name: COLLECTOR_ZIPKIN_HOST_PORT
value: :9411
- name: JAEGER_DISABLED
value: "false"
- name: COLLECTOR_OTLP_ENABLED
value: "true"
securityContext:
{}
image: jaegertracing/jaeger:2.14.1
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
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-sa.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: all-in-one
automountServiceAccountToken: true

View File

@@ -0,0 +1,67 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: jaeger
labels:
helm.sh/chart: jaeger-4.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
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
selector:
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/component: all-in-one

View File

@@ -0,0 +1,73 @@
---
# Source: opentelemetry-demo/charts/jaeger/templates/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.3.0
app.kubernetes.io/name: jaeger
app.kubernetes.io/instance: example
app.kubernetes.io/version: "2.14.1"
app.kubernetes.io/managed-by: Helm
data:
user-config.yaml: |
service:
extensions: [jaeger_storage, jaeger_query, healthcheckv2]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]
telemetry:
resource:
service.name: jaeger
metrics:
level: detailed
readers:
- periodic:
interval: 10000
timeout: 5000
exporter:
otlp:
protocol: http/protobuf
endpoint: http://${env:OTEL_COLLECTOR_HOST}:${env:OTEL_COLLECTOR_PORT_HTTP}
insecure: true
logs:
level: info
extensions:
healthcheckv2:
use_v2: true
http:
endpoint: 0.0.0.0:13133
jaeger_query:
storage:
traces: memory_backend
metrics: metrics_backend
base_path: /jaeger/ui
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
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:JAEGER_HOST}:${env:JAEGER_GRPC_PORT}
processors:
batch:
exporters:
jaeger_storage_exporter:
trace_storage: memory_backend

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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.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.4.0
app.kubernetes.io/name: opensearch
app.kubernetes.io/instance: example
app.kubernetes.io/version: "3.4.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/component: opensearch
annotations:
configchecksum: 17d9fa0bb5acd5c7f6e4ff053d35a4bba83d971ccee521315964c59a0d83160
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.4.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.4.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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,275 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: null
tls:
insecure: true
otlphttp/prometheus:
endpoint: http://prometheus:9090/api/v1/otlp
sending_queue:
batch: null
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
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
- 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

View File

@@ -0,0 +1,122 @@
---
# 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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: 1fdac890ba8aee9d05a37e748f9dcb8f5571ddf715332cc2ba32a7cfdbc9893f
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.142.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: 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
volumes:
- name: opentelemetry-collector-configmap
configMap:
name: otel-collector-agent
items:
- key: relay
path: relay.yaml
- name: hostfs
hostPath:
path: /
hostNetwork: 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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.142.2
app.kubernetes.io/name: opentelemetry-collector
app.kubernetes.io/instance: example
app.kubernetes.io/version: "0.142.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.6
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,50 @@
---
# 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.9.0
helm.sh/chart: prometheus-28.2.0
app.kubernetes.io/part-of: prometheus
name: prometheus
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/proxy
- 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.9.0
helm.sh/chart: prometheus-28.2.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,361 @@
---
# 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.9.0
helm.sh/chart: prometheus-28.2.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: endpoints
relabel_configs:
- action: keep
regex: default;kubernetes;https
source_labels:
- __meta_kubernetes_namespace
- __meta_kubernetes_service_name
- __meta_kubernetes_endpoint_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_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- job_name: kubernetes-nodes-cadvisor
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: node
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- replacement: kubernetes.default.svc:443
target_label: __address__
- regex: (.+)
replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
source_labels:
- __meta_kubernetes_node_name
target_label: __metrics_path__
scheme: https
tls_config:
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
- 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: endpoints
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: endpoints
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.9.0
helm.sh/chart: prometheus-28.2.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.9.0
helm.sh/chart: prometheus-28.2.0
app.kubernetes.io/part-of: prometheus
spec:
enableServiceLinks: true
serviceAccountName: prometheus
containers:
- name: prometheus-server
image: "quay.io/prometheus/prometheus:v3.9.0"
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.9.0
helm.sh/chart: prometheus-28.2.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.9.0
helm.sh/chart: prometheus-28.2.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.6
app.kubernetes.io/version: "2.2.0"
app.kubernetes.io/part-of: opentelemetry-demo
app.kubernetes.io/managed-by: Helm

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