Skip to content

Commit

Permalink
Merge pull request open-telemetry#37 from IshwarKanse/rebase-bot-main
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-merge-bot[bot] authored Apr 17, 2024
2 parents 1215b43 + 7f58096 commit be6d2bf
Show file tree
Hide file tree
Showing 158 changed files with 36,843 additions and 13,438 deletions.
16 changes: 16 additions & 0 deletions .chloggen/2603-part-one.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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: Changes metric port logic to use intermediary struct.

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

# (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:
16 changes: 16 additions & 0 deletions .chloggen/autoinstrumentation-java-cli-flag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# 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: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: change java instrumentation feature gate operator.autoinstrumentation.java into command line flag --enable-java-instrumentation

# One or more tracking issues related to the change
issues: [2673, 2582]

# (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:
16 changes: 16 additions & 0 deletions .chloggen/chore_remove-ta-rewrite-flag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# 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: target allocator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove `operator.collector.rewritetargetallocator` feature flag

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

# (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:
19 changes: 19 additions & 0 deletions .chloggen/fix_drop-ta-config-backwards-compat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# 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: target allocator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Drop compatibility with older target allocator versions

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

# (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: |
We've made a breaking change to the target allocator configuration in 0.93.0. This change removes operator
compatibility with target allocator versions older than that. Users running more recent target allocator versions
are unaffected.
25 changes: 25 additions & 0 deletions .chloggen/v1beta1-webhook.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: new_component

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

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Enable reconciliation of Collector v1beta1 CRD.

# One or more tracking issues related to the change
issues: [2620, 1907]

