Add helm-chart to create cronjob and html report#167
Add helm-chart to create cronjob and html report#167adonaicosta wants to merge 1 commit intoderailed:masterfrom
Conversation
There was a problem hiding this comment.
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.
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.
Use Helm dependencies for nginx instead.
| initContainers: | ||
| {{- if .Values.pushgateway.enabled }} | ||
| - args: | ||
| - -A |
There was a problem hiding this comment.
This whole args should be configurable via Helm values.
| terminationMessagePath: /dev/termination-log | ||
| terminationMessagePolicy: File | ||
| {{- end }} | ||
| - args: |
There was a problem hiding this comment.
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.
nginx-stuff can be removed - managed by Helm dependency
| restartPolicy: OnFailure | ||
| terminationGracePeriodSeconds: 30 | ||
| volumes: | ||
| - emptyDir: {} |
There was a problem hiding this comment.
nginx-stuff can be removed - managed by Helm dependency
| - html | ||
| - --save | ||
| - --output-file | ||
| - index.html |
There was a problem hiding this comment.
- 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.
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.
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.