grafana / k6-operator

An operator for running distributed k6 tests.
Apache License 2.0
588 stars 166 forks source link

Rename K6 CRD to TestRun #226

Open yorugac opened 1 year ago

yorugac commented 1 year ago

In order to improve readability of our interfaces, we should rename the K6 CRD from:

kind: K6

To:

kind: TestRun

Why? kind: K6 is not very descriptive as from the first glance, it might mean a lot of things. If we add new CRDs (see #191), we should try to remove the confusing names as well.

This is a breaking change for existing setups so consider supporting both names for some period of time.

yorugac commented 1 year ago

It appears that general Kubernetes guideline is to make "roundtrip convertible" CRD types which more commonly would mean making them backwards compatible. In our case, we should probably try to be backwards compatible with K6 resources at least for some time so TestRun should be added as a new CRD, with conversions.

Additionally, we could use this as opportunity to switch from v1alpha1 to v1beta1 for TestRun specifically. Drawback: there are a few issues related to API stability that would be good to resolve first:

yorugac commented 1 year ago

TestRun CRD has been added as a duplicate of K6 CRD with the latter being marked as deprecated in #286 Missing dependency: #273

We'll support both K6 and TestRun for some time, to give people the opportunity to switch. But afterwards K6 will be removed. IOW, we didn't get to the "breaking" part yet.

I'm leaving this issue open for now. What is left: