Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .chloggen/kind130.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .chloggen/set-gomemlimit.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions .chloggen/usage_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
component: collector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add usage metrics for the collector

# One or more tracking issues related to the change
issues: [2829]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
This change will add metrics to the OpenTelemetry operator about how the collector is used in the cluster,
it will add the following metrics to the opentelemetry-operator metrics endpoint
```
opentelemetry_collector_receivers{collector_name="collector_name", namespace="ns", type="otlp"} 1
opentelemetry_collector_exporters{collector_name="collector_name", namespace="ns", type="otlp"} 1
opentelemetry_collector_processors{collector_name="collector_name", namespace="ns", type="otlp"} 1
opentelemetry_collector_connectors{collector_name="collector_name", namespace="ns", type="myconnector"} 0
opentelemetry_collector_info{collector_name="simplest",namespace="default", type="deployment"} 1
```
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
path: bin
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
- name: Install chainsaw
uses: kyverno/action-install-chainsaw@v0.2.2
uses: kyverno/action-install-chainsaw@v0.2.3
- name: Install tools
run: make install-tools
- name: Prepare e2e tests
Expand Down
32 changes: 28 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

<!-- next version -->

## 0.101.0

### 💡 Enhancements 💡

- `operator`: Support for Kubernetes 1.30 version. (#2881)
- `collector`: Keep multiple previous versions of the Collector ConfigMap, configurable via the ConfigVersions field. (#2871)
This change introduces a new field in the Collector ConfigMap, `ConfigVersions`, which allows users to specify the number of previous versions of the Collector ConfigMap to keep. The default value is 1, which means that the current and one previous version of the Collector ConfigMap are kept. By keeping historical versions of the configuration, we ensure that during a config upgrade the previous configuration is still available for running (non-upgraded) pods as well as for rollbacks. If we overwrite the original ConfigMap with the new configuration, any pod which restarts for any reason will get the new configuration, which makes rollouts impossible to control.
- `collector, target allocator, opamp`: Introduces a new feature gate for `operator.golang.flags` to automatically add the environment variables for GOMAXPROCS and GOMEMLIMIT (#2919, #1456)
A new featuregate `operator.golang.flags` is added. This featuregate will allow the operator to automatically
set GOMAXPROCS and GOMEMLIMIT equal to the CPU and Memory limit provided respectively for the pod.


### Components

* [OpenTelemetry Collector - v0.101.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0)
* [OpenTelemetry Contrib - v0.101.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.101.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.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.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.100.1

### 💡 Enhancements 💡
Expand All @@ -18,7 +42,7 @@
* [OpenTelemetry Collector - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.100.0)
* [OpenTelemetry Contrib - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.100.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/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.0-alpha)
Expand Down Expand Up @@ -64,7 +88,7 @@
* [OpenTelemetry Collector - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.100.0)
* [OpenTelemetry Contrib - v0.100.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.100.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/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.51.0](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.51.0)
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
* [Go - v0.12.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.12.0-alpha)
Expand Down Expand Up @@ -153,7 +177,7 @@
* [OpenTelemetry Collector - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.98.0)
* [OpenTelemetry Contrib - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.98.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/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.49.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.49.1)
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
* [Go - v0.10.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.10.1-alpha)
Expand All @@ -171,7 +195,7 @@
* [OpenTelemetry Collector - v0.97.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.97.0)
* [OpenTelemetry Contrib - v0.97.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.97.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/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v1.2.0)
* [Node.JS - v0.49.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.49.1)
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
* [Go - v0.10.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.10.1-alpha)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,8 @@ spec:
serviceAccount: everything-prometheus-operator-needs
prometheusCR:
enabled: true
serviceMonitorSelector: {}
podMonitorSelector: {}
config:
receivers:
prometheus:
Expand Down Expand Up @@ -729,7 +731,8 @@ We use `cert-manager` for some features of this operator and the third column sh
The OpenTelemetry Operator _might_ work on versions outside of the given range, but when opening new issues, please make sure to test your scenario on a supported version.

| OpenTelemetry Operator | Kubernetes | Cert-Manager |
|------------------------| -------------- | ------------ |
|------------------------|----------------| ------------ |
| v0.101.0 | v1.23 to v1.30 | v1 |
| v0.100.0 | v1.23 to v1.29 | v1 |
| v0.99.0 | v1.23 to v1.29 | v1 |
| v0.98.0 | v1.23 to v1.29 | v1 |
Expand All @@ -752,7 +755,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
| v0.81.0 | v1.19 to v1.27 | v1 |
| v0.80.0 | v1.19 to v1.27 | v1 |
| v0.79.0 | v1.19 to v1.27 | v1 |
| v0.78.0 | v1.19 to v1.27 | v1 |

## Contributing and Developing

Expand Down
12 changes: 6 additions & 6 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.101.0 | @swiatekm-sumo |
| v0.102.0 | @frzifus |
| v0.103.0 | @jaronoff97 |
| v0.104.0 | @pavolloffay |
| v0.105.0 | @yuriolisa |
| v0.106.0 | @TylerHelmuth |
| v0.102.0 | @swiatekm-sumo |
| v0.103.0 | @frzifus |
| v0.104.0 | @jaronoff97 |
| v0.105.0 | @pavolloffay |
| v0.106.0 | @yuriolisa |
| v0.107.0 | @TylerHelmuth |
46 changes: 41 additions & 5 deletions apis/v1beta1/collector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type CollectorWebhook struct {
cfg config.Config
scheme *runtime.Scheme
reviewer *rbac.Reviewer
metrics *Metrics
}

func (c CollectorWebhook) Default(_ context.Context, obj runtime.Object) error {
Expand Down Expand Up @@ -166,23 +167,57 @@ func (c CollectorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object
if !ok {
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj)
}
return c.validate(ctx, otelcol)

warnings, err := c.validate(ctx, otelcol)
if err != nil {
return warnings, err
}
if c.metrics != nil {
c.metrics.create(ctx, otelcol)
}

return warnings, nil
}

func (c CollectorWebhook) ValidateUpdate(ctx context.Context, _, newObj runtime.Object) (admission.Warnings, error) {
func (c CollectorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) {
otelcol, ok := newObj.(*OpenTelemetryCollector)
if !ok {
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", newObj)
}
return c.validate(ctx, otelcol)

otelcolOld, ok := oldObj.(*OpenTelemetryCollector)
if !ok {
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", oldObj)
}

warnings, err := c.validate(ctx, otelcol)
if err != nil {
return warnings, err
}

if c.metrics != nil {
c.metrics.update(ctx, otelcolOld, otelcol)
}

return warnings, nil
}

func (c CollectorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) {
otelcol, ok := obj.(*OpenTelemetryCollector)
if !ok || otelcol == nil {
return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj)
}
return c.validate(ctx, otelcol)

warnings, err := c.validate(ctx, otelcol)
if err != nil {
return warnings, err
}

if c.metrics != nil {
c.metrics.delete(ctx, otelcol)
}

return warnings, nil
}

func (c CollectorWebhook) validate(ctx context.Context, r *OpenTelemetryCollector) (admission.Warnings, error) {
Expand Down Expand Up @@ -419,12 +454,13 @@ func checkAutoscalerSpec(autoscaler *AutoscalerSpec) error {
return nil
}

func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer) error {
func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer, metrics *Metrics) error {
cvw := &CollectorWebhook{
reviewer: reviewer,
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook", "version", "v1beta1"),
scheme: mgr.GetScheme(),
cfg: cfg,
metrics: metrics,
}
return ctrl.NewWebhookManagedBy(mgr).
For(&OpenTelemetryCollector{}).
Expand Down
Loading