Skip to content

Conversation

@heliapb
Copy link
Member

@heliapb heliapb commented May 30, 2025

From issue #79
Add helm chart using kubebuilder helm plugin

@heliapb heliapb force-pushed the feat/helm_chart branch from d9e6331 to 8c55c67 Compare May 30, 2025 10:39
@heliapb heliapb force-pushed the feat/helm_chart branch 2 times, most recently from 4f1ac25 to 5921f90 Compare May 30, 2025 11:14
@dougkirkley
Copy link
Collaborator

This issue could be a good way to test the full helm chart and installing custom resources as well, in a separate PR

@heliapb heliapb force-pushed the feat/helm_chart branch from ab471b9 to 1a3071e Compare May 30, 2025 13:13
@dougkirkley
Copy link
Collaborator

@heliapb Do you think your could load the current perses-operator docker image into kind and use that to test this scenario?

Copy link
Contributor

@ibakshay ibakshay left a 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
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
icon: "https://example.com/icon.png"
icon: "https://github.com/perses/perses/blob/main/docs/images/perses_logo_lt.png"

@Skaronator
Copy link

I think it would be cool to provide a "Installing Perses in Kubernetes" documentation in perses docs?

https://perses.dev/perses/docs/installation/in-a-container/

@heliapb heliapb closed this Jul 30, 2025
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
@heliapb heliapb reopened this Jul 30, 2025
Comment on lines +63 to +69
metrics:
enable: true

# [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true
prometheus:
enable: false

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.

Suggested change
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

@Skaronator
Copy link

Personally I would put the helm chart in charts/perses-operator and not in dist/chart so it aligns more with the common chart structure of other helm chart repositories. Even though we only have on chart here.

container:
image:
repository: controller
tag: latest

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 }}

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
repository: controller
repository: docker.io/persesdev/perses-operator

Comment on lines +34 to +35
command:
- /manager

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)

Suggested change
command:
- /manager
{{ with .Values.controllerManager.container.command }}
command: {{ . | toYaml | nindent 8 }}
{{ end }}

Comment on lines +12 to +18
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi

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: {}

@Skaronator
Copy link

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.

@ibakshay
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants