-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add Helm chart install mode #98
Conversation
Hello @knmsk, |
probably after the discussion of issue #92 |
Hi @knmsk!! Do you know when this PR will be merged? I created a custom Helm Chart meanwhile but would be great to use the official one. Thanks for your work! Amazing ❤️ |
@guillermotti i thought about having a helm and a operator format to use, so probably i'll undo the operator removal and ask @yorugac to review it. But at my company we already use this PR to deploy our k6-operator |
Hi @knmsk! My apologies for such a terrible delay but I'm finally getting to your PR 😅 This is just a heads-up as I've only started looking at the PR and testing: I'll go through all details and then add any further comments. This is really neat, and I'm amazed it covers everything, including CI! The main thing I wanted to mention for now is the UX one: I think we should avoid adding Helm as default build everywhere. I.e. it should be an option, not a requirement. Meaning, I was also thinking to update |
Hi there! What is the status of this Pull Request. We would need this Helm way as well! |
Hi @phlegx, this PR is planned to be merged for the next big release, v0.0.8. The release will not be earlier than August / September, but hopefully, Helm support itself will be merged before that. |
Hi! |
Hi @yulianovikova, Unlike k6, k6-operator does not have any set schedule around releases. The reason is simple: the time resources allocated for it are limited and workload is impacted by external requests and now major issue #138. So previous estimation became invalid. I still would like to add Helm first but cannot say the dates at the moment. TBH, I'm not happy about this either. I'll try to see if anything can be improved and will update again if / when there are changes. For now, I added next pre-release v0.0.8-rc3 (the rc2 has a CI issue), to have a new proper tagged image. |
I also had a look at the PR. Looks very thorough and good. Only thing I would like to mention is the lack of the standard/recommended K8s & Helm labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ & https://helm.sh/docs/chart_best_practices/labels/ . If you create a helm chart with
And it's used in
I don't include namespace in the templates since that's only redundant when passing The scaffold
|
while we are at it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any updates on this? I'd like to start using it my company. Also can you make sure the Helm chart gets added to AWS EKS Blueprints
I've updated the code with the suggestions that @StianOvrevage and @Dariusch mentioned
@Dariusch I think it isn't necessary anymore, can @yorugac or someone confirm this? |
Ill test this in the next few days |
Any updates? :) |
I had used this chart, and haven't found any major issues. Please merge asap 🙂 |
I tried installing this branch by doing:
But got a few errors because the template output (after processing) wasn't producing valid It would be fantastic if we could get this merged! It facilitates installs on private company repositories using the apps of apps pattern, and I believe it might significantly help with adoption 😄 |
I've successfully installed the K6 operator from Helm chart with the freshest code changes. |
Hey @danielfigueiredo can you also sign the licence/cla? |
Thanks for the prompt @knmsk , CLA signed! Not sure why it hasn't updated yet, maybe there is a refresh cycle. The agreement is signed and my email used is my primary email for this github account so should all be good. I'll keep an eye but please let me know if there is anything else missing here |
It seems there was a somewhat similar case of CLA confusion over here: Apparently, making a "Co-authored-by" commit allowed to bypass the problem. Github docs on such commits. It's still strange but perhaps that could work here as well. |
Just to make sure that I got it, I need to make a commit with a manual co-authored-by @danielfigueiredo to bypass this problem, right? |
Sorry, had to do a rebase since I've got some merge problems that I usually not run into 😢 EDIT: Got it! |
Added missed PodSecurityContext in K6 CRD. Tested in minikube with default e2e/test.js
author knmsk <[email protected]> 1643746211 -0300 committer knmsk <[email protected]> 1692377913 -0300 changed the build to helm instead of kustomize changed the build to helm instead of kustomize changed to helmlint moved the charts folder fix: helpers rendering namespace incorrectly Added chart-testing workflow fix: ct list-changed fix: chart-testing only when has differences fixed the image from the samples revert: remove the kustomize, now supports both revert: changes on go.mod fix the image build fix: makefile identation revert: controller-gen version 0.4.0 to 0.3.0 fix: makefile bundle error fix: yamllint file on github actions
Added missed PodSecurityContext in K6 CRD. Tested in minikube with default e2e/test.js
apply suggestions fix: e2e-test for kustomize fix: makefile tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@knmsk, this is an amazingly large work, thanks! 😄
I've gone through the main points: most of the change requests are small and should be relatively quick to fix. Quite a few of them seem to be just leftovers because of rebasing lots of commits at once.
Other than those leftovers, most noticeable change request is around names: see the comment in _helpers.tpl
. As it is, the installation doesn't work for me ATM.
There are also a couple of questions I'd like to clarify with you, e.g. in values.yaml
and Makefile
.
Btw, thank you for including CI workflows! One of the main blockers for merging this was the additional effort required to maintain the chart: working CI would help with that 👍 I hope they'll work out-of-the-box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are working as far as I checked 🙌 There will probably be small adjustments we'll have to do in the future but otherwise, it looks pretty neat!
@knmsk, I'm marking this as a change request because of bundle/
: I'm not clear why it was added. We might return to it if we ever get to #3 but it shouldn't be required for Helm support, AFAIS. Could you please remove it?
A note for the future: each update of CRD(s) will need to be copy-pasted to the charts/templates/crds
in order to be picked up by the next chart release.
@yorugac yeah, its not supposed to have a bundle folder committed at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The scenarios I've tested work and the structure is straight-forward 👍
Thank you again for the work and updates and esp. patience, @knmsk and everyone who helped 😄
# permissions for end users to edit privateloadzones. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: privateloadzone-editor-role | ||
rules: | ||
- apiGroups: | ||
- k6.io | ||
resources: | ||
- privateloadzones | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- k6.io | ||
resources: | ||
- privateloadzones/status | ||
verbs: | ||
- get | ||
--- | ||
# permissions for end users to view privateloadzones. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: privateloadzone-viewer-role | ||
rules: | ||
- apiGroups: | ||
- k6.io | ||
resources: | ||
- privateloadzones | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- k6.io | ||
resources: | ||
- privateloadzones/status | ||
verbs: | ||
- get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These roles are not actually included by default:
https://github.com/grafana/k6-operator/blob/main/config/rbac/kustomization.yaml
The same as with k6-editor-role
and k6-viewer-role
.
At first glance, these don't seem to make an impact one way or another so ~ future candidates for removal.
Hi everyone,
I moved most of things out of kustomize to helm chart. I had some problems trying to set-up the MutationWebhookConfiguration and ValidatingWebhookConfiguration, if anyone can help with this i will be glad.
Also, i added some liveness and readiness probe configuration on the controller-runtime in case someone will need it too due to requirements of the company cluster.
Closes #92