From e486dcdfbb24c85eaaa212d081c64c66e9e4bbda Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Mon, 19 Oct 2026 16:57:25 +0200 Subject: [PATCH 1/6] Declare observed instances for the Kubernetes Custom Resources StackPack --- stackpacks/otel-k8s-crd/stackpack.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index e82813d..2d9059b 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -1,5 +1,5 @@ name: "otel-k8s-crd" -version: "0.0.9" +version: "0.0.10" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -15,3 +15,6 @@ configurationUrls: ERROR: !resource "error.md" provision: companionStackPacks: [] +observedInstances: + query: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"' + fields: ["tags.cluster-name"] From 51bbfe350166ec334d3aed11d6ba7945e41ae743 Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Tue, 20 Oct 2026 14:19:12 +0200 Subject: [PATCH 2/6] Use observed-instance parameters for the Kubernetes Custom Resources StackPack --- stackpacks/otel-k8s-crd/stackpack.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index 2d9059b..b37c2e8 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -17,4 +17,7 @@ provision: companionStackPacks: [] observedInstances: query: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"' - fields: ["tags.cluster-name"] + parameters: + - name: cluster_name + display: "Cluster" + source: tags.cluster-name From 1b886f662479e4430893e0262b87b5712a56a7f8 Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Thu, 22 Oct 2026 16:06:03 +0200 Subject: [PATCH 3/6] Declare ingestion scopes for otel-k8s-crd and open-telemetry Co-Authored-By: Claude Opus 5.5 (1M context) --- .../resources/ingestion-cluster-values.yaml | 4 ++++ .../resources/ingestion-global.md | 23 +++++++++++++++++++ stackpacks/open-telemetry/stackpack.yaml | 17 +++++++++++++- stackpacks/otel-k8s-crd/stackpack.yaml | 14 +++++------ 4 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 stackpacks/open-telemetry/resources/ingestion-cluster-values.yaml create mode 100644 stackpacks/open-telemetry/resources/ingestion-global.md diff --git a/stackpacks/open-telemetry/resources/ingestion-cluster-values.yaml b/stackpacks/open-telemetry/resources/ingestion-cluster-values.yaml new file mode 100644 index 0000000..ac2986f --- /dev/null +++ b/stackpacks/open-telemetry/resources/ingestion-cluster-values.yaml @@ -0,0 +1,4 @@ +otel: + enabled: true + telemetryGateway: + enabled: true diff --git a/stackpacks/open-telemetry/resources/ingestion-global.md b/stackpacks/open-telemetry/resources/ingestion-global.md new file mode 100644 index 0000000..e57d17f --- /dev/null +++ b/stackpacks/open-telemetry/resources/ingestion-global.md @@ -0,0 +1,23 @@ +## Send OTLP data directly + +From an environment outside Kubernetes, send OTLP over HTTP to `{{config.baseUrl}}/otel`, authenticating with the header `Authorization: StackState {{token}}`. + +OpenTelemetry Collector exporter: + +```yaml +exporters: + otlphttp/suse-observability: + endpoint: {{config.baseUrl}}/otel + headers: + Authorization: "StackState {{token}}" +``` + +Or configure an OpenTelemetry SDK directly: + +```bash +export OTEL_EXPORTER_OTLP_ENDPOINT="{{config.baseUrl}}/otel" +export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" +export OTEL_EXPORTER_OTLP_HEADERS="Authorization=StackState {{token}}" +``` + +See [the documentation](https://l.stackstate.com/open-telemetry-setup) for more options. diff --git a/stackpacks/open-telemetry/stackpack.yaml b/stackpacks/open-telemetry/stackpack.yaml index 43859e5..00f63ad 100644 --- a/stackpacks/open-telemetry/stackpack.yaml +++ b/stackpacks/open-telemetry/stackpack.yaml @@ -1,5 +1,5 @@ name: "open-telemetry" -version: "0.1.5" +version: "0.1.6" schemaVersion: "2.0" displayName: "Open Telemetry" categories: [ "Open Telemetry" ] @@ -18,3 +18,18 @@ configurationUrls: ERROR: !resource "configuration.md" provision: companionStackPacks: [] +ingestion: + global: + instructions: !resource "ingestion-global.md" + dataTypes: + topology: 'label = "stackpack:open-telemetry"' + metrics: 'otel_span_calls_total' + traces: {} + cluster: + display: "OpenTelemetry" + description: "Receive OTLP traces, metrics and logs from applications in the cluster through the telemetry gateway." + values: !resource "ingestion-cluster-values.yaml" + dataTypes: + topology: 'label = "stackpack:open-telemetry"' + metrics: 'otel_span_calls_total' + traces: {} diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index b37c2e8..3d81683 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -1,5 +1,5 @@ name: "otel-k8s-crd" -version: "0.0.10" +version: "0.0.11" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -15,9 +15,9 @@ configurationUrls: ERROR: !resource "error.md" provision: companionStackPacks: [] -observedInstances: - query: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"' - parameters: - - name: cluster_name - display: "Cluster" - source: tags.cluster-name +ingestion: + cluster: + display: "OpenTelemetry Kubernetes CRDs" + description: "Custom resource definitions collected by the agent's resource collector." + dataTypes: + topology: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"' From f9f055598ea492ffd5833cd1b5e5c75c7a43103e Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Tue, 27 Oct 2026 10:32:58 +0100 Subject: [PATCH 4/6] Add API group options to the otel-k8s-crd ingestion block Co-Authored-By: Claude Opus 5.5 (1M context) --- .../resources/ingestion-option-gateway-api.yaml | 6 ++++++ .../ingestion-option-helm-controller.yaml | 6 ++++++ .../resources/ingestion-option-kubevirt.yaml | 6 ++++++ .../resources/ingestion-option-kubewarden.yaml | 6 ++++++ stackpacks/otel-k8s-crd/stackpack.yaml | 16 +++++++++++++++- 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 stackpacks/otel-k8s-crd/resources/ingestion-option-gateway-api.yaml create mode 100644 stackpacks/otel-k8s-crd/resources/ingestion-option-helm-controller.yaml create mode 100644 stackpacks/otel-k8s-crd/resources/ingestion-option-kubevirt.yaml create mode 100644 stackpacks/otel-k8s-crd/resources/ingestion-option-kubewarden.yaml diff --git a/stackpacks/otel-k8s-crd/resources/ingestion-option-gateway-api.yaml b/stackpacks/otel-k8s-crd/resources/ingestion-option-gateway-api.yaml new file mode 100644 index 0000000..5d0ad7b --- /dev/null +++ b/stackpacks/otel-k8s-crd/resources/ingestion-option-gateway-api.yaml @@ -0,0 +1,6 @@ +otel: + k8sResourceCollector: + crDiscovery: + apiGroups: + include: + gateway.networking.k8s.io: true diff --git a/stackpacks/otel-k8s-crd/resources/ingestion-option-helm-controller.yaml b/stackpacks/otel-k8s-crd/resources/ingestion-option-helm-controller.yaml new file mode 100644 index 0000000..a16e810 --- /dev/null +++ b/stackpacks/otel-k8s-crd/resources/ingestion-option-helm-controller.yaml @@ -0,0 +1,6 @@ +otel: + k8sResourceCollector: + crDiscovery: + apiGroups: + include: + helm.cattle.io: true diff --git a/stackpacks/otel-k8s-crd/resources/ingestion-option-kubevirt.yaml b/stackpacks/otel-k8s-crd/resources/ingestion-option-kubevirt.yaml new file mode 100644 index 0000000..e0a33f4 --- /dev/null +++ b/stackpacks/otel-k8s-crd/resources/ingestion-option-kubevirt.yaml @@ -0,0 +1,6 @@ +otel: + k8sResourceCollector: + crDiscovery: + apiGroups: + include: + kubevirt.io: true diff --git a/stackpacks/otel-k8s-crd/resources/ingestion-option-kubewarden.yaml b/stackpacks/otel-k8s-crd/resources/ingestion-option-kubewarden.yaml new file mode 100644 index 0000000..7fb58ea --- /dev/null +++ b/stackpacks/otel-k8s-crd/resources/ingestion-option-kubewarden.yaml @@ -0,0 +1,6 @@ +otel: + k8sResourceCollector: + crDiscovery: + apiGroups: + include: + policies.kubewarden.io: true diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index 3d81683..1c6f59d 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -1,5 +1,5 @@ name: "otel-k8s-crd" -version: "0.0.11" +version: "0.0.12" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -19,5 +19,19 @@ ingestion: cluster: display: "OpenTelemetry Kubernetes CRDs" description: "Custom resource definitions collected by the agent's resource collector." + options: + - name: kubewarden + display: "Kubewarden policies" + default: true + values: !resource "ingestion-option-kubewarden.yaml" + - name: kubevirt + display: "KubeVirt virtual machines" + values: !resource "ingestion-option-kubevirt.yaml" + - name: gateway-api + display: "Gateway API" + values: !resource "ingestion-option-gateway-api.yaml" + - name: helm-controller + display: "Helm controller charts (helm.cattle.io)" + values: !resource "ingestion-option-helm-controller.yaml" dataTypes: topology: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"' From f0cc56e78e58f0e8043581e65bcfffb5b75c3dcb Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Tue, 27 Oct 2026 13:06:56 +0100 Subject: [PATCH 5/6] Enable the OTel collector from the otel-k8s-crd ingestion values Co-Authored-By: Claude Opus 5.5 (1M context) --- .../otel-k8s-crd/resources/ingestion-cluster-values.yaml | 2 ++ stackpacks/otel-k8s-crd/stackpack.yaml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 stackpacks/otel-k8s-crd/resources/ingestion-cluster-values.yaml diff --git a/stackpacks/otel-k8s-crd/resources/ingestion-cluster-values.yaml b/stackpacks/otel-k8s-crd/resources/ingestion-cluster-values.yaml new file mode 100644 index 0000000..73be1b2 --- /dev/null +++ b/stackpacks/otel-k8s-crd/resources/ingestion-cluster-values.yaml @@ -0,0 +1,2 @@ +otel: + enabled: true diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index 1c6f59d..cdd41c5 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -1,5 +1,5 @@ name: "otel-k8s-crd" -version: "0.0.12" +version: "0.0.13" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -19,6 +19,7 @@ ingestion: cluster: display: "OpenTelemetry Kubernetes CRDs" description: "Custom resource definitions collected by the agent's resource collector." + values: !resource "ingestion-cluster-values.yaml" options: - name: kubewarden display: "Kubewarden policies" From 08d2d9aab06ecb08244d80b8445324ac2a6e7f3b Mon Sep 17 00:00:00 2001 From: Bram Schuur Date: Thu, 29 Oct 2026 14:58:51 +0100 Subject: [PATCH 6/6] Remove ingestion data type declarations --- stackpacks/open-telemetry/stackpack.yaml | 10 +--------- stackpacks/otel-k8s-crd/stackpack.yaml | 4 +--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/stackpacks/open-telemetry/stackpack.yaml b/stackpacks/open-telemetry/stackpack.yaml index 00f63ad..6012d7a 100644 --- a/stackpacks/open-telemetry/stackpack.yaml +++ b/stackpacks/open-telemetry/stackpack.yaml @@ -1,5 +1,5 @@ name: "open-telemetry" -version: "0.1.6" +version: "0.1.7" schemaVersion: "2.0" displayName: "Open Telemetry" categories: [ "Open Telemetry" ] @@ -21,15 +21,7 @@ provision: ingestion: global: instructions: !resource "ingestion-global.md" - dataTypes: - topology: 'label = "stackpack:open-telemetry"' - metrics: 'otel_span_calls_total' - traces: {} cluster: display: "OpenTelemetry" description: "Receive OTLP traces, metrics and logs from applications in the cluster through the telemetry gateway." values: !resource "ingestion-cluster-values.yaml" - dataTypes: - topology: 'label = "stackpack:open-telemetry"' - metrics: 'otel_span_calls_total' - traces: {} diff --git a/stackpacks/otel-k8s-crd/stackpack.yaml b/stackpacks/otel-k8s-crd/stackpack.yaml index cdd41c5..ee29d30 100644 --- a/stackpacks/otel-k8s-crd/stackpack.yaml +++ b/stackpacks/otel-k8s-crd/stackpack.yaml @@ -1,5 +1,5 @@ name: "otel-k8s-crd" -version: "0.0.13" +version: "0.0.14" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -34,5 +34,3 @@ ingestion: - name: helm-controller display: "Helm controller charts (helm.cattle.io)" values: !resource "ingestion-option-helm-controller.yaml" - dataTypes: - topology: 'type = "custom resource definition" AND label = "stackpack:otel-k8s-crd"'