You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/otel-operator/CONTRIBUTING.md
+18-4
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,22 @@
4
4
5
5
1. Increase the minor version of the chart by one and set the patch version to zero.
6
6
2. Update the chart's `appVersion` to match the new operator version.
7
-
3. In the values.yaml, update `manager.image.tag` to match the new operator release.
8
-
4.In the values.yaml, update`manager.collectorImage.tag` to match the version of the collector managed by default by the operator.
7
+
3. In the values.yaml, update `manager.collectorImage.tag` to match the version of the collector managed by default by the operator.
8
+
4.Run `make update-operator-crds` to update the CRDs in this chart to match the operator's.
9
9
5. Run `make generate-examples CHARTS=opentelemetry-operator`.
10
-
6. Run `make update-operator-crds` to update the CRDs in this chart to match the operator's.
11
-
7. Review the [Operator release notes](https://github.com/open-telemetry/opentelemetry-operator/releases). If any changes affect the helm chart, adjust the helm chart accordingly.
10
+
6. Review the [Operator release notes](https://github.com/open-telemetry/opentelemetry-operator/releases). If any changes affect the helm chart, adjust the helm chart accordingly.
11
+
12
+
### sed on Mac OS X
13
+
14
+
If you're performing the above steps on Mac OS X, you may need to install `gnu-sed` via Homebrew
15
+
as the pre-installed `sed` version has some incompatible differences:
16
+
17
+
```sh
18
+
brew install gnu-sed
19
+
```
20
+
21
+
Then, you can use it for make instead of the system's `sed`:
22
+
23
+
```sh
24
+
PATH="$(brew --prefix)/opt/gnu-sed/libexec/gnubin:$PATH" make ...
Copy file name to clipboardExpand all lines: charts/otel-operator/README.md
+75-38
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,11 @@
1
1
# OpenTelemetry Operator Helm Chart
2
2
3
-
The Helm chart installs [OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator) in Kubernetes cluster.
3
+
> [!WARNING]
4
+
> Version 0.58.0 of this Chart includes a new version of the `OpenTelemetryCollector` CRD. See [this document][v1beta1_migration] for upgrade instructions for the new Operator CRD. Please make sure you also follow the [helm upgrade instructions](./UPGRADING.md#0560-to-0570) for helm chart 0.57.0.
5
+
6
+
The Helm chart installs [OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator) in a Kubernetes cluster.
4
7
The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://www.openshift.com/learn/topics/operators).
8
+
The Operator's Docker image supports **only Linux** and cannot run on Windows nodes.
5
9
At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) as the only managed component.
6
10
7
11
## Prerequisites
@@ -14,14 +18,14 @@ At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetr
14
18
In Kubernetes, in order for the API server to communicate with the webhook component, the webhook requires a TLS
15
19
certificate that the API server is configured to trust. There are a few different ways you can use to generate/configure the required TLS certificate.
16
20
17
-
- The easiest and default method is to install the [cert-manager](https://cert-manager.io/docs/) and set `admissionWebhooks.certManager.create` to `true`.
21
+
- The easiest and default method is to install the [cert-manager](https://cert-manager.io/docs/) and set `admissionWebhooks.certManager.enabled` to `true`.
18
22
In this way, cert-manager will generate a self-signed certificate. _See [cert-manager installation](https://cert-manager.io/docs/installation/kubernetes/) for more details._
19
23
- You can provide your own Issuer by configuring the `admissionWebhooks.certManager.issuerRef` value. You will need
20
24
to specify the `kind` (Issuer or ClusterIssuer) and the `name`. Note that this method also requires the installation of cert-manager.
21
-
- You can use an automatically generated self-signed certificate by setting `admissionWebhooks.certManager.enabled` to `false` and `admissionWebhooks.autoGenerateCert` to `true`. Helm will create a self-signd cert and a secret for you.
22
-
- You can use your own generated self-signed certificate by setting both `admissionWebhooks.certManager.enabled` and `admissionWebhooks.autoGenerateCert` to `false`. You should provide the necessary values to `admissionWebhooks.cert_file`, `admissionWebhooks.key_file`, and `admissionWebhooks.ca_file`.
25
+
- You can use an automatically generated self-signed certificate by setting `admissionWebhooks.certManager.enabled` to `false` and `admissionWebhooks.autoGenerateCert.enabled` to `true`. Helm will create a self-signed cert and a secret for you.
26
+
- You can use your own generated self-signed certificate by setting both `admissionWebhooks.certManager.enabled` and `admissionWebhooks.autoGenerateCert.enabled` to `false`. You should provide the necessary values to `admissionWebhooks.certFile`, `admissionWebhooks.keyFile`, and `admissionWebhooks.caFile`.
23
27
- You can sideload custom webhooks and certificate by disabling `.Values.admissionWebhooks.create` and `admissionWebhooks.certManager.enabled` while setting your custom cert secret name in `admissionWebhooks.secretName`
24
-
- You can disable webhooks alltogether by disabling `.Values.admissionWebhooks.create` and setting env var to `ENABLE_WEBHOOKS: "false"`
28
+
- You can disable webhooks altogether by disabling `.Values.admissionWebhooks.create` and setting env var to `ENABLE_WEBHOOKS: "false"`
25
29
26
30
## Add Repository
27
31
@@ -34,16 +38,29 @@ _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation
34
38
35
39
## Install Chart
36
40
41
+
> [!NOTE]
42
+
> This Chart uses templated CRDs, and therefore does not support `--skip-crds`. Use `crds.create=false` instead if you do not want the chart to install the OpenTelemetry Operator's CRDs.
If you created a custom namespace, like in the TLS Certificate Requirement section above, you will need to specify the namespace with the `--namespace` helm option:
@@ -88,6 +108,20 @@ The following command will show all the configurable options with detailed comme
88
108
$ helm show values open-telemetry/opentelemetry-operator
89
109
```
90
110
111
+
When using this chart as a subchart, you may want to unset certain default values. Since Helm v3.13 values handling is improved and null can now consistently be used to remove values (e.g. to remove the default CPU limits).
112
+
113
+
### Role-based Access Control (RBAC) Configuration
114
+
115
+
The OpenTelemetry Collector requires specific RBAC permissions to function correctly, especially when using the `k8sattributesprocessor`. Depending on your deployment's scope, you may need to configure Cluster-scoped or Namespace-scoped RBAC permissions.
116
+
117
+
-**Cluster-scoped RBAC**: Necessary if the collector is to receive telemetry from across multiple namespaces. This setup requires `get`, `watch`, and `list` permissions on `pods`, `namespaces`, and `nodes`, plus `replicasets` if using deployment-related attributes.
118
+
119
+
-**Namespace-scoped RBAC**: Suitable for collecting telemetry within a specific namespace. This requires setting up a `Role` and `RoleBinding` to grant access to `pods` and `replicasets` within the target namespace. This setup limits the collector's access to resources within the specified namespace only.
120
+
121
+
**Important**: The `manager.createRbacPermissions` flag in the Helm chart values should be set to `false` if you are manually configuring RBAC permissions for the collector. Manual configuration allows for more granular control over the permissions granted to the OpenTelemetry Collector, ensuring it has exactly the access it needs based on your specific deployment requirements. Conversely, setting `manager.createRbacPermissions` to `true` will allow the operator to automatically configure RBAC for your collectors.
122
+
123
+
For detailed instructions and examples on configuring RBAC permissions, please refer to the [official documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/k8sattributesprocessor/README.md).
124
+
91
125
## Install OpenTelemetry Collector
92
126
93
127
_See [OpenTelemetry website](https://opentelemetry.io/docs/collector/) for more details about the Collector_
@@ -106,68 +140,69 @@ to an early version if anything unexpected happens, pause the Collector, etc. In
106
140
instance just as an application.
107
141
108
142
The following example configuration deploys the Collector as Deployment resource. The receiver is Jaeger receiver and
109
-
the exporter is logging exporter.
143
+
the exporter is [debug exporter](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter).
110
144
111
145
```console
112
146
$ kubectl apply -f - <<EOF
113
-
apiVersion: opentelemetry.io/v1alpha1
147
+
apiVersion: opentelemetry.io/v1beta1
114
148
kind: OpenTelemetryCollector
115
149
metadata:
116
150
name: my-collector
117
151
spec:
118
152
mode: deployment # This configuration is omittable.
119
-
config: |
153
+
config:
120
154
receivers:
121
155
jaeger:
122
156
protocols:
123
-
grpc:
124
-
processors:
157
+
grpc: {}
158
+
processors: {}
125
159
126
160
exporters:
127
-
logging:
161
+
debug: {}
128
162
129
163
service:
130
164
pipelines:
131
165
traces:
132
166
receivers: [jaeger]
133
167
processors: []
134
-
exporters: [logging]
168
+
exporters: [debug]
135
169
EOF
136
170
```
137
171
138
172
### DaemonSet Mode
139
173
140
-
DaemonSet should satisfy your needs if you want the Collector run as an agent in your Kubernetes nodes.
174
+
DaemonSet should satisfy your needs if you want the Collector to run as an agent on your Kubernetes nodes.
141
175
In this case, every Kubernetes node will have its own Collector copy which would monitor the pods in it.
142
176
143
177
The following example configuration deploys the Collector as DaemonSet resource. The receiver is Jaeger receiver and
144
-
the exporter is logging exporter.
178
+
the exporter is debug exporter.
145
179
146
180
```console
147
181
$ kubectl apply -f - <<EOF
148
-
apiVersion: opentelemetry.io/v1alpha1
182
+
apiVersion: opentelemetry.io/v1beta1
149
183
kind: OpenTelemetryCollector
150
184
metadata:
151
185
name: my-collector
152
186
spec:
153
187
mode: daemonset
154
-
config: |
188
+
hostNetwork: true
189
+
config:
155
190
receivers:
156
191
jaeger:
157
192
protocols:
158
-
grpc:
159
-
processors:
193
+
grpc: {}
194
+
processors: {}
160
195
161
196
exporters:
162
-
logging:
163
-
loglevel: debug
197
+
debug:
198
+
verbosity: detailed
164
199
165
200
service:
166
201
pipelines:
167
202
traces:
168
203
receivers: [jaeger]
169
204
processors: []
170
-
exporters: [logging]
205
+
exporters: [debug]
171
206
EOF
172
207
```
173
208
@@ -181,33 +216,33 @@ There are basically three main advantages to deploy the Collector as the Statefu
181
216
to attach the same sticky identity (e.g., volumes) to the new pod.
182
217
183
218
The following example configuration deploys the Collector as StatefulSet resource with three replicas. The receiver
184
-
is Jaeger receiver and the exporter is logging exporter.
219
+
is Jaeger receiver and the exporter is debug exporter.
185
220
186
221
```console
187
222
$ kubectl apply -f - <<EOF
188
-
apiVersion: opentelemetry.io/v1alpha1
223
+
apiVersion: opentelemetry.io/v1beta1
189
224
kind: OpenTelemetryCollector
190
225
metadata:
191
226
name: my-collector
192
227
spec:
193
228
mode: statefulset
194
229
replicas: 3
195
-
config: |
230
+
config:
196
231
receivers:
197
232
jaeger:
198
233
protocols:
199
-
grpc:
200
-
processors:
234
+
grpc: {}
235
+
processors: {}
201
236
202
237
exporters:
203
-
logging:
238
+
debug: {}
204
239
205
240
service:
206
241
pipelines:
207
242
traces:
208
243
receivers: [jaeger]
209
244
processors: []
210
-
exporters: [logging]
245
+
exporters: [debug]
211
246
EOF
212
247
```
213
248
@@ -223,28 +258,28 @@ _See the [OpenTelemetry Operator github repository](https://github.com/open-tele
0 commit comments