Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
influxdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
influxdb
Commits
3b23722d
Unverified
Commit
3b23722d
authored
Jul 15, 2020
by
Daniel Trojanowski
Committed by
GitHub
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InfluxDB backup to Amazon S3 (or compatible) (#123)
Co-authored-by:
Naseem
<
naseem@transit.app
>
parent
f684e837
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
1 deletion
+46
-1
Chart.yaml
charts/influxdb/Chart.yaml
+1
-1
README.md
charts/influxdb/README.md
+1
-0
backup-cronjob.yaml
charts/influxdb/templates/backup-cronjob.yaml
+33
-0
values.yaml
charts/influxdb/values.yaml
+11
-0
No files found.
charts/influxdb/Chart.yaml
View file @
3b23722d
apiVersion
:
v1
name
:
influxdb
version
:
4.
7.2
version
:
4.
8.0
appVersion
:
1.8.0
description
:
Scalable datastore for metrics, events, and real-time analytics.
keywords
:
...
...
charts/influxdb/README.md
View file @
3b23722d
...
...
@@ -101,6 +101,7 @@ The following table lists configurable parameters, their descriptions, and their
| backup.enabled | Enable backups, if `true` must configure one of the storage providers | `false` |
| backup.gcs | Google Cloud Storage config | `nil`
| backup.azure | Azure Blob Storage config | `nil`
| backup.s3 | Amazon S3 (or compatible) config | `nil`
| backup.schedule | Schedule to run jobs in cron format | `0 0 * * *` |
| backup.annotations | Annotations for backup cronjob | {} |
| backup.podAnnotations | Annotations for backup cronjob pods | {} |
...
...
charts/influxdb/templates/backup-cronjob.yaml
View file @
3b23722d
...
...
@@ -38,6 +38,13 @@ spec:
secretName
:
{{
.Values.backup.gcs.serviceAccountSecret | quote
}}
{{
- end
}}
{{
- end
}}
{{
- if .Values.backup.s3
}}
{{
- if .Values.backup.s3.credentialsSecret
}}
-
name
:
aws-credentials-secret
secret
:
secretName
:
{{
.Values.backup.s3.credentialsSecret | quote
}}
{{
- end
}}
{{
- end
}}
serviceAccountName
:
{{
include "influxdb.serviceAccountName" .
}}
initContainers
:
-
name
:
influxdb-backup
...
...
@@ -113,4 +120,30 @@ spec:
resources
:
{{
- toYaml .Values.backup.resources | nindent 14
}}
{{
- end
}}
{{
- if .Values.backup.s3
}}
-
name
:
aws-cli
image
:
amazon/aws-cli
command
:
-
/bin/sh
args
:
-
'
-c'
-
|
aws {{- if .Values.backup.s3.endpointUrl }} --endpoint-url={{ .Values.backup.s3.endpointUrl }} {{- end }} s3 cp --recursive "$SRC_URL" "$DST_URL"
volumeMounts
:
-
name
:
backup
mountPath
:
/backup
{{
- if .Values.backup.s3.credentialsSecret
}}
-
name
:
aws-credentials-secret
mountPath
:
/var/secrets/aws/
{{
- end
}}
env
:
-
name
:
AWS_CONFIG_FILE
value
:
/var/secrets/aws/credentials
-
name
:
SRC_URL
value
:
/backup
-
name
:
DST_URL
value
:
{{
.Values.backup.s3.destination
}}
resources
:
{{
- toYaml .Values.backup.resources | nindent 14
}}
{{
- end
}}
{{
- end
}}
charts/influxdb/values.yaml
View file @
3b23722d
...
...
@@ -283,3 +283,14 @@ backup:
# storageAccountSecret: influxdb-backup-azure-key
# destination_container: influxdb-container
# destination_path: ""
## Amazon S3 or compatible
## Secret is expected to have AWS (or compatible) credentials stored in `credentials` field.
## Please look at https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where
## for the credentials format.
## The bucket should already exist.
# s3:
# credentialsSecret: aws-credentials-secret
# destination: s3://bucket/path
# ## Optional. Specify if you're using an alternate S3 endpoint.
# # endpointUrl: ""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment