From 8a7b5b2ed1532e52364d763e9fb0c7bdb0b40e73 Mon Sep 17 00:00:00 2001 From: Benjamin Pineau Date: Sat, 20 Jul 2019 11:58:49 +0200 Subject: [PATCH] Fix chart's volume attachment Cherry picked from @tchellomello chart submission (thanks!). --- assets/helm-chart/katafygio/Chart.yaml | 2 +- assets/helm-chart/katafygio/README.md | 3 ++- assets/helm-chart/katafygio/templates/deployment.yaml | 10 +++++++--- assets/helm-chart/katafygio/values.yaml | 6 +++--- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/assets/helm-chart/katafygio/Chart.yaml b/assets/helm-chart/katafygio/Chart.yaml index a333e91..ba416c9 100644 --- a/assets/helm-chart/katafygio/Chart.yaml +++ b/assets/helm-chart/katafygio/Chart.yaml @@ -5,7 +5,7 @@ name: katafygio home: https://github.com/bpineau/katafygio sources: - https://github.com/bpineau/katafygio -version: 0.4.2 +version: 0.4.3 keywords: - backup - dump diff --git a/assets/helm-chart/katafygio/README.md b/assets/helm-chart/katafygio/README.md index 77a0240..aa299c8 100644 --- a/assets/helm-chart/katafygio/README.md +++ b/assets/helm-chart/katafygio/README.md @@ -47,11 +47,12 @@ The following table lists the configurable parameters of the Katafygio chart and | Parameter | Description | Default | |-------------------------|-------------------------------------------------------------|--------------------------------------| -| `replicaCount` | Desired number of pods | `1` | +| `replicaCount` | Desired number of pods (leave to `1` when using local PV) | `1` | | `image.repository` | Katafygio container image name | `bpineau/katafygio` | | `image.tag` | Katafygio container image tag | `v0.7.3` | | `image.pullPolicy` | Katafygio container image pull policy | `IfNotPresent` | | `localDir` | Container's local path where Katafygio will dump and commit | `/tmp/kf-dump` | +| `gitTimeout` | Deadline for all git commands | `300s` | | `gitUrl` | Optional remote repository where changes will be pushed | `nil` | | `noGit` | Disable git versioning | `false` | | `filter` | Label selector to dump only matched objects | `nil` | diff --git a/assets/helm-chart/katafygio/templates/deployment.yaml b/assets/helm-chart/katafygio/templates/deployment.yaml index 1440280..b092995 100644 --- a/assets/helm-chart/katafygio/templates/deployment.yaml +++ b/assets/helm-chart/katafygio/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "katafygio.fullname" . }} @@ -7,6 +7,8 @@ metadata: {{ include "katafygio.labels.standard" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} + strategy: + type: Recreate selector: matchLabels: app: {{ template "katafygio.name" . }} @@ -74,8 +76,10 @@ spec: httpGet: path: /health port: http - {{- if and .Values.gitSshKey .Values.gitUrl }} volumeMounts: + - name: {{ template "katafygio.fullname" . }}-data + mountPath: {{ .Values.localDir }} + {{- if and .Values.gitSshKey .Values.gitUrl }} - name: katafygio-gitssh mountPath: "/.ssh" readOnly: true @@ -89,7 +93,7 @@ spec: secretName: {{ template "katafygio.fullname" . }} defaultMode: 256 {{- end }} - - name: katafygio-data + - name: {{ template "katafygio.fullname" . }}-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: claimName: {{ .Values.persistence.existingClaim | default (include "katafygio.fullname" .) }} diff --git a/assets/helm-chart/katafygio/values.yaml b/assets/helm-chart/katafygio/values.yaml index 41f1fef..d6cf212 100644 --- a/assets/helm-chart/katafygio/values.yaml +++ b/assets/helm-chart/katafygio/values.yaml @@ -27,7 +27,7 @@ gitSshConfig: | healthcheckPort: 8080 # logLevel can be info, warning, error, or fatal. -logLevel: warning +logLevel: info # logOutput can be stdout, stderr, or syslog. logOutput: stdout # logServer (optional) provide the address of a remote syslog server. @@ -55,7 +55,7 @@ resyncInterval: 300 localDir: "/var/lib/katafygio/data" # persistence for the localDir dump directory. Note that configuring gitUrl -# is an other way to achieve persistence. +# is an other way to achieve persistence (to a remote git repository). persistence: enabled: true ## If defined, storageClassName: @@ -87,7 +87,7 @@ serviceAccount: image: repository: bpineau/katafygio - tag: v0.7.3 + tag: v0.7.4 pullPolicy: IfNotPresent # resources define the deployment's cpu and memory resources.