diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 3cd9c94567..eb7f616387 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -23,6 +23,7 @@ import ( // InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. type InstrumentationSpec struct { // Selector is the label selector for affected Pods. + // This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true. // Unlike standard label selectors, `nil` means `everything`, and this is also the default. // This may change in a future CRD version. // +optional diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index bb0aa1052f..12f825af89 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -1677,15 +1677,32 @@ spec: type: string type: object selector: + description: |- + Selector is the label selector for affected Pods. + This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true. properties: matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: + description: key is the label key that the selector applies + to. type: string operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. items: type: string type: array @@ -1697,6 +1714,7 @@ spec: matchLabels: additionalProperties: type: string + description: matchLabels is a map of {key,value} pairs. type: object type: object x-kubernetes-map-type: atomic diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 068e26f995..3518f67d5f 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -1675,15 +1675,32 @@ spec: type: string type: object selector: + description: |- + Selector is the label selector for affected Pods. + This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true. properties: matchExpressions: + description: matchExpressions is a list of label selector requirements. + The requirements are ANDed. items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: + description: key is the label key that the selector applies + to. type: string operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. items: type: string type: array @@ -1695,6 +1712,7 @@ spec: matchLabels: additionalProperties: type: string + description: matchLabels is a map of {key,value} pairs. type: object type: object x-kubernetes-map-type: atomic diff --git a/docs/api.md b/docs/api.md index bf3700cc2c..ddfcbac5c0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -177,7 +177,8 @@ Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none
selector object -
+ Selector is the label selector for affected Pods. +This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true.
false @@ -3767,7 +3768,8 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par - +Selector is the label selector for affected Pods. +This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true. @@ -3782,14 +3784,14 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par @@ -3801,7 +3803,8 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par - +A label selector requirement is a selector that contains values, a key, and an operator that +relates the key and values.
matchExpressions []object -
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
false
matchLabels map[string]string -
+ matchLabels is a map of {key,value} pairs.
false
@@ -3816,21 +3819,24 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par
key string -
+ key is the label key that the selector applies to.
true
operator string -
+ operator represents a key's relationship to a set of values. +Valid operators are In, NotIn, Exists and DoesNotExist.
true
values []string -
+ values is an array of string values. If the operator is In or NotIn, +the values array must be non-empty. If the operator is Exists or DoesNotExist, +the values array must be empty.
false