# (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: |
Users are expected to migrate to `otelcol.v1beta1.opentelemetry.io`.
The support for `otelcol.v1alpha1.opentelemetry.io` will be removed in the future.
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.
After all `otelcol.v1alpha1.opentelemetry.io` are stored as `v1beta1` update the collector CRD to store only `v1beta1`
`kubectl patch customresourcedefinitions opentelemetrycollectors.opentelemetry.io --subresource='status' --type='merge' -p '{"status":{"storedVersions":["v1beta1"]}}'`.
**Only `AllNamespaces` install mode is now supported** due to the conversion webhook from `v1beta1` to `v1alpha1`.
See [OLM docs](https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/) and
[OLM operator groups docs](https://olm.operatorframework.io/docs/advanced-tasks/operator-scoping-with-operatorgroups/).
19 changes: 13 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ linters-settings:
template-path: header.txt
goimports:
local-prefixes: github.com/open-telemetry/opentelemetry-operator
maligned:
suggest-new: true
gci:
sections:
- standard
- default
- prefix(github.com/open-telemetry/opentelemetry-operator)
misspell:
locale: US
ignore-words:
Expand All @@ -22,9 +25,6 @@ linters-settings:
- kilometre
- kilometres
govet:
# report about shadowed variables
check-shadowing: true

# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
Expand All @@ -41,7 +41,7 @@ linters-settings:
gofmt:
simplify: true
revive:
min-confidence: 0.8
confidence: 0.8

depguard:
rules:
Expand All @@ -52,6 +52,12 @@ linters-settings:
- pkg: github.com/pkg/errors
desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"

issues:
exclude-rules:
- linters:
- gci
source: "// \\+kubebuilder"

linters:
enable:
- goheader
Expand All @@ -71,3 +77,4 @@ linters:
- depguard
- errcheck
- errorlint
- gci
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

<!-- next version -->

## 0.98.0

### 💡 Enhancements 💡

- `operator`: Add support for adding/extending otc-collector container ports. (#2763)
- `auto-instrumentation`: Support Java auto-instrumentation extensions. (#1785)

### 🧰 Bug fixes 🧰

- `target allocator`: Fix for keepequal/dropequal action (#2793)
- `collector`: Create automatically the RBAC permissions to manage replicasets when using the k8sattributesprocessor (#2823)
- `documentation`: The description for some fields was truncated in the documentation. (#2563)

### Components

* [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})
* [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)
* [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.97.1

### 🧰 Bug fixes 🧰
Expand Down
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
endif
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)

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

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

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

KUSTOMIZE_VERSION ?= v5.0.3
CONTROLLER_TOOLS_VERSION ?= v0.14.0
GOLANGCI_LINT_VERSION ?= v1.54.0
GOLANGCI_LINT_VERSION ?= v1.57.2
KIND_VERSION ?= v0.20.0
CHAINSAW_VERSION ?= v0.1.7

Expand Down Expand Up @@ -475,8 +477,11 @@ bundle-push:
api-docs: crdoc kustomize
@{ \
set -e ;\
TMP_MANIFEST_DIR=$$(mktemp -d) ; \
cp -r config/crd/* $$TMP_MANIFEST_DIR; \
$(MAKE) CRD_OPTIONS=$(CRD_OPTIONS),maxDescLen=1200 MANIFEST_DIR=$$TMP_MANIFEST_DIR/bases manifests ;\
TMP_DIR=$$(mktemp -d) ; \
$(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\
$(KUSTOMIZE) build $$TMP_MANIFEST_DIR -o $$TMP_DIR/crd-output.yaml ;\
$(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\
}

Expand Down Expand Up @@ -516,8 +521,8 @@ chlog-insert-components:
@echo "* [Go - ${AUTO_INSTRUMENTATION_GO_VERSION}](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/${AUTO_INSTRUMENTATION_GO_VERSION})" >>components.md
@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
@echo "* [Nginx - ${AUTO_INSTRUMENTATION_NGINX_VERSION}](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv${AUTO_INSTRUMENTATION_NGINX_VERSION})" >>components.md
@sed -i '' '/<!-- next version -->/rcomponents.md' CHANGELOG.md
@sed -i '' '/<!-- next version -->/G' CHANGELOG.md
@sed -i '/<!-- next version -->/r ./components.md' CHANGELOG.md
@sed -i '/<!-- next version -->/G' CHANGELOG.md
@rm components.md

.PHONY: opm
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
pipelines:
traces:
receivers: [otlp]
processors: []
processors: [memory_limiter, batch]
exporters: [debug]
EOF
```
Expand Down Expand Up @@ -733,7 +733,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.98.0 | v1.23 to v1.29 | v1 |
| v0.97.0 | v1.23 to v1.29 | v1 |
| v0.96.0 | v1.23 to v1.29 | v1 |
| v0.95.0 | v1.23 to v1.29 | v1 |
Expand All @@ -756,7 +757,6 @@ The OpenTelemetry Operator _might_ work on versions outside of the given range,
| v0.78.0 | v1.19 to v1.27 | v1 |
| v0.77.0 | v1.19 to v1.26 | v1 |
| v0.76.1 | v1.19 to v1.26 | v1 |
| v0.75.0 | v1.19 to v1.26 | v1 |

## Contributing and Developing

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

Emeritus Approvers:

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

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

Expand Down
39 changes: 20 additions & 19 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@

Steps to release a new version of the OpenTelemetry Operator:

1. Set the version you're releasing as an environment variable for convenience: `export VERSION=0.n+1.0`
2. Update `versions.txt`
- Operator, target allocator and opamp-bridge should be `$VERSION`.
- OpenTelemetry Collector should be the latest collector version. The `major.minor` should typically match, with the patch portion being possibly different.
- The `autoinstrumentation-*` versions should match the latest supported versions in `autoinstrumentation/`.
> [!WARNING]
> 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.
3. Check if the compatible OpenShift versions are updated in the `hack/add-openshift-annotations.sh` script.
4. Update the bundle by running `make bundle VERSION=$VERSION`.
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.
6. Update release schedule table, by moving the current release manager to the end of the table with updated release version.
7. Add the changes to the changelog by running `make chlog-update VERSION=$VERSION`.
8. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade`
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.
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)
11. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged.
1. Create a `Prepare relese x.y.z` pull request with the following content:
1. Set the version you're releasing as an environment variable for convenience: `export VERSION=0.n+1.0`
1. Update `versions.txt`
- Operator, target allocator and opamp-bridge should be `$VERSION`.
- OpenTelemetry Collector should be the latest collector version. The `major.minor` should typically match, with the patch portion being possibly different.
- The `autoinstrumentation-*` versions should match the latest supported versions in `autoinstrumentation/`.
> [!WARNING]
> 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.
1. Check if the compatible OpenShift versions are updated in the `hack/add-openshift-annotations.sh` script.
1. Update the bundle by running `make bundle VERSION=$VERSION`.
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.
1. Update release schedule table, by moving the current release manager to the end of the table with updated release version.
1. Add the changes to the changelog by running `make chlog-update VERSION=$VERSION`.
1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade`
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.
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)
1. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged.
- `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)
- `community-operators` is used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461)

Expand All @@ -42,11 +43,11 @@ In order to have more people comfortable with the release process, and in order
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).

| Version | Release manager |
| -------- | --------------- |
| v0.98.0 | @yuriolisa |
| v0.99.0 | @pavolloffay |
|----------|-----------------|
| v0.99.0 | @yuriolisa |
| v0.100.0 | @VineethReddy02 |
| v0.101.0 | @TylerHelmuth |
| v0.102.0 | @swiatekm-sumo |
| v0.103.0 | @frzifus |
| v0.104.0 | @jaronoff97 |
| v0.105.0 | @pavolloffay |
5 changes: 2 additions & 3 deletions apis/v1alpha1/collector_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"github.com/open-telemetry/opentelemetry-operator/internal/config"
ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters"
"github.com/open-telemetry/opentelemetry-operator/internal/rbac"
"github.com/open-telemetry/opentelemetry-operator/pkg/featuregate"
)

var (
Expand Down Expand Up @@ -365,7 +364,7 @@ func (c CollectorWebhook) validateTargetAllocatorConfig(ctx context.Context, r *
if err != nil {
return nil, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err)
}
err = ta.ValidatePromConfig(promCfg, r.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled())
err = ta.ValidatePromConfig(promCfg, r.Spec.TargetAllocator.Enabled)
if err != nil {
return nil, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err)
}
Expand Down Expand Up @@ -451,7 +450,7 @@ func warningsGroupedByResource(reviews []*v1.SubjectAccessReview) []string {
func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config, reviewer *rbac.Reviewer) error {
cvw := &CollectorWebhook{
reviewer: reviewer,
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook"),
logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook", "version", "v1alpha1"),
scheme: mgr.GetScheme(),
cfg: cfg,
}
Expand Down
Loading

0 comments on commit be6d2bf

Please sign in to comment.