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..6012d7a 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.7" schemaVersion: "2.0" displayName: "Open Telemetry" categories: [ "Open Telemetry" ] @@ -18,3 +18,10 @@ configurationUrls: ERROR: !resource "configuration.md" provision: companionStackPacks: [] +ingestion: + global: + instructions: !resource "ingestion-global.md" + 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" 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/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 e82813d..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.9" +version: "0.0.14" schemaVersion: "2.0" displayName: "Kubernetes Custom Resources" categories: [ "Kubernetes" ] @@ -15,3 +15,22 @@ configurationUrls: ERROR: !resource "error.md" provision: companionStackPacks: [] +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" + 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"