From 97210f6e7de3b3cda99bc35ad46de1ab9c5aa48c Mon Sep 17 00:00:00 2001 From: Philipp Stark Date: Tue, 12 Dec 2023 16:14:08 +0100 Subject: [PATCH 1/2] feat: added hostNetwork functionality for etcd-defrag CronJob --- charts/etcd-defrag/Chart.yaml | 2 +- charts/etcd-defrag/README.md | 3 ++- charts/etcd-defrag/templates/cronjob.yaml | 3 +++ charts/etcd-defrag/values.schema.json | 3 +++ charts/etcd-defrag/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/charts/etcd-defrag/Chart.yaml b/charts/etcd-defrag/Chart.yaml index 41accb33..565fc5a6 100644 --- a/charts/etcd-defrag/Chart.yaml +++ b/charts/etcd-defrag/Chart.yaml @@ -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 diff --git a/charts/etcd-defrag/README.md b/charts/etcd-defrag/README.md index 74ccf029..67b199f7 100644 --- a/charts/etcd-defrag/README.md +++ b/charts/etcd-defrag/README.md @@ -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 | @@ -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) diff --git a/charts/etcd-defrag/templates/cronjob.yaml b/charts/etcd-defrag/templates/cronjob.yaml index a4e977db..95ebcc72 100644 --- a/charts/etcd-defrag/templates/cronjob.yaml +++ b/charts/etcd-defrag/templates/cronjob.yaml @@ -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 }}" diff --git a/charts/etcd-defrag/values.schema.json b/charts/etcd-defrag/values.schema.json index d0ca5ad4..b7d9d7dc 100644 --- a/charts/etcd-defrag/values.schema.json +++ b/charts/etcd-defrag/values.schema.json @@ -159,6 +159,9 @@ "fullnameOverride": { "type": "string" }, + "hostNetwork": { + "type": "boolean" + }, "image": { "type": "object", "properties": { diff --git a/charts/etcd-defrag/values.yaml b/charts/etcd-defrag/values.yaml index 42cd132c..ecb5bfe1 100644 --- a/charts/etcd-defrag/values.yaml +++ b/charts/etcd-defrag/values.yaml @@ -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 From e65306eb1826075a0302fcf6b871aa1b9fee5619 Mon Sep 17 00:00:00 2001 From: Christian Huth Date: Sat, 3 Feb 2024 10:43:58 +0100 Subject: [PATCH 2/2] Update Chart.yaml --- charts/etcd-defrag/Chart.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/etcd-defrag/Chart.yaml b/charts/etcd-defrag/Chart.yaml index 565fc5a6..b21ea705 100644 --- a/charts/etcd-defrag/Chart.yaml +++ b/charts/etcd-defrag/Chart.yaml @@ -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.7 +version: 1.1.0 appVersion: "3.5.10" home: https://github.com/christianknell/helm-charts icon: https://cdn.worldvectorlogo.com/logos/etcd-1.svg @@ -12,3 +12,7 @@ maintainers: sources: - https://github.com/bitnami/containers/tree/main/bitnami/etcd - https://etcd.io +annotations: + artifacthub.io/changes: | + - kind: added + description: support for host networking