From 5b4c333b57fc988cf0dbb85358c4d41563b876bf Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 16 Oct 2024 12:12:07 +0200 Subject: [PATCH] Align insrumentation TLS config with collector Signed-off-by: Pavol Loffay --- .chloggen/inst-tls.yaml | 6 +++--- apis/v1alpha1/instrumentation_types.go | 6 +++--- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- .../manifests/opentelemetry.io_instrumentations.yaml | 6 +++--- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- .../manifests/opentelemetry.io_instrumentations.yaml | 6 +++--- config/crd/bases/opentelemetry.io_instrumentations.yaml | 6 +++--- docs/api.md | 6 +++--- .../00-install-instrumentation.yaml | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.chloggen/inst-tls.yaml b/.chloggen/inst-tls.yaml index 368bb318fe..7347b315ea 100755 --- a/.chloggen/inst-tls.yaml +++ b/.chloggen/inst-tls.yaml @@ -23,11 +23,11 @@ subtext: | secretName: otel-tls-certs configMapName: otel-ca-bundle # otel-ca-bundle - ca: ca.crt + ca_file: ca.crt # present in otel-tls-certs - cert: tls.crt + cert_file: tls.crt # present in otel-tls-certs - key: tls.key + key_file: tls.key ``` * Propagating secrets across namespaces can be done with https://github.com/EmberStack/kubernetes-reflector or https://github.com/zakkg3/ClusterSecret diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index c76ab49d8b..e158402223 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -121,13 +121,13 @@ type TLS struct { // CA defines the key of certificate (e.g. ca.crt) in the configmap map, secret or absolute path to a certificate. // The absolute path can be used when certificate is already present on the workload filesystem e.g. // /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt - CA string `json:"ca,omitempty"` + CA string `json:"ca_file,omitempty"` // Cert defines the key (e.g. tls.crt) of the client certificate in the secret or absolute path to a certificate. // The absolute path can be used when certificate is already present on the workload filesystem. - Cert string `json:"cert,omitempty"` + Cert string `json:"cert_file,omitempty"` // Key defines a key (e.g. tls.key) of the private key in the secret or absolute path to a certificate. // The absolute path can be used when certificate is already present on the workload filesystem. - Key string `json:"key,omitempty"` + Key string `json:"key_file,omitempty"` } // Sampler defines sampling configuration. diff --git a/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml index e5b5bafdfc..25cab56e55 100644 --- a/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -99,7 +99,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2024-10-10T15:31:51Z" + createdAt: "2024-10-16T10:10:50Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.29.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/community/manifests/opentelemetry.io_instrumentations.yaml b/bundle/community/manifests/opentelemetry.io_instrumentations.yaml index 4ff96eca41..7e59a81d68 100644 --- a/bundle/community/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/community/manifests/opentelemetry.io_instrumentations.yaml @@ -411,13 +411,13 @@ spec: type: string tls: properties: - ca: + ca_file: type: string - cert: + cert_file: type: string configMapName: type: string - key: + key_file: type: string secretName: type: string diff --git a/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml index bcab54329b..f248186c9a 100644 --- a/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -99,7 +99,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2024-10-10T15:31:51Z" + createdAt: "2024-10-16T10:10:50Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.29.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/openshift/manifests/opentelemetry.io_instrumentations.yaml b/bundle/openshift/manifests/opentelemetry.io_instrumentations.yaml index 4ff96eca41..7e59a81d68 100644 --- a/bundle/openshift/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/openshift/manifests/opentelemetry.io_instrumentations.yaml @@ -411,13 +411,13 @@ spec: type: string tls: properties: - ca: + ca_file: type: string - cert: + cert_file: type: string configMapName: type: string - key: + key_file: type: string secretName: type: string diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 3065e245a1..ac7f54d183 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -409,13 +409,13 @@ spec: type: string tls: properties: - ca: + ca_file: type: string - cert: + cert_file: type: string configMapName: type: string - key: + key_file: type: string secretName: type: string diff --git a/docs/api.md b/docs/api.md index 71b3b7071a..dc327344f8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1659,7 +1659,7 @@ TLS needs to be enabled by specifying https:// scheme in the Endpoint. - ca + ca_file string CA defines the key of certificate (e.g. ca.crt) in the configmap map, secret or absolute path to a certificate. @@ -1668,7 +1668,7 @@ The absolute path can be used when certificate is already present on the workloa false - cert + cert_file string Cert defines the key (e.g. tls.crt) of the client certificate in the secret or absolute path to a certificate. @@ -1684,7 +1684,7 @@ used from the secret defined in SecretName.
false - key + key_file string Key defines a key (e.g. tls.key) of the private key in the secret or absolute path to a certificate. diff --git a/tests/e2e-instrumentation/instrumentation-java-tls/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java-tls/00-install-instrumentation.yaml index 222a0584a8..7bc75d7107 100644 --- a/tests/e2e-instrumentation/instrumentation-java-tls/00-install-instrumentation.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-tls/00-install-instrumentation.yaml @@ -8,9 +8,9 @@ spec: tls: secretName: client-certs configMapName: ca - ca: ca.crt - cert: tls.crt - key: tls.key + ca_file: ca.crt + cert_file: tls.crt + key_file: tls.key propagators: - tracecontext - baggage