Releases: grafana/k6-operator
v1.1.0
β¨ New features
There are a couple of additions to the TestRun CRD in this release:
-
It's now possible to set
.spec.runner.priorityClassName,.spec.starter.priorityClassName, and.spec.initializer.priorityClassNameto help avoid unwanted evictions of pods. Thanks, @vsoloviov! -
Init containers can have custom resources set as
.spec.runner.initContainers[*].resources, for cases when preparation for the test run requires more resources. Thanks, @gcaldasnu!
Additionally, this release contains a resolution to configurable path in VolumeClaim. Thanks, @moko-poi! Now it's possible to set the path like this:
apiVersion: k6.io/v1alpha1
kind: TestRun
metadata:
name: k6-test-with-pvc
spec:
script:
volumeClaim:
name: dynamic-pvc
file: /foo/script.js # Path to the script
readOnly: true
parallelism: 1It's a backwards-compatible change, so existing TestRuns should continue to work as is.
Another small improvement was to improve log output of curl containers, turning them to JSON. Thanks, @moko-poi!
Last but not least, BackoffLimit of starter Job is now set to zero, to avoid additional creation of starter or stopper pods on failure to reach k6 runners. It's worth noting that curl containers are configured with three retries to ensure that such a failure is not transient. Thanks, @moko-poi!
π Bug fixes
A simple validation for .spec.arguments has been added to avoid accidental Golang panic on misconfigured TestRun CRD. Note, this is not a full validation of all possible arguments: such validation is a job of k6 CLI and is expected to be done by a user before writing it down in the TestRun spec.
π¦ Helm
Helm chart received a fix to ensure that manager.serviceAccount.create option is taken into account. Thanks, @bcrisp4!
π οΈ Maintenance
Logs of the k6-operator were adjusted to include the host value for GCk6 API calls, to assist with troubleshooting.
Full Changelog: v1.0.0...v1.1.0
v1.0.0
π k6-operator 1.0 is here!
We're happy to announce k6-operator v1.0.0: a milestone that marks our commitment to the k6-operator project, switching to Semantic Versioning 2.0.0, and improving the stability guarantees. Starting from this release, we're formalizing our approach to versioning, release schedule, and maintenance updates.
We wouldn't have been here if not for the support of our amazing community. Thank you for providing feedback and so often lending a helping hand. π π
π Documentation
Regular maintenance updates are a must for long-term stability of the k6-operator project. Now, we've added the description of how maintenance updates are handled in the k6-operator.
With the switch to Semantic Versioning, we've formalized our understanding of what each type of version increase means in the k6-operator. Read more on that in this doc.
Additionally, we commit to making regular minor releases every 8 weeks. The planning for each release can be seen in the corresponding GitHub milestone.
Last but not least, we've published an upgrade guide to help you set up your upgrade workflows around the k6-operator deployment.
β¨ New features
We've fixed the technical debt when aggregation variables for metrics were not passed from Grafana Cloud k6 to the k6 runners in PrivateLoadZone tests. Now, the PLZ tests execute in a similar way to how cloud output tests do, in terms of metrics processing.
π Bug fixes
This release contains a bug fix to validate that the .spec.parallelism value in the TestRun CRD is positive. If it's not, a corresponding error message will appear in the logs.
π¦ Helm
There were a couple of additions to the Helm chart:
- Added the
service.portNameconfiguration option to the Helm chart. This allows you to configure a name for the HTTP port where metrics of the k6-operator app are served. - Added the
manager.logging.developmentboolean configuration option to the Helm chart. This allows you to switch the default logging level fromdevelopmentmode toproductionmode. Refer to the issue for the details. Thanks, @Kristina-Pianykh!
π οΈ Maintenance
In this release, we're bumping most of our Golang dependencies:
- Dockerfile Golang 1.25; PR.
- controller-runtime 0.22.1; PR.
- k8s.io group 0.34.0; PR.
- go.k6.io 1.2.3; PR.
- golangci-lint v2.4.0; PR.
- Other Golang dependencies brought up to latest; PR.
Full Changelog: v0.0.23...v1.0.0
v0.0.23
β¨ New features
We improved the security stance of PrivateLoadZone tests: now the Grafana Cloud k6 token is not visible in k6 Pods' definitions. This enables admins to configure the cluster so that users of the PrivateLoadZone have access to the k6 Pods but not to the GCK6 token.
Starting from this release, the k6 Operator no longer uses Scuttle-based images for runner pods by default (issue). Instead, it is using plain grafana/k6:latest, which is guaranteed to point to the latest official release of k6.
β οΈ Deprecation warning
The image of Scuttle-based runner will still be built on each release, so if you need it, you can configure it with .spec.runner.image. However, we're going to deprecate that image as well as remove Scuttle from TestRun CRD and the k6 Operator. If you are currently using Scuttle, please switch to using native sidecars. See this issue for details, and this documentation for how to configure Istio with the k6 Operator on up-to-date clusters.
π Bug fixes
The .spec.script.volumeClaim.readOnly option is now set for VolumeMount instead of Volume. This fix moves the read-only option to the k6 container level, allowing for greater flexibility in complex setups. Thanks, @The-Flash-Routine! If you have been using this option, please double-check if this fix changes any implicit behaviour in your TestRun workflow.
In rare cases of bad timing, PrivateLoadZone would fail to deregister upon deletion. The logic for it has now been improved.
π¦ Helm
There have been a few issues with the Helm release 3.14 after the kubebuilder update. Thanks to the reports from our users and contributions from @chris-pinola-rf, these were fixed and released as patch releases. PRs: #599, #606, #620.
If you encounter an issue with Helm setup, please share the details.
π Documentation
This release comes with several significant additions to the documentation.
Firstly, there is a machine-generated Markdown with full reference to the CRD types. It can be accessed in the docs folder here.
Secondly, there is a contributing guide that describes the main points to pay attention to when creating an issue or PR for the k6 Operator. It can be accessed in the CONTRIBUTING.md
The troubleshooting guide was split into the TestRun part and PrivateLoadZone part, with some additions and clarifications.
We've also added the Istio guide to the public documentation here. If you need to use the k6 Operator on the cluster with Istio, please refer to this guide.
Finally, there were several other smaller improvements to the docs. Thanks to @mostafa and @heitortsergent for the help!
π οΈ Maintenance
There were small fixes to the e2e test suite (#608, #622). Additionally, controller-tools was updated to v0.18.0.
Full Changelog: v0.0.22...v0.0.23
v0.0.22
πͺβ οΈ A breaking maintenance update
k6-operator was initially created several years ago, and since then Kubernetes libraries have changed certain implementation approaches quite a lot, most noticeably around authentication proxy for metrics. We have been receiving user requests to switch to the new approach. Additionally, the image kube-rbac-proxy is no longer officially recommended for a default layout and we should not continue to rely on it.
That said and since our goal is to simplify the default setup of k6-operator as part of v1 preparations, in this release, there has been a refactoring of code and manifests which correspond to the update of kubebuilder to v4. Depending on your setup, some of the changes may be breaking. Here are the key changes from the user's perspective:
kube-rbac-proxyis no longer part of the Deployment. There is only one container now.
- As a consequence, the next Helm chart no longer contains
authProxysection. - In default RBAC, instead of
proxy-role, there is nowmetrics-auth-role.
- The CLI arguments to k6-operator were renamed:
metrics-addrtometrics-bind-address(default is 8080).health-addrtohealth-probe-bind-address(default is 8081).enable-leader-electiontoleader-elect(default is false).
- The Deployment now has the liveness & readiness probes enabled by default (
/healthzendpoint on 8081), as well as a defaultsecurityContext:
# pod's
securityContext:
runAsNonRoot: true
# container's
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"Full changes in manifests can be seen in the PR.
β Do I need to change my tests or setup?
These changes did not impact the core functionality of k6-operator, and the tests do not need to be changed.
This is a change in the app's CLI and default manifests, which mostly impacts how metrics are handled. Firstly, if the CLI arguments are passed to the k6-operator externally, change them to new values as shown above. Next, if you rely on kube-rbac-proxy for metrics authentication, refer to this documentation and adjust your setup accordingly as part of this upgrade. If you believe that your use case is not fully supported by k6-operator, you're very welcome to open the issue and a PR with the details.
β¨ New features
Thanks to our contributors, this release also features several new additions.
k6-operator now has support for native sidecars; issue. They can be specified with the initContainers[*].restartPolicy field as per official Kubernetes documentation. Thanks, @stytchiz!
In addition to WATCH_NAMESPACE environment variable, it's now possible to watch several namespaces at once via WATCH_NAMESPACES; issue. An example:
- name: WATCH_NAMESPACES
value: "some-ns,some-other-ns"Thanks, @chris-pinola-rf!
The starter pod can also be configured with custom resources, just as other pods, if hard-coded values are not suitable; issue. Thanks, @seanankenbruck!
π¦ Helm
As described above, the Helm chart has been changed during the kubebuilder update: authProxy section was removed and RBAC objects were changed. See this PR for details.
In addition, there was a bug fix for ServiceMonitor's namespaceSelector, released as the 3.13.1 chart. Thanks, @jdegendt!
It is now possible to switch off the installation of ClusterRoles and ClusterRoleBindings objects by setting rbac.namespaced: true; issue. Thanks, @stytchiz!
π Documentation
There was an addition for automatic internal Grafana documentation for k6-operator repo. Thanks, @the-it!
Full Changelog: v0.0.21...v0.0.22
v0.0.21
β¨ New features
Starting from this release, k6-operator supports multiple PrivateLoadZones π As a reminder, previously it was possible to have only one PrivateLoadZone per installation. Now one can create several in a row and have them all working simultaneously:
$ kubectl -f plz-demo.yaml apply
privateloadzone.k6.io/plz-demo created
$ kubectl -f plz.yaml apply
privateloadzone.k6.io/kung-fu created
$ kubectl get privateloadzones.k6.io -A
NAMESPACE NAME AGE REGISTERED
plz-ns plz-demo 6s True
plz-ns kung-fu 14s TrueNote, however, that restriction of 100% distribution remains: it is possible to reference only one PrivateLoadZone in a k6 test.
The PLZs are distinguished by name only. This is required to be backward compatible with the older PLZs. Since it's backward compatible, there is no migration required: just an update of k6-operator to the latest release should be sufficient to switch to the new setup. The start of the new version of the app will read the registered PLZ in the system and continue to work as before, but now with the potential to add more PLZs if you'd like.
Grafana Cloud k6 sets the maximum number of PLZs per organization. By default, it is 5. If you need more, please contact customer support.
The documentation update will follow next week.
π¦ Helm
There have been quite a few improvements around ServiceMonitor usage:
- Ability to configure the
ServiceMonitorwithnamespace,jobLabel,interval,scrapeTimeout,labels, and some other fields. Thanks, @EladAviczer!β οΈ This is a breaking change: instead ofprometheus.enabled, configuration now happens viametrics.serviceMonitor.enabled. Please adjust your Helm values accordingly!
- It is now possible to have k6-operator's
Servicewithout enablingauthProxy. To do that, there is aservice.enabledoption. Thanks, @afreyermuth98!
πͺ Maintenance
There were a lot of CI improvements to harden our security stance. One of the most noticeable additions is that Zizmor scanning is executed on each pull request.
Some minor Golang library updates were also done here.
π Documentation
Last but not least, the internal docs now have a write-up about the NDE (Native Distributed Execution) proposal in k6 OSS and its potential impact on k6-operator.
With the help of @heitortsergent, we are improving our troubleshooting docs. The existing guide will be split into two parts (general & TestRun troubleshooting VS PrivateLoadZone troubleshooting) and simplified to make them more useful.
Full Changelog: v0.0.20...v0.0.21
v0.0.20
β¨ New features
There are two major additions in this release.
There is now Kubernetes native support for environment variables and secrets for PrivateLoadZone, as currently described here. The update of documentation will follow up. There are a couple of important restrictions to this implementation:
- Variables must be part of a ConfigMap or a Secret as they are passed as
envFromto k6 pods. In other words,envvalue of the pods cannot be set in this way. - Instead,
envis used to pass cloud environment variables to k6 pods, as has been the case since v0.0.16. - As a reminder,
envtakes precedence overenvFromin Kubernetes, so take care not to have an overlap with duplicate names!
The first version of E2E tests for k6-operator was added over here. This suite is used to test PRs, to confirm lack of regressions in base functionality before merging. ATM, they are executed manually and how it's done is described in the README. From the regular testing performed on k6-operator, only PrivateLoadZone tests are absent from this suite; hopefully, they will be added with the next iteration of work on E2E tests.
π¦ Helm
Thanks to the help from our users and contributors, we continue to fix the JSON schema. There was a bug with too strict validation for global which didn't allow to use k6-operator as a subchart. Now fixed, thanks, @pj199x! That fix was followed up by 3.11.1 Chart release.
πͺ Maintenance
The examples saw some clean up of legacy testing services. Thanks, @federicotdn!
Notable dependency updates in this release:
- Golang to 1.23
- controller-runtime to v0.20.3
- go.k6.io/k6 to v0.57.0
- security updates from dependabot
Full Changelog: v0.0.19...v0.0.20
v0.0.19
π’ Announcements
K6 CRD is removed in favor of TestRun CRD as of this release. 500.
There are plans to bump k6-operator to 1.0.0 and switch to semver releases. After this move, k6-operator should have regular schedule of maintenance updates. Feature additions will be optional and added to those releases on a case by case basis. Versioning of Helm chart will not be much affected by it as it can be said to follow the semver already.
The exact dates for this move are not set yet, but the key issues that will be part of this move can be seen in this board. Feedback is very much welcome! If there are issues you believe should be done before such 1.0.0 release, please comment on them.
π¦ Helm
There were issues encountered with the new JSON schema missing certain fields, thus preventing using Helm chart. To mitigate that, quick bug fixes for the Helm chart were released as 3.10.1 and 3.10.2. Thanks to everyone who reported those!
However, due to the timing error with K6 CRD removal, the chart 3.10.2 should be avoided with its default manager.image.tag value (v0.0.18). This Helm chart requires v0.0.19+ image or a custom built image. As usual, after this v0.0.19 release, there will be a new Helm chart released, 3.11, and it should be safe to switch to that one.
πͺ Maintenance
Deprecation of old kubebuilder's patterns has started, PR 503, and will continue in the next release. Thanks, @monteiro!
Among other maintenance tasks, CI, esp. related to Helm, received the most attention. PRs: 495, 496, 497, 509. Most notably, now JSON schema for the Helm chart is checked by CI and Helm release would fail if schema is not up-to-date.
Full Changelog: 0.0.18...v0.0.19
v0.0.18
This is a relatively small release to update the default k6 runner image, as well as to release an important bug fix for Grafana Cloud k6 tests.
K6 CRD will be removed. Please switch to using TestRun CRD, if you have not done so already!
π Bug hunting
When Grafana Cloud k6 tests entered Timeout state, k6-operator had failed to treat this is as a cause for abort of the test. This case is now treated correctly and the test run is aborted on Timeouts. PR 489.
π¦ Helm
There were bugs with the values JSON schema added in previous release (Chart version 3.9.0) which did not allow to install the Chart when passing certain values. The fix was done and released as of Chart version 3.9.1. Thanks, @julian-perge, for the help! (PR 474, 484).
Manager's pod security context can now be configured via the Chart. Thanks, @gonmmarques! (PR 467).
Maintenance efforts to improve workflows around Helm are ongoing.
πͺ Maintenance
golangci-lint bumped to 1.61.0.
Full Changelog: v0.0.17...0.0.18
v0.0.17
β¨ New features
This release contains the long-awaited support for IPv6. Thanks, @zzhao2010!
PrivateLoadZone test runs are now sending logs from the runners to the Cloud storage by default. These logs can then be accessed in Grafana Cloud k6 UI.
π¦ Helm
Helm chart now has the schema file which allows integration with tools like Cyclops. Thanks, @petar-cvit!
Leader election of k6-operator Deployment became smarter: now it is automatically disabled by the Chart if replicas are set to 1. Thanks, @hartman17!
π Bug hunting
The error on copying of the logs in initializer pod is now propagated properly. Thanks, @frittentheke!
πͺ Maintenance
Following k6 example, support for the outdated cloud output version 1 is removed.
Notable dependency updates in this release:
- Golang to 1.22
- controller-gen to 0.16.1
- controller-runtime to 0.19.0
Last but not least, CI workflows for Helm chart linting and testing are fixed and properly executed on each Helm-related PR.
Full Changelog: v0.0.16...v0.0.17
v0.0.16
β¨ New features
This release contains important new features for PrivateLoadZone:
- It is now possible to define the custom
imageinPrivateLoadZone. This can be useful to test with the older k6 binaries, as well with custom builds of k6. If you use a private registry and need to pass the secret to access it,imagePullSecretscan also be defined. - Environment variables defined in GCk6 are now passed to PLZ test runs and can be referenced in the scripts.
The relevant PRs: 426, 429, 430.
πͺ Documentation
We made a major refactoring of documentation for the k6 Operator π Now majority of the information needed to run the k6 Operator can be accessed from Grafana k6 OSS docs over here. The link is also present in the Readme, which had been fully re-written to be more readable.
The relevant PRs: k6-docs 1559, 405. Thank you, @heitortsergent, for all the help!
Full Changelog: v0.0.15...v0.0.16