Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support backup to gcs #1127

Merged
merged 7 commits into from
Nov 12, 2019
Merged

Conversation

onlymellb
Copy link
Contributor

What problem does this PR solve?

resolve #1039

What is changed and how does it work?

  1. create the gcs-secret in backup namespace
kubectl create secret generic gcs-secret --from-file=credentials=./google-credentials.json -n test1
  1. create the backupSchedule using gcs for backend storage
kubectl apply -f manifests/backup/backup-schedule-gcs.yaml

Check List

Tests

  • Manual test (add detailed scripts or steps below)

List all backup objects for backupSchedule

$ kubectl get bk -n test1
NAME                                            STORAGETYPE   BACKUPSIZE   COMMITTS
demo1-backup-schedule-gcs-2019-11-12t04-34-00   gcs           541          412492299590696963
demo1-backup-schedule-gcs-2019-11-12t04-36-00   gcs           540          412492331074191362
demo1-backup-schedule-gcs-2019-11-12t04-38-00   gcs           541          412492362072719363
demo1-backup-schedule-gcs-2019-11-12t04-40-00   gcs           540          412492393622011908

List all backup files from gcs

$ rclone ls gcs:test1-demo1
      541 backup-2019-11-12T04:34:07Z.tgz
      540 backup-2019-11-12T04:36:07Z.tgz
      541 backup-2019-11-12T04:38:05Z.tgz
      540 backup-2019-11-12T04:40:06Z.tgz

Code changes

  • Has Helm charts change
  • Has Go code change
  • Has CI related scripts change
  • Has documents change

Does this PR introduce a user-facing change?:

Support backup to gcs

@onlymellb onlymellb added enhancement New feature or request cloud/gcp Google Cloud Platform area/backup status/PTAL PR needs to be reviewed labels Nov 12, 2019
@onlymellb onlymellb added this to the v1.1.0 milestone Nov 12, 2019
@onlymellb
Copy link
Contributor Author

/run-e2e-in-kind

@onlymellb
Copy link
Contributor Author

/run-e2e-in-kind

Copy link
Contributor

@shuijing198799 shuijing198799 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REST LGTM

shuijing198799
shuijing198799 previously approved these changes Nov 12, 2019
Copy link
Contributor

@shuijing198799 shuijing198799 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

manifests/backup/backup-schedule-gcs.yaml Outdated Show resolved Hide resolved
manifests/backup/backup-gcs.yaml Outdated Show resolved Hide resolved
pkg/apis/pingcap/v1alpha1/types.go Outdated Show resolved Hide resolved
manifests/crd.yaml Outdated Show resolved Hide resolved
manifests/crd.yaml Outdated Show resolved Hide resolved
pkg/backup/util/util.go Outdated Show resolved Hide resolved
@onlymellb
Copy link
Contributor Author

@tennix @weekface@DanielZhangQD PTAL again

@onlymellb
Copy link
Contributor Author

/run-e2e-in-kind

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@onlymellb onlymellb merged commit f12f92c into pingcap:master Nov 12, 2019
@onlymellb onlymellb deleted the support-backup-to-gcs branch November 12, 2019 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backup cloud/gcp Google Cloud Platform enhancement New feature or request status/PTAL PR needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support backup to GCP gcs and restore from it
5 participants