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
2fdf877c
Commit
2fdf877c
authored
Sep 12, 2019
by
Tomasz Główka
Committed by
Kubernetes Prow Robot
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[stable/influxdb] Add support for Azure to backup job (#16722)
Signed-off-by:
Tomasz Glowka
<
glowka.tom@gmail.com
>
parent
7a404866
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
7 deletions
+47
-7
Chart.yaml
stable/influxdb/Chart.yaml
+1
-1
backup-cronjob.yaml
stable/influxdb/templates/backup-cronjob.yaml
+32
-2
values.yaml
stable/influxdb/values.yaml
+14
-4
No files found.
stable/influxdb/Chart.yaml
View file @
2fdf877c
apiVersion
:
v1
apiVersion
:
v1
name
:
influxdb
name
:
influxdb
version
:
1.
3.4
version
:
1.
4.0
appVersion
:
1.7.6
appVersion
:
1.7.6
description
:
Scalable datastore for metrics, events, and real-time analytics.
description
:
Scalable datastore for metrics, events, and real-time analytics.
keywords
:
keywords
:
...
...
stable/influxdb/templates/backup-cronjob.yaml
View file @
2fdf877c
...
@@ -25,12 +25,14 @@ spec:
...
@@ -25,12 +25,14 @@ spec:
volumes
:
volumes
:
-
name
:
backups
-
name
:
backups
emptyDir
:
{}
emptyDir
:
{}
{{
- if and .Values.backup.gcs
}}
-
name
:
google-cloud-key
-
name
:
google-cloud-key
secret
:
secret
:
secretName
:
{{
.Values.backup.gcs.serviceAccountSecret | quote
}}
secretName
:
{{
.Values.backup.gcs.serviceAccountSecret | quote
}}
{{
- end
}}
initContainers
:
initContainers
:
-
name
:
influxdb-backup
-
name
:
influxdb-backup
image
:
"
{{
.Values.image.repo
}}:{{
.Values.image.tag
}}"
image
:
"
{{
.Values.image.repo
sitory
}}:{{
.Values.image.tag
}}"
volumeMounts
:
volumeMounts
:
-
name
:
backups
-
name
:
backups
mountPath
:
/backups
mountPath
:
/backups
...
@@ -41,6 +43,7 @@ spec:
...
@@ -41,6 +43,7 @@ spec:
-
|
-
|
influxd backup -host {{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address }} -portable /backups/backup_$(date +%Y%m%d_%H%M%S)
influxd backup -host {{ template "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address }} -portable /backups/backup_$(date +%Y%m%d_%H%M%S)
containers
:
containers
:
{{
- if .Values.backup.gcs
}}
-
name
:
gsutil-cp
-
name
:
gsutil-cp
image
:
google/cloud-sdk:alpine
image
:
google/cloud-sdk:alpine
command
:
command
:
...
@@ -59,7 +62,34 @@ spec:
...
@@ -59,7 +62,34 @@ spec:
-
name
:
SRC_URL
-
name
:
SRC_URL
value
:
/backups
value
:
/backups
-
name
:
DST_URL
-
name
:
DST_URL
value
:
{{
.Values.backup.destination
}}
value
:
{{
.Values.
gcs.
backup.destination
}}
-
name
:
KEY_FILE
-
name
:
KEY_FILE
value
:
/var/secrets/google/key.json
value
:
/var/secrets/google/key.json
{{
- end
}}
{{
- if .Values.backup.azure
}}
-
name
:
azure-cli
image
:
microsoft/azure-cli
command
:
-
/bin/sh
args
:
-
'
-c'
-
|
az storage container create --name "$DST_CONTAINER"
az storage blob upload-batch --destination "$DST_CONTAINER" --destination-path "$DST_PATH" --source "$SRC_URL"
volumeMounts
:
-
name
:
backups
mountPath
:
/backups
env
:
-
name
:
SRC_URL
value
:
/backups
-
name
:
DST_CONTAINER
value
:
{{
.Values.backup.azure.destination_container
}}
-
name
:
DST_PATH
value
:
{{
.Values.backup.azure.destination_path
}}
-
name
:
AZURE_STORAGE_CONNECTION_STRING
valueFrom
:
secretKeyRef
:
name
:
{{
.Values.backup.azure.storageAccountSecret
}}
key
:
connection-string
{{
- end
}}
{{
- end
}}
{{
- end
}}
stable/influxdb/values.yaml
View file @
2fdf877c
...
@@ -280,7 +280,17 @@ backup:
...
@@ -280,7 +280,17 @@ backup:
enabled
:
false
enabled
:
false
schedule
:
"
0
0
*
*
*"
schedule
:
"
0
0
*
*
*"
annotations
:
{}
annotations
:
{}
destination
:
gs://bucket/influxdb
# Google Cloud Storage
## Google Cloud Storage
gcs
:
## Secret is expected to have key stored in `key.json` field
serviceAccountSecret
:
influxdb-backup-key
# gcs:
# serviceAccountSecret: influxdb-backup-key
# destination: gs://bucket/influxdb
## Azure
## Secret is expected to have connection string stored in `connection-string` field
## Existing container will be used or private one withing storage account will be created.
# azure:
# storageAccountSecret: influxdb-backup-azure-key
# destination_container: influxdb-container
# destination_path: ""
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