From 1b2afee23a3ecebbbe7b2b1721d1a2a34a5fa250 Mon Sep 17 00:00:00 2001 From: Ben B Date: Mon, 21 Feb 2022 15:25:38 +0100 Subject: [PATCH] Add status fields for instrumentation kind (#717) * expose exporter endpoint, sampler type and argument of instrumentation Signed-off-by: Benedikt Bongartz * regenerate otel-instrumentations Signed-off-by: Benedikt Bongartz --- apis/v1alpha1/instrumentation_types.go | 3 +++ bundle/manifests/opentelemetry.io_instrumentations.yaml | 9 +++++++++ config/crd/bases/opentelemetry.io_instrumentations.yaml | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 1c066a229f..95a0a13e87 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -137,6 +137,9 @@ type InstrumentationStatus struct { // +kubebuilder:resource:shortName=otelinst;otelinsts // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.exporter.endpoint" +// +kubebuilder:printcolumn:name="Sampler",type="string",JSONPath=".spec.sampler.type" +// +kubebuilder:printcolumn:name="Sampler Arg",type="string",JSONPath=".spec.sampler.argument" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" // +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1}} diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 666e5f0dd2..d00551d3a7 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -23,6 +23,15 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index d333be829d..b31e5fedc1 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -22,6 +22,15 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string name: v1alpha1 schema: openAPIV3Schema: