Skip to content

Commit

Permalink
feat: added hostNetwork functionality for etcd-defrag CronJob
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluekind1 committed Dec 12, 2023
1 parent 830e158 commit 97210f6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/etcd-defrag/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: etcd-defrag
description: A Helm chart for running a defragmentation CronJob for ETCD
type: application
version: 1.0.6
version: 1.0.7
appVersion: "3.5.10"
home: https://github.com/christianknell/helm-charts
icon: https://cdn.worldvectorlogo.com/logos/etcd-1.svg
Expand Down
3 changes: 2 additions & 1 deletion charts/etcd-defrag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ The command removes all the Kubernetes components associated with the chart and
| defrag.pod.restartPolicy | string | `"OnFailure"` | Restart policy for all containers within the pod. One of `Always`, `OnFailure`, `Never`. |
| extraEnv | list | `[]` | additional environment variables to be added to the pods |
| fullnameOverride | string | `""` | String to fully override `"etcd-defrag.fullname"` |
| hostNetwork | bool | `false` | specify if the CronJob should run on the hostNetwork |
| image.pullPolicy | string | `"Always"` | image pull policy |
| image.repository | string | `"bitnami/etcd"` | image repository |
| image.tag | string | `"3.5.10"` | Overrides the image tag |
Expand All @@ -113,4 +114,4 @@ helm install my-release -f values.yaml christianknell/etcd-defrag

---

Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
3 changes: 3 additions & 0 deletions charts/etcd-defrag/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.hostNetwork }}
hostNetwork: {{ . }}
{{- end }}
containers:
- name: {{ include "etcd-defrag.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/etcd-defrag/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@
"fullnameOverride": {
"type": "string"
},
"hostNetwork": {
"type": "boolean"
},
"image": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions charts/etcd-defrag/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ affinity: {}
# -- additional environment variables to be added to the pods
extraEnv: []

# -- specify if the CronJob should run on the hostNetwork
hostNetwork: false

defrag:
# -- create a CronJob for defragmentation
enabled: true
Expand Down

0 comments on commit 97210f6

Please sign in to comment.