Skip to content

Commit

Permalink
Upgrade operator to 0.99.0 (#1176)
Browse files Browse the repository at this point in the history
* Upgrade opentelemetry-operator to 0.99.0

* Support non-certmanager certs for conversion webhooks

* Add a warning to the README and upgrade guide

* Minor documentation improvements

Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>

---------

Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
  • Loading branch information
swiatekm and TylerHelmuth authored May 13, 2024
1 parent 4845736 commit 870f231
Show file tree
Hide file tree
Showing 29 changed files with 22,717 additions and 25,566 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/operator-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jobs:
- name: Install opentelemetry-operator chart
run: |
helm install --namespace=opentelemetry-operator-system --create-namespace my-opentelemetry-operator ./charts/opentelemetry-operator --set "manager.featureGates=operator.autoinstrumentation.go" --set "manager.collectorImage.repository=otel/opentelemetry-collector-k8s"
helm install --namespace=opentelemetry-operator-system --create-namespace my-opentelemetry-operator ./charts/opentelemetry-operator \
--set 'manager.extraArgs[0]="--enable-go-instrumentation"' \
--set "manager.collectorImage.repository=otel/opentelemetry-collector-k8s"
kubectl wait --timeout=5m --for=condition=available deployment my-opentelemetry-operator -n opentelemetry-operator-system
- name: Run e2e tests
Expand Down Expand Up @@ -107,7 +109,7 @@ jobs:
- name: Install opentelemetry-operator chart
run: |
helm install --namespace=opentelemetry-operator-system --create-namespace my-opentelemetry-operator ./charts/opentelemetry-operator \
--set "manager.featureGates=operator.autoinstrumentation.go" \
--set 'manager.extraArgs[0]="--enable-go-instrumentation"' \
--set "manager.collectorImage.repository=otel/opentelemetry-collector-k8s" \
--set "admissionWebhooks.certManager.enabled=false"
kubectl wait --timeout=5m --for=condition=available deployment my-opentelemetry-operator -n opentelemetry-operator-system
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ check-examples:

.PHONY: update-operator-crds
update-operator-crds:
$(call get-crd,./charts/opentelemetry-operator/templates/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,./charts/opentelemetry-operator/templates/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,./charts/opentelemetry-operator/templates/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opampbridges.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,./charts/opentelemetry-operator/conf/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opampbridges.yaml)

.PHONY: check-operator-crds
check-operator-crds:
mkdir -p ${TMP_DIRECTORY}/crds
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetrycollector.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetryinstrumentation.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_instrumentations.yaml)
$(call get-crd,${TMP_DIRECTORY}/crds/crd-opentelemetry.io_opampbridges.yaml,https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/v$(OPERATOR_APP_VERSION)/bundle/manifests/opentelemetry.io_opampbridges.yaml)
if diff ${TMP_DIRECTORY}/crds ./charts/opentelemetry-operator/templates/crds > /dev/null; then \
if diff ${TMP_DIRECTORY}/crds ./charts/opentelemetry-operator/conf/crds > /dev/null; then \
echo "Passed"; \
rm -rf ${TMP_DIRECTORY}; \
else \
Expand All @@ -77,6 +77,7 @@ check-operator-crds:

define get-crd
@curl -s -o $(1) $(2)
@sed -i '\#path: /convert#a {{ if .caBundle }}{{ cat "caBundle:" .caBundle | indent 8 }}{{ end }}' $(1)
@sed -i 's#opentelemetry-operator-system/opentelemetry-operator-serving-cert#{{ include "opentelemetry-operator.webhookCertAnnotation" . }}#g' $(1)
@sed -i "s/opentelemetry-operator-system/{{ .Release.Namespace }}/g" $(1)
@sed -i 's/opentelemetry-operator-webhook-service/{{ template "opentelemetry-operator.fullname" . }}-webhook/g' $(1)
Expand Down
4 changes: 2 additions & 2 deletions charts/opentelemetry-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-operator
version: 0.57.0
version: 0.58.0
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand All @@ -11,4 +11,4 @@ maintainers:
- name: dmitryax
- name: TylerHelmuth
icon: https://raw.githubusercontent.com/cncf/artwork/a718fa97fffec1b9fd14147682e9e3ac0c8817cb/projects/opentelemetry/icon/color/opentelemetry-icon-color.png
appVersion: 0.98.0
appVersion: 0.99.0
5 changes: 5 additions & 0 deletions charts/opentelemetry-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# OpenTelemetry Operator Helm Chart

> [!WARNING]
> Version 0.58.0 of this Chart includes a new version of the `OpenTelemetryCollector` CRD. See [this document][v1beta1_migration] for upgrade instructions for the new Operator CRD. Please make sure you also follow the [helm upgrade instructions](./UPGRADING.md#0560-to-0570) for helm chart 0.57.0.
The Helm chart installs [OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator) in Kubernetes cluster.
The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://www.openshift.com/learn/topics/operators).
At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) as the only managed component.
Expand Down Expand Up @@ -281,3 +284,5 @@ spec:
protocol: TCP
EOF
```

[v1beta1_migration]: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/crd-changelog.md#opentelemetrycollectoropentelemetryiov1beta1
6 changes: 6 additions & 0 deletions charts/opentelemetry-operator/UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Upgrade guidelines

## 0.57.0 to 0.58.0

OpenTelemetry Operator [0.99.0](https://github.com/open-telemetry/opentelemetry-operator/releases/tag/v0.99.0) includes a new version of the `OpenTelemetryCollector` CRD. See [this document][v1beta1_migration] for upgrade instructions for the new Operator CRD. Please make sure you also follow the [helm upgrade instructions](./UPGRADING.md#0560-to-0570) for helm chart 0.57.0.

## 0.56.0 to 0.57.0

This Chart now installs CRDs as templates. If you were managing CRDs separately by using the `--skip-crds` Helm flag, you need to set `crds.create=false` in your values.yaml.
Expand Down Expand Up @@ -100,3 +104,5 @@ It is important that the `jaegerremotesampling` extension and the `jaegerreceive
The ability to use admission webhooks has been moved from `admissionWebhooks.enabled` to `admissionWebhooks.create` as it now supports more use cases.

In order to completely disable admission webhooks you need to explicitly set the environment variable `ENABLE_WEBHOOKS: "false"` in `.Values.manager.env` .

[v1beta1_migration]: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/crd-changelog.md#opentelemetrycollectoropentelemetryiov1beta1
Loading

0 comments on commit 870f231

Please sign in to comment.