-
Notifications
You must be signed in to change notification settings - Fork 23
feat: add helm chart #161
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
base: main
Are you sure you want to change the base?
feat: add helm chart #161
Conversation
4f1ac25 to
5921f90
Compare
|
This issue could be a good way to test the full helm chart and installing custom resources as well, in a separate PR |
|
@heliapb Do you think your could load the current perses-operator docker image into kind and use that to test this scenario? |
ibakshay
left a comment
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.
Thank you very much for this PR! Left few comments :)
| ##@ Helm | ||
| .PHONY: helm-chart | ||
| helm-chart: manifests | ||
| kubebuilder edit --plugins=helm/v1-alpha |
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.
It will be great if the kubebuilder binary can be installed locally instead of installing it globally by the end-user in advance. Please see how it is done for [jsonnet_binary here](https://github.com/perses/perses-operator/blob/main/Makefile#L316-L320.
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.
Hi thanks for the feedback, will try to pick up this work again
| - name: Check Helm release | ||
| run: | | ||
| helm status perses-operator --namespace perses-operator-system |
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.
We also need to have a workflow to release this helm chart. Same like this one
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "0.1.0" | ||
| icon: "https://example.com/icon.png" |
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.
| icon: "https://example.com/icon.png" | |
| icon: "https://github.com/perses/perses/blob/main/docs/images/perses_logo_lt.png" |
|
I think it would be cool to provide a "Installing Perses in Kubernetes" documentation in perses docs? |
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
| metrics: | ||
| enable: true | ||
|
|
||
| # [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true | ||
| prometheus: | ||
| enable: false | ||
|
|
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.
Naming this metrics.enable and prometheus.enable might be really confusing. I would just nest it similar to other helm charts that I have used.
| metrics: | |
| enable: true | |
| # [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true | |
| prometheus: | |
| enable: false | |
| metrics: | |
| enable: true | |
| # To enable a ServiceMonitor to export metrics to Prometheus set true | |
| serviceMonitor: | |
| enable: false |
|
Personally I would put the helm chart in |
| container: | ||
| image: | ||
| repository: controller | ||
| tag: latest |
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.
This should remain empty and the actual deployment.yaml Template should fallback to the AppVersion defined in Chart.yaml.
Thats also how helm recommend it when you run helm create xy
| {{- end }} | ||
| command: | ||
| - /manager | ||
| image: {{ .Values.controllerManager.container.image.repository }}:{{ .Values.controllerManager.container.image.tag }} |
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.
As mentioned below/above. The image.tag should use .Chart.AppVersion by default and values should be empty.
This example is from helm create xy
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"| replicas: 1 | ||
| container: | ||
| image: | ||
| repository: controller |
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.
| repository: controller | |
| repository: docker.io/persesdev/perses-operator |
| command: | ||
| - /manager |
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.
/manager doesn't exist in docker.io/persesdev/perses-operator:latest. I would suggest to allow users to overwrite it but keep it empty by default. No need to overwrite the default entrypoint in the container image.
Something like this (untested)
| command: | |
| - /manager | |
| {{ with .Values.controllerManager.container.command }} | |
| command: {{ . | toYaml | nindent 8 }} | |
| {{ end }} |
| resources: | ||
| limits: | ||
| cpu: 500m | ||
| memory: 128Mi | ||
| requests: | ||
| cpu: 10m | ||
| memory: 64Mi |
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.
This should not be set by default. Keep it empty:
resources: {}
|
I just noticed that there is already a dedicated helm chart repository here: https://github.com/perses/helm-charts So it would make sense to put the operator helm chart there as well. |
Please have a look at this comment for context - #79 (comment) |
From issue #79
Add helm chart using kubebuilder helm plugin