open-telemetry / opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Apache License 2.0
1.21k stars 440 forks source link

Use OLM for the upgrade E2E test #1878

Open iblancasa opened 1 year ago

iblancasa commented 1 year ago

Currently, the e2e-upgrade test runs the followings steps:

  1. Installs the version v0.49.0 using the manifest
  2. Creates an OpenTelemetry Collector instance
  3. Deploys the current source code for the OpenTelemetry Operator, using the make deploy rule (installing the manifest)
  4. Waits until the OpenTelemetry Collector instance is upgraded

It would be nice to modify the current steps performed by the upgrade E2E test to install the operator using OLM and check the upgrade via OLM works properly. Or, if we want to continue checking upgrades via manifests, we can create another E2E test to test the OLM upgrades.

Needs #1879

TylerHelmuth commented 1 year ago

I'm curious what e2e testing OLM in this repository gives us that the current test doesn't. It feels like that would be more of a test of OLM than a test of our own capabilities.

iblancasa commented 1 year ago

Well, sometimes we found (with other operators) that the upgrade was working properly from the manifest file but not via OLM

TylerHelmuth commented 1 year ago

In those cases was it an OLM issue or an issue with the operator being tested?

iblancasa commented 1 year ago

With the operator. For instance, I remember one issue where there was a problem with an annotation that was modified between versions. Upgrading using the manifest worked properly but not via OLM (sorry, I was not able to find the exact error)

iblancasa commented 1 year ago

I found the issue: https://github.com/k8s-operatorhub/community-operators/pull/1366#issuecomment-1162832111