Skip to content

Commit

Permalink
fix select document.
Browse files Browse the repository at this point in the history
  • Loading branch information
crossoverJie committed Apr 9, 2024
1 parent fff0c2a commit 0a7d640
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
1 change: 1 addition & 0 deletions apis/v1alpha1/instrumentation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions bundle/manifests/opentelemetry.io_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 18 additions & 0 deletions config/crd/bases/opentelemetry.io_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 14 additions & 8 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none<br/>
<td><b><a href="#instrumentationspecselector">selector</a></b></td>
<td>object</td>
<td>
<br/>
Selector is the label selector for affected Pods.
This selector only takes effect when annotation: instrumentation.opentelemetry.io/inject-xx equal true.<br/>
</td>
<td>false</td>
</tr></tbody>
Expand Down Expand Up @@ -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.

<table>
<thead>
Expand All @@ -3782,14 +3784,14 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par
<td><b><a href="#instrumentationspecselectormatchexpressionsindex">matchExpressions</a></b></td>
<td>[]object</td>
<td>
<br/>
matchExpressions is a list of label selector requirements. The requirements are ANDed.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>matchLabels</b></td>
<td>map[string]string</td>
<td>
<br/>
matchLabels is a map of {key,value} pairs.<br/>
</td>
<td>false</td>
</tr></tbody>
Expand All @@ -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.

<table>
<thead>
Expand All @@ -3816,21 +3819,24 @@ The value can be for instance parentbased_always_on, parentbased_always_off, par
<td><b>key</b></td>
<td>string</td>
<td>
<br/>
key is the label key that the selector applies to.<br/>
</td>
<td>true</td>
</tr><tr>
<td><b>operator</b></td>
<td>string</td>
<td>
<br/>
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.<br/>
</td>
<td>true</td>
</tr><tr>
<td><b>values</b></td>
<td>[]string</td>
<td>
<br/>
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.<br/>
</td>
<td>false</td>
</tr></tbody>
Expand Down

0 comments on commit 0a7d640

Please sign in to comment.