Skip to content

Commit

Permalink
Prepare release 0.104.0 (#3119)
Browse files Browse the repository at this point in the history
* Prepare release 0.104.0

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* adapt to breaking changes

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* update changelog

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* otlpreceiver: bind to 0.0.0.0 by default

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

fix: config structure

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* rename

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* disable unifyEnvVarExpansion if prometheus rec is configured

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* disable component.UseLocalHostAsDefaultHost by default

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
  • Loading branch information
frzifus committed Jul 18, 2024
1 parent 477e7bf commit a9251b3
Show file tree
Hide file tree
Showing 59 changed files with 328 additions and 203 deletions.
16 changes: 0 additions & 16 deletions .chloggen/another-parser.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/feat_drop-lease-on-exit.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .chloggen/fix-otelcol-crd.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/fix-parsing-bug.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/fix_invalid_port.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/implement-dnsconfig.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .chloggen/main.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/make-otelcol-mode-immutable.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/migrate-to-use.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .chloggen/opamp-bridge-v1beta1-support.yaml

This file was deleted.

44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,50 @@

<!-- next version -->

## 0.104.0

### 🛑 Breaking changes 🛑

- `opamp`: Adds support for v1beta1 OpenTelemetry Collector API in the OpAMP Bridge (#2985)
This change adds support for the OpAMP Bridge to manage and apply OpenTelemetry Collectors using the v1beta1 API in
the OpAMP Bridge. This change removes support for applying OpenTelemetry Collectors using the v1alpha1 API version.
The v1beta1 API is the latest version of the OpenTelemetry Collector API and is the recommended version for new
deployments.

### 💡 Enhancements 💡

- `collector`: Since collector version `0.104.0` the collector listens on `localhost` instead of `0.0.0.0` by default ([collector#8510](https://github.com/open-telemetry/opentelemetry-collector/issues/8510)). To avoid breaking changes the `component.UseLocalHostAsDefaultHost` feature-gate is disabled by the Operator. (#3119)
- `collector`: Changes the default parser to silently fail. (#3133)
- `collector, target allocator`: If the target allocator is enabled, the collector featuregate `confmap.unifyEnvVarExpansion' is disabled. (#3119)
- `operator`: Release leader election lease on exit (#3058)
- `collector, target allocator, opamp`: Enabling PodDnsConfig for OpenTelemetry Collector, TargetAllocator and OpAMPBridge. (#2658)
- `collector`: Make the `spec.mode` field of the `OpenTelemetryCollector` Custom Resource (CR) immutable (#3055)
- `collector`: Improves the performance of port and configuration parsing in the operator (#2603)

### 🧰 Bug fixes 🧰

- `collector`: Fixes a bug where an exporter would cause a port collision (#3124)
- `collector`: Fix deletion issue of `otelcol` CR by making `spec.config.service.pipelines.processors` optional (#3075)
This change makes `spec.config.service.pipelines.processors` in `OpenTelemetryCollector` CRD optional, aligning with OTel Collector best practices. It resolves deletion issues by providing flexibility in CRD configuration, addressing conflicts between strict validation and practical uses.
Note: Updating the `opentelemetrycollectors.opentelemetry.io` CRD resource is required.

- `collector`: Allow annotations on service account to prevent infinite reconciliation on OpenShift and creating infinite pull secrets. (#3106)
On OpenShift 4.16 the platform automatically adds an annotation `openshift.io/internal-registry-pull-secret-ref: <simplest-collector-dockercfg-jwq66>`
to the service account which contains secret name with image pull secret.


### Components

* [OpenTelemetry Collector - v0.104.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.104.0)
* [OpenTelemetry Contrib - v0.104.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.104.0)
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.52.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.52.1)
* [Python - v0.46b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.46b0)
* [Go - v0.13.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.13.0-alpha)
* [ApacheHTTPD - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
* [Nginx - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)

## 0.103.0

### 💡 Enhancements 💡
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ spec:
receivers:
otlp:
protocols:
grpc: {}
http: {}
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand Down Expand Up @@ -737,6 +739,7 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,

| OpenTelemetry Operator | Kubernetes | Cert-Manager | Prometheus-Operator |
|------------------------|----------------| ------------ |---------------------|
| v0.104.0 | v1.23 to v1.30 | v1 | v0.74.0 |
| v0.103.0 | v1.23 to v1.30 | v1 | v0.74.0 |
| v0.102.0 | v1.23 to v1.30 | v1 | v0.71.2 |
| v0.101.0 | v1.23 to v1.30 | v1 | v0.71.2 |
Expand All @@ -759,7 +762,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
| v0.84.0 | v1.19 to v1.28 | v1 | v0.67.1 |
| v0.83.0 | v1.19 to v1.27 | v1 | v0.67.1 |
| v0.82.0 | v1.19 to v1.27 | v1 | v0.67.1 |
| v0.81.0 | v1.19 to v1.27 | v1 | v0.66.0 |

## Contributing and Developing

Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ The operator should be released within a week after the [OpenTelemetry collector

| Version | Release manager |
|----------|-----------------|
| v0.104.0 | @frzifus |
| v0.105.0 | @pavolloffay |
| v0.106.0 | @yuriolisa |
| v0.107.0 | @TylerHelmuth |
| v0.108.0 | @jaronoff97 |
| v0.109.0 | @swiatekm |
| v0.109.0 | @swiatekm |
| v0.110.0 | @frzifus |
54 changes: 54 additions & 0 deletions apis/v1beta1/collector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (c CollectorWebhook) Default(_ context.Context, obj runtime.Object) error {
otelcol.Spec.TargetAllocator.Replicas = &one
}

TAUnifyEnvVarExpansion(otelcol)
ComponentUseLocalHostAsDefaultHost(otelcol)

if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.MaxReplicas != nil {
if otelcol.Spec.Autoscaler.MinReplicas == nil {
otelcol.Spec.Autoscaler.MinReplicas = otelcol.Spec.Replicas
Expand Down Expand Up @@ -449,3 +452,54 @@ func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.R
WithDefaulter(cvw).
Complete()
}

// TAUnifyEnvVarExpansion disables confmap.unifyEnvVarExpansion featuregate on
// collector instances if a prometheus receiver is configured.
// NOTE: We need this for now until 0.105.0 is out with this fix:
// https://github.com/open-telemetry/opentelemetry-collector/commit/637b1f42fcb7cbb7ef8a50dcf41d0a089623a8b7
func TAUnifyEnvVarExpansion(otelcol *OpenTelemetryCollector) {
var enable bool
for receiver := range otelcol.Spec.Config.Receivers.Object {
if strings.Contains(receiver, "prometheus") {
enable = true
break
}
}
if !enable {
return
}

const (
baseFlag = "feature-gates"
fgFlag = "confmap.unifyEnvVarExpansion"
)
if otelcol.Spec.Args == nil {
otelcol.Spec.Args = make(map[string]string)
}
args, ok := otelcol.Spec.Args[baseFlag]
if !ok || len(args) == 0 {
otelcol.Spec.Args[baseFlag] = "-" + fgFlag
} else if !strings.Contains(otelcol.Spec.Args[baseFlag], fgFlag) {
otelcol.Spec.Args[baseFlag] += ",-" + fgFlag
}
}

// ComponentUseLocalHostAsDefaultHost enables component.UseLocalHostAsDefaultHost
// featuregate on the given collector instance.
// NOTE: For more details, visit:
// https://github.com/open-telemetry/opentelemetry-collector/issues/8510
func ComponentUseLocalHostAsDefaultHost(otelcol *OpenTelemetryCollector) {
const (
baseFlag = "feature-gates"
fgFlag = "component.UseLocalHostAsDefaultHost"
)
if otelcol.Spec.Args == nil {
otelcol.Spec.Args = make(map[string]string)
}
args, ok := otelcol.Spec.Args[baseFlag]
if !ok || len(args) == 0 {
otelcol.Spec.Args[baseFlag] = "-" + fgFlag
} else if !strings.Contains(otelcol.Spec.Args[baseFlag], fgFlag) {
otelcol.Spec.Args[baseFlag] += ",-" + fgFlag
}
}
Loading

0 comments on commit a9251b3

Please sign in to comment.