Skip to content

Commit 19dc939

Browse files
authored
Merge branch 'main' into feat/autoinstrumentation-java-cli-flags
2 parents b39712d + 8b43fa0 commit 19dc939

File tree

142 files changed

+36504
-13230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+36504
-13230
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: breaking
3+
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: target allocator
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Drop compatibility with older target allocator versions
9+
10+
# One or more tracking issues related to the change
11+
issues: [1907]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
We've made a breaking change to the target allocator configuration in 0.93.0. This change removes operator
18+
compatibility with target allocator versions older than that. Users running more recent target allocator versions
19+
are unaffected.

.chloggen/v1beta1-webhook.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: new_component
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
5+
component: collector
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Enable reconciliation of Collector v1beta1 CRD.
9+
10+
# One or more tracking issues related to the change
11+
issues: [2620, 1907]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
Users are expected to migrate to `otelcol.v1beta1.opentelemetry.io`.
18+
The support for `otelcol.v1alpha1.opentelemetry.io` will be removed in the future.
19+
Follow [migration guide](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#upgrade-existing-objects-to-a-new-stored-version) for upgrading already created collector instances.
20+
After all `otelcol.v1alpha1.opentelemetry.io` are stored as `v1beta1` update the collector CRD to store only `v1beta1`
21+
`kubectl patch customresourcedefinitions opentelemetrycollectors.opentelemetry.io --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1beta1"]}}'`.
22+
**Only `AllNamespaces` install mode is now supported** due to the conversion webhook from `v1beta1` to `v1alpha1`.
23+
See [OLM docs](https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/) and
24+
[OLM operator groups docs](https://olm.operatorframework.io/docs/advanced-tasks/operator-scoping-with-operatorgroups/).
25+

.golangci.yaml

+13-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ linters-settings:
1010
template-path: header.txt
1111
goimports:
1212
local-prefixes: github.com/open-telemetry/opentelemetry-operator
13-
maligned:
14-
suggest-new: true
13+
gci:
14+
sections:
15+
- standard
16+
- default
17+
- prefix(github.com/open-telemetry/opentelemetry-operator)
1518
misspell:
1619
locale: US
1720
ignore-words:
@@ -22,9 +25,6 @@ linters-settings:
2225
- kilometre
2326
- kilometres
2427
govet:
25-
# report about shadowed variables
26-
check-shadowing: true
27-
2828
# settings per analyzer
2929
settings:
3030
printf: # analyzer name, run `go tool vet help` to see all analyzers
@@ -41,7 +41,7 @@ linters-settings:
4141
gofmt:
4242
simplify: true
4343
revive:
44-
min-confidence: 0.8
44+
confidence: 0.8
4545

4646
depguard:
4747
rules:
@@ -52,6 +52,12 @@ linters-settings:
5252
- pkg: github.com/pkg/errors
5353
desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"
5454

55+
issues:
56+
exclude-rules:
57+
- linters:
58+
- gci
59+
source: "// \\+kubebuilder"
60+
5561
linters:
5662
enable:
5763
- goheader
@@ -71,3 +77,4 @@ linters:
7177
- depguard
7278
- errcheck
7379
- errorlint
80+
- gci

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
<!-- next version -->
44

5+
## 0.98.0
6+
7+
### 💡 Enhancements 💡
8+
9+
- `operator`: Add support for adding/extending otc-collector container ports. (#2763)
10+
- `auto-instrumentation`: Support Java auto-instrumentation extensions. (#1785)
11+
12+
### 🧰 Bug fixes 🧰
13+
14+
- `target allocator`: Fix for keepequal/dropequal action (#2793)
15+
- `collector`: Create automatically the RBAC permissions to manage replicasets when using the k8sattributesprocessor (#2823)
16+
- `documentation`: The description for some fields was truncated in the documentation. (#2563)
17+
18+
### Components
19+
20+
* [OpenTelemetry Collector - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.98.0)
21+
* [OpenTelemetry Contrib - v0.98.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.98.0)
22+
* [Java auto-instrumentation - v1.32.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.1)
23+
* [.NET auto-instrumentation - v1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/{AUTO_INSTRUMENTATION_DOTNET_VERSION})
24+
* [Node.JS - v0.49.1](https://github.com/open-telemetry/opentelemetry-js/releases/tag/experimental%2Fv0.49.1)
25+
* [Python - v0.44b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.44b0)
26+
* [Go - v0.10.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.10.1-alpha)
27+
* [ApacheHTTPD - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
28+
* [Nginx - 1.0.4](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.4)
29+
530
## 0.97.1
631

732
### 🧰 Bug fixes 🧰

Makefile

+11-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
3939
endif
4040
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
4141

42-
CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true,maxDescLen=200"
42+
MANIFEST_DIR ?= config/crd/bases
43+
# kubectl apply does not work on large CRDs.
44+
CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true,maxDescLen=0"
4345

4446
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
4547
ifeq (,$(shell go env GOBIN))
@@ -171,7 +173,7 @@ release-artifacts: set-image-controller
171173
# Generate manifests e.g. CRD, RBAC etc.
172174
.PHONY: manifests
173175
manifests: controller-gen
174-
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
176+
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=${MANIFEST_DIR}
175177

176178
# Run tests
177179
# setup-envtest uses KUBEBUILDER_ASSETS which points to a directory with binaries (api-server, etcd and kubectl)
@@ -377,7 +379,7 @@ CHAINSAW ?= $(LOCALBIN)/chainsaw
377379

378380
KUSTOMIZE_VERSION ?= v5.0.3
379381
CONTROLLER_TOOLS_VERSION ?= v0.14.0
380-
GOLANGCI_LINT_VERSION ?= v1.54.0
382+
GOLANGCI_LINT_VERSION ?= v1.57.2
381383
KIND_VERSION ?= v0.20.0
382384
CHAINSAW_VERSION ?= v0.1.7
383385

@@ -475,8 +477,11 @@ bundle-push:
475477
api-docs: crdoc kustomize
476478
@{ \
477479
set -e ;\
480+
TMP_MANIFEST_DIR=$$(mktemp -d) ; \
481+
cp -r config/crd/* $$TMP_MANIFEST_DIR; \
482+
$(MAKE) CRD_OPTIONS=$(CRD_OPTIONS),maxDescLen=1200 MANIFEST_DIR=$$TMP_MANIFEST_DIR/bases manifests ;\
478483
TMP_DIR=$$(mktemp -d) ; \
479-
$(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\
484+
$(KUSTOMIZE) build $$TMP_MANIFEST_DIR -o $$TMP_DIR/crd-output.yaml ;\
480485
$(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\
481486
}
482487

@@ -516,8 +521,8 @@ chlog-insert-components:
516521
@echo "* [Go - ${AUTO_INSTRUMENTATION_GO_VERSION}](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/${AUTO_INSTRUMENTATION_GO_VERSION})" >>components.md
517522
@echo "* [ApacheHTTPD - ${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION})" >>components.md
518523
@echo "* [Nginx - ${AUTO_INSTRUMENTATION_NGINX_VERSION}](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv${AUTO_INSTRUMENTATION_NGINX_VERSION})" >>components.md
519-
@sed -i '' '/<!-- next version -->/rcomponents.md' CHANGELOG.md
520-
@sed -i '' '/<!-- next version -->/G' CHANGELOG.md
524+
@sed -i '/<!-- next version -->/r ./components.md' CHANGELOG.md
525+
@sed -i '/<!-- next version -->/G' CHANGELOG.md
521526
@rm components.md
522527

523528
.PHONY: opm

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ spec:
5656
pipelines:
5757
traces:
5858
receivers: [otlp]
59-
processors: []
59+
processors: [memory_limiter, batch]
6060
exporters: [debug]
6161
EOF
6262
```
@@ -733,7 +733,8 @@ We use `cert-manager` for some features of this operator and the third column sh
733733
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.
734734

735735
| OpenTelemetry Operator | Kubernetes | Cert-Manager |
736-
| ---------------------- | -------------- | ------------ |
736+
|------------------------| -------------- | ------------ |
737+
| v0.98.0 | v1.23 to v1.29 | v1 |
737738
| v0.97.0 | v1.23 to v1.29 | v1 |
738739
| v0.96.0 | v1.23 to v1.29 | v1 |
739740
| v0.95.0 | v1.23 to v1.29 | v1 |
@@ -756,7 +757,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
756757
| v0.78.0 | v1.19 to v1.27 | v1 |
757758
| v0.77.0 | v1.19 to v1.26 | v1 |
758759
| v0.76.1 | v1.19 to v1.26 | v1 |
759-
| v0.75.0 | v1.19 to v1.26 | v1 |
760760

761761
## Contributing and Developing
762762

@@ -769,7 +769,6 @@ Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-tel
769769
- [Benedikt Bongartz](https://github.com/frzifus), Red Hat
770770
- [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb
771771
- [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat
772-
- [Mikołaj Świątek](https://github.com/swiatekm-sumo), Sumo Logic
773772

774773
Emeritus Approvers:
775774

@@ -789,6 +788,7 @@ Target Allocator Maintainers ([@open-telemetry/operator-ta-maintainers](https://
789788
Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)):
790789

791790
- [Jacob Aronoff](https://github.com/jaronoff97), Lightstep
791+
- [Mikołaj Świątek](https://github.com/swiatekm-sumo), Sumo Logic
792792
- [Pavol Loffay](https://github.com/pavolloffay), Red Hat
793793
- [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale
794794

RELEASE.md

+20-19
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22

33
Steps to release a new version of the OpenTelemetry Operator:
44

5-
1. Set the version you're releasing as an environment variable for convenience: `export VERSION=0.n+1.0`
6-
2. Update `versions.txt`
7-
- Operator, target allocator and opamp-bridge should be `$VERSION`.
8-
- OpenTelemetry Collector should be the latest collector version. The `major.minor` should typically match, with the patch portion being possibly different.
9-
- The `autoinstrumentation-*` versions should match the latest supported versions in `autoinstrumentation/`.
10-
> [!WARNING]
11-
> DO NOT BUMP JAVA PAST `1.32.X` AND DO NOT BUMP .NET PAST `1.2.0`. Upgrades past these versions will introduce breaking HTTP semantic convention changes.
12-
3. Check if the compatible OpenShift versions are updated in the `hack/add-openshift-annotations.sh` script.
13-
4. Update the bundle by running `make bundle VERSION=$VERSION`.
14-
5. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry.
15-
6. Update release schedule table, by moving the current release manager to the end of the table with updated release version.
16-
7. Add the changes to the changelog by running `make chlog-update VERSION=$VERSION`.
17-
8. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade`
18-
9. Once the changes above are merged and available in `main`, a draft release will be automatically created. Publish it once the release workflows all complete.
19-
10. Update the operator version in the Helm Chart, as per the [release guide](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-operator/CONTRIBUTING.md)
20-
11. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged.
5+
1. Create a `Prepare relese x.y.z` pull request with the following content:
6+
1. Set the version you're releasing as an environment variable for convenience: `export VERSION=0.n+1.0`
7+
1. Update `versions.txt`
8+
- Operator, target allocator and opamp-bridge should be `$VERSION`.
9+
- OpenTelemetry Collector should be the latest collector version. The `major.minor` should typically match, with the patch portion being possibly different.
10+
- The `autoinstrumentation-*` versions should match the latest supported versions in `autoinstrumentation/`.
11+
> [!WARNING]
12+
> DO NOT BUMP JAVA PAST `1.32.X` AND DO NOT BUMP .NET PAST `1.2.0`. Upgrades past these versions will introduce breaking HTTP semantic convention changes.
13+
1. Check if the compatible OpenShift versions are updated in the `hack/add-openshift-annotations.sh` script.
14+
1. Update the bundle by running `make bundle VERSION=$VERSION`.
15+
1. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry.
16+
1. Update release schedule table, by moving the current release manager to the end of the table with updated release version.
17+
1. Add the changes to the changelog by running `make chlog-update VERSION=$VERSION`.
18+
1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade`
19+
1. Once the changes above are merged and available in `main`, a draft release will be automatically created. Publish it once the release workflows all complete.
20+
1. Update the operator version in the Helm Chart, as per the [release guide](https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-operator/CONTRIBUTING.md)
21+
1. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged.
2122
- `community-operators-prod` is used by OLM on OpenShift. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494)
2223
- `community-operators` is used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461)
2324

@@ -42,11 +43,11 @@ In order to have more people comfortable with the release process, and in order
4243
The operator should be released within a week after the [OpenTelemetry collector release](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule).
4344

4445
| Version | Release manager |
45-
| -------- | --------------- |
46-
| v0.98.0 | @yuriolisa |
47-
| v0.99.0 | @pavolloffay |
46+
|----------|-----------------|
47+
| v0.99.0 | @yuriolisa |
4848
| v0.100.0 | @VineethReddy02 |
4949
| v0.101.0 | @TylerHelmuth |
5050
| v0.102.0 | @swiatekm-sumo |
5151
| v0.103.0 | @frzifus |
5252
| v0.104.0 | @jaronoff97 |
53+
| v0.105.0 | @pavolloffay |

apis/v1alpha1/collector_webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ func warningsGroupedByResource(reviews []*v1.SubjectAccessReview) []string {
451451
func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer) error {
452452
cvw := &CollectorWebhook{
453453
reviewer: reviewer,
454-
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook"),
454+
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook", "version", "v1alpha1"),
455455
scheme: mgr.GetScheme(),
456456
cfg: cfg,
457457
}

0 commit comments

Comments
 (0)