-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
base: master
Are you sure you want to change the base?
Conversation
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.
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 @@ | |||
{ |
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.
Grafana alerting config is not needed in this Helm Chart.
app: popeye-reports | ||
spec: | ||
containers: | ||
- image: "{{ .Values.image.web.name }}:{{ .Values.image.web.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.
Use Helm dependencies for nginx instead.
initContainers: | ||
{{- if .Values.pushgateway.enabled }} | ||
- args: | ||
- -A |
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 whole args should be configurable via Helm values.
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
{{- end }} | ||
- args: |
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 whole args should be configurable via Helm values.
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
volumeMounts: | ||
- mountPath: /tmp |
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.
nginx-stuff can be removed - managed by Helm dependency
restartPolicy: OnFailure | ||
terminationGracePeriodSeconds: 30 | ||
volumes: | ||
- emptyDir: {} |
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.
nginx-stuff can be removed - managed by Helm dependency
- html | ||
- --save | ||
- --output-file | ||
- index.html |
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.
- 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: |
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 is the main container, not a initContainer.
volumeMounts: | ||
- mountPath: /usr/share/nginx/html | ||
name: www | ||
- image: "{{ .Values.image.recycle.name }}:{{ .Values.image.recycle.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.
This container should cleanup the previously exported reports in the nginx-volume.
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.