Skip to content
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

Add helm-chart to create cronjob and html report #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adonaicosta
Copy link

Hi, I created this helm chart based on the experience and the documentation that you made available in the project. I hope this helps to evolve and have greater adherence to popeye, I apply it a lot in all the clusters I work with.

Copy link

@kaidobit kaidobit left a comment

Choose a reason for hiding this comment

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

You forgot to create and use a PersistantVolumeClaim in order to export the reports to.

I like the approach of using Nginx in order to enable Prometheus to query the metrics. However I suggest you simply use a nginx Helm Chart as dependency for this Helm Chart, instead of deploying it by yourself (in a wrong way).

Since Prometheus and Nginx go hand in hand in this case I suggest, to enable nginx only when the export type is Prometheus and to export the reports to a newly created volume (only created and used, when export type is something else then Prometheus).

@@ -0,0 +1,311 @@
{
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

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

Grafana alerting config is not needed in this Helm Chart.

app: popeye-reports
spec:
containers:
- image: "{{ .Values.image.web.name }}:{{ .Values.image.web.tag }}"
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

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

Use Helm dependencies for nginx instead.

initContainers:
{{- if .Values.pushgateway.enabled }}
- args:
- -A

Choose a reason for hiding this comment

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

This whole args should be configurable via Helm values.

terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
{{- end }}
- args:

Choose a reason for hiding this comment

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

This whole args should be configurable via Helm values.

terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /tmp
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

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

nginx-stuff can be removed - managed by Helm dependency

restartPolicy: OnFailure
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

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

nginx-stuff can be removed - managed by Helm dependency

- html
- --save
- --output-file
- index.html
Copy link

@kaidobit kaidobit Nov 23, 2021

Choose a reason for hiding this comment

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

  • when nginx is enabled it will be the content-volume used by nginx (should be created by Helm dependency)
  • else just a regular volume, create a persistant volume claim for this

Also the filetype should be based on the -o value.

dnsPolicy: ClusterFirst
initContainers:
{{- if .Values.pushgateway.enabled }}
- args:

Choose a reason for hiding this comment

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

This is the main container, not a initContainer.

volumeMounts:
- mountPath: /usr/share/nginx/html
name: www
- image: "{{ .Values.image.recycle.name }}:{{ .Values.image.recycle.tag }}"

Choose a reason for hiding this comment

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

This container should cleanup the previously exported reports in the nginx-volume.

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.

2 participants