influxdata / influxdata/helm-charts

InfluxDB helm chart version: 4.12.0 unable to use backup and restore cronjob

Open
#522 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mustache
Stars
257
Forks
347
Avg merge
4d 20h
Merged PRs (30d)
9

Description

apiVersion: v1
appVersion: 1.8.10
description: Scalable datastore for metrics, events, and real-time analytics.
home: https://www.influxdata.com/time-series-platform/influxdb/
keywords:
- influxdb
- database
- timeseries
- influxdata
maintainers:
- email: rawkode@influxdata.com
name: rawkode
- email: giacomo@influxdata.com
name: gitirabassi
- email: urakiny@gmail.com
name: aisuko
- email: naseem@transit.app
name: naseemkullah
name: influxdb
sources:
- https://github.com/influxdata/influxdb
version: 4.12.0
================================
I have deployed this helm chart on IBMCloud and with these values, Backup pod is coming up but it is not taking the backup and the same backup restore if I enable and try to deploy I am facing this error
I can see the cron job is created and job.batch is also created but it is not taking the backup
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE
cronjob.batch/dcaw-influxdb-backup 0 */2 * * * False 5 46m 10h

NAME COMPLETIONS DURATION AGE
job.batch/dcaw-influxdb-backup-27795960 0/1 8h 8h
job.batch/dcaw-influxdb-backup-27796080 0/1 6h46m 6h46m
job.batch/dcaw-influxdb-backup-27796200 0/1 4h46m 4h46m
job.batch/dcaw-influxdb-backup-27796320 0/1 166m 166m
job.batch/dcaw-influxdb-backup-27796440 0/1 46m 46m
---------
bash-3.2$ k describe cronjob.batch/dcaw-influxdb-backup
Name: dcaw-influxdb-backup
Namespace: dcaw-devops
Labels: app.kubernetes.io/component=backup
app.kubernetes.io/instance=dcaw-influxdb
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=influxdb
app.kubernetes.io/version=1.8.10
helm.sh/chart=influxdb-4.12.0
Annotations: meta.helm.sh/release-name: dcaw-influxdb
meta.helm.sh/release-namespace: dcaw-devops
Schedule: 0 */2 * * *
Concurrency Policy: Allow
Suspend: False
Successful Job History Limit: 3
Failed Job History Limit: 1
Starting Deadline Seconds:
Selector:
Parallelism:
Completions:
Pod Template:
Labels: app.kubernetes.io/instance=dcaw-influxdb
app.kubernetes.io/name=influxdb
Service Account: dcaw-influxdb
Init Containers:
influxdb-backup:
Image: influxdb:1.8.10-alpine
Port:
Host Port:
Command:
/bin/sh
Args:
-c
influxd backup \
-host dcaw-influxdb.dcaw-devops.svc:8088 \
-portable /dcaw/lib/influxdb/backup/"$(date +%Y%m%d%H%M%S)"

Requests:
ephemeral-storage: 20Gi
Environment:
Mounts:
/dcaw/lib/influxdb/backup from backup (rw)
Containers:
influxdb-restore:
Image: influxdb:1.8-alpine
Port:
Host Port:
Environment:
Mounts:
Volumes:
backup:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: dcaw-influxdb-backup
ReadOnly: false
Last Schedule Time: Mon, 07 Nov 2022 07:30:00 +0530
Active Jobs: dcaw-influxdb-backup-27795960, dcaw-influxdb-backup-27796080, dcaw-influxdb-backup-27796200, dcaw-influxdb-backup-27796320, dcaw-influxdb-backup-27796440
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal SuccessfulCreate 48m cronjob-controller Created job dcaw-influxdb-backup-27796440
------------------------
If I run the command manually it is taking the backup so I fell the command is correct
influxd backup \
-host dcaw-influxdb.dcaw-devops.svc:8088 \
-portable /dcaw/lib/influxdb/backup/"$(date +%Y%m%d%H%M%S)"
---------------------------
===================================
bash-3.2$ helm upgrade dcaw-influxdb influxdb
Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(CronJob.spec.jobTemplate.spec.template.spec): missing required field "containers" in io.k8s.api.core.v1.PodSpec
bash-3.2$
==========================

backup:
enabled: true
resources:
requests:
# memory: 512Mi
# cpu: 2
ephemeral-storage: "20Gi"
# limits:
# memory: 1Gi
# cpu: 4
# ephemeral-storage: "16Gi"
## If backup destination is PVC, or want to use intermediate PVC before uploading to object store.
persistence:
enabled: true
## If defined, storageClassName:
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
storageClass: "ibmc-block-bronze"
annotations:
accessMode: ReadWriteOnce
size: 20Gi
schedule: "0 */2 * * *"
startingDeadlineSeconds: ""
annotations: {}
podAnnotations: {}
nodeSelector: {}

backupRetention:
enabled: false
resources:
requests:
# memory: 512Mi
# cpu: 2
# limits:
# memory: 1Gi
# cpu: 4
schedule: "0 2 * * *"
startingDeadlineSeconds:
annotations: {}
podAnnotations: {}
daysToRetain: 7
================================
Also if I uninstall the InfluxDB helm charts, I am observed backup pod PVC is also getting deleted, I wanted to retain the backup PVC if I uninstall the helm chart.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.