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: .chloggen/fix-metrics-service-address-env-var.yaml
+5-6
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,17 @@
2
2
change_type: bug_fix
3
3
4
4
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5
-
component: auto-instrumentation
5
+
component: operator
6
6
7
7
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8
-
note: Reverts PR 3379 which inadvertently broke users setting JAVA_TOOL_OPTIONS
8
+
note: Fix the admission webhook to when metrics service address host uses env var expansion
9
9
10
10
# One or more tracking issues related to the change
11
-
issues: [3463]
11
+
issues: [3513]
12
12
13
13
# (Optional) One or more lines of additional information to render under the primary note.
14
14
# These lines will be padded with 2 spaces and then inserted directly into the document.
15
15
# Use pipe (|) for multiline entries.
16
16
subtext: |
17
-
Reverts a previous PR which was causing JAVA_TOOL_OPTIONS to not be overriden when
18
-
set by users. This was resulting in application crashloopbackoffs for users relying
19
-
on java autoinstrumentation.
17
+
This should allow the metrics service address to have the host portion expanded from an environment variable,
18
+
like `$(env:POD_IP)` instead of using `0.0.0.0`, which is the [recommended by the Collector](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks).
Copy file name to clipboardexpand all lines: README.md
+48-8
Original file line number
Diff line number
Diff line change
@@ -72,12 +72,16 @@ This will create an OpenTelemetry Collector instance named `simplest`, exposing
72
72
73
73
The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) documentation for a reference of the possible entries.
74
74
75
-
> 🚨 **NOTE:** At this point, the Operator does _not_ validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash.
75
+
> 🚨 **NOTE:** At this point, the Operator does _not_ validate the whole contents of the configuration file: if the configuration is invalid, the instance might still be created but the underlying OpenTelemetry Collector might crash.
76
76
77
77
> 🚨 **Note:** For private GKE clusters, you will need to either add a firewall rule that allows master nodes access to port `9443/tcp` on worker nodes, or change the existing rule that allows access to port `80/tcp`, `443/tcp` and `10254/tcp` to also allow access to port `9443/tcp`. More information can be found in the [Official GCP Documentation](https://cloud.google.com/load-balancing/docs/tcp/setting-up-tcp#config-hc-firewall). See the [GKE documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules) on adding rules and the [Kubernetes issue](https://github.com/kubernetes/kubernetes/issues/79739) for more detail.
78
78
79
-
The Operator does examine the configuration file to discover configured receivers and their ports. If it finds receivers with ports, it creates a pair of kubernetes services, one headless, exposing those ports within the cluster. The headless service contains a `service.beta.openshift.io/serving-cert-secret-name` annotation that will cause OpenShift to create a secret containing a certificate and key. This secret can be mounted as a volume and the certificate and key used in those receivers' TLS configurations.
79
+
The Operator does examine the configuration file for a few purposes:
80
80
81
+
- To discover configured receivers and their ports. If it finds receivers with ports, it creates a pair of kubernetes services, one headless, exposing those ports within the cluster. If the port is using environment variable expansion or cannot be parsed, an error will be returned. The headless service contains a `service.beta.openshift.io/serving-cert-secret-name` annotation that will cause OpenShift to create a secret containing a certificate and key. This secret can be mounted as a volume and the certificate and key used in those receivers' TLS configurations.
82
+
83
+
- To check if Collector observability is enabled (controlled by `spec.observability.metrics.enableMetrics`). In this case, a Service and ServiceMonitor/PodMonitor are created for the Collector instance. As a consequence, if the metrics service address contains an invalid port or uses environment variable expansion for the port, an error will be returned. A workaround for the environment variable case is to set `enableMetrics` to `false` and manually create the previously mentioned objects with the correct port if you need them.
84
+
81
85
### Upgrades
82
86
83
87
As noted above, the OpenTelemetry Collector format is continuing to evolve. However, a best-effort attempt is made to upgrade all managed `OpenTelemetryCollector` resources.
image: your-customized-auto-instrumentation-image:nginx # if custom instrumentation image is needed
561
567
configFile: /my/custom-dir/custom-nginx.conf
@@ -725,14 +731,16 @@ EOF
725
731
726
732
### Configure resource attributes with annotations
727
733
728
-
This example shows a pod configuration with OpenTelemetry annotations using the `resource.opentelemetry.io/` prefix. These annotations can be used to add resource attributes to data produced by OpenTelemetry instrumentation.
734
+
This example shows a pod configuration with OpenTelemetry annotations using the `resource.opentelemetry.io/` prefix.
735
+
These annotations can be used to add resource attributes to data produced by OpenTelemetry instrumentation.
729
736
730
737
```yaml
731
738
apiVersion: v1
732
739
kind: Pod
733
740
metadata:
734
741
name: example-pod
735
742
annotations:
743
+
# this is just an example, you can create any resource attributes you need
0 commit comments