Skip to content

Commit

Permalink
feat(k8s-etcd-backup): allow configuring extraVolume/Mounts (#1293)
Browse files Browse the repository at this point in the history
* feat(k8s-etcd-backup): allow configuring extraVolume/Mounts

Signed-off-by: Toni Tauro <[email protected]>

* fix(values.yaml): revert removal of line (typo)

Signed-off-by: Toni Tauro <[email protected]>

---------

Signed-off-by: Toni Tauro <[email protected]>
  • Loading branch information
eyenx authored Aug 7, 2024
1 parent 934740f commit d1b07dc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions charts/kubernetes-etcd-backup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: kubernetes-etcd-backup
description: Chart for kubernetes-etcd-backup solution
type: application
version: 1.1.0
version: 1.2.0
appVersion: v1.0.6
keywords:
- kubernetes-etcd-backup
Expand All @@ -20,6 +20,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Allow configuration of jobs affinity"
- kind: changed
description: "Allow use of an existing pvc"
description: "Allow configuration of extraVolume/Mounts"
4 changes: 3 additions & 1 deletion charts/kubernetes-etcd-backup/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions charts/kubernetes-etcd-backup/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
- name: volume-backup
mountPath: /backup
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
restartPolicy: Never
volumes:
- name: etcd-peer-tls
Expand All @@ -56,6 +59,9 @@ spec:
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 10 }}
{{- end }}
{{ with .Values.affinity }}
affinity:
{{ . | toYaml | nindent 14 }}
Expand Down
18 changes: 13 additions & 5 deletions charts/kubernetes-etcd-backup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ persistence:
# -- Use an exising PVC
existingClaim: ""


image:
# -- Repository image to use
repository: ghcr.io/adfinis/kubernetes-etcd-backup
Expand All @@ -73,8 +72,8 @@ resources:
# cpu: 100m
# memory: 128Mi


affinity: {}
affinity:
{}
# Will be added directly to the pods affinity configuration.
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -85,9 +84,8 @@ affinity: {}
# values:
# - ssd


monitoring:
# -- Deploy PrometheusRule to be alerted in case of backup fails as decribed [here](https://github.com/adfinis/kubernetes-etcd-backup/blob/main/etcd-backup-cronjob-monitor.PrometheusRule.yaml).
# -- Deploy PrometheusRule to be alerted in case of backup fails as decribed [here](https://github.com/adfinis/kubernetes-etcd-backup/blob/main/etcd-backup-cronjob-monitor.PrometheusRule.yaml).
enabled: false
rules:
# -- Deploy PrometheusRule to check for cronjob fails.
Expand All @@ -100,3 +98,13 @@ monitoring:
# rules:
# - record: my_record
# expr: 100 * my_record

extraVolumeMounts: []
## Additional volumeMounts to the pod.
# - name: additional-volume-mount
# mountPath: /var/additional-volume-path

extraVolumes: []
## Additional volumes to the pod.
# - name: additional-volume
# emptyDir: {}

0 comments on commit d1b07dc

Please sign in to comment.