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

Implement etcd-backup-restore on OSS of Alicloud #108

Merged
merged 1 commit into from
Feb 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ A clear and concise description of what you expected to happen.
**Environment (please complete the following information):**
- Etcd version/commit ID :
- Etcd-backup-restore version/commit ID:
- Cloud Provider [All/AWS/GCS/ABS/Swift]:
- Cloud Provider [All/AWS/GCS/ABS/Swift/OSS]:

**Anything else we need to know?**:
104 changes: 58 additions & 46 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ required = ["github.com/coreos/bbolt"]
name = "github.com/prometheus/client_golang"
version = "0.9.2"

[[constraint]]
name = "github.com/aliyun/aliyun-oss-go-sdk"
version = "1.9.4"

[[override]]
name = "gopkg.in/fsnotify.v1"
source = "https://github.com/fsnotify/fsnotify.git"
source = "https://github.com/fsnotify/fsnotify.git"

[[override]]
name = "github.com/ugorji/go"
revision = "b4c50a2b199d93b13dc15e78929cfb23bfdf21ab"
4 changes: 4 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ https://github.com/gophercloud/gophercloud.
Copyright 2012-2013 Rackspace, Inc.
Apache 2 license (https://github.com/gophercloud/gophercloud/blob/master/LICENSE)

Alibaba Cloud OSS SDK for Go.
https://github.com/aliyun/aliyun-oss-go-sdk.
Copyright 2019 The Alibaba Cloud Authors
Apache 2 license (https://github.com/aliyun/aliyun-oss-go-sdk/blob/master/README.md)

Prometheus instrumentation library for Go applications.
https://github.com/prometheus/client_golang.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Please find the design doc [here](doc/design.md).

## Usage

You can follow the `help` flag on `etcdbrctl` command and its sub-commands to know the usage details. Some of the common use cases are mentioned below. Although examples below uses AWS S3 as storage provider, we have added support for AWS, GCS, Azure and Openstack swift object store. It also supports local disk as storage provider.
You can follow the `help` flag on `etcdbrctl` command and its sub-commands to know the usage details. Some of the common use cases are mentioned below. Although examples below uses AWS S3 as storage provider, we have added support for AWS, GCS, Azure, Openstack swift and Alicloud OSS object store. It also supports local disk as storage provider.

### Cloud Provider Credentials

Expand All @@ -129,6 +129,8 @@ For `Azure Blob storage`, `STORAGE_ACCOUNT` and `STORAGE_KEY` should be made ava

For `Openstack Swift`, `OS_USERNAME`, `OS_PASSWORD`, `OS_AUTH_URL`, `OS_TENANT_ID` and `OS_DOMAIN_ID` should be made available as environment variables.

For `Alicloud OSS`, `ALICLOUD_ENDPOINT`, `ALICLOUD_ACCESS_KEY_ID`, `ALICLOUD_ACCESS_KEY_SECRET` should be made available as environment variables.

### Taking scheduled snapshot


Expand Down
22 changes: 21 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ backup:
# mentions the policy for garbage collecting old backups. Allowed values are Exponential(default), LimtBased.
garbageCollectionPolicy: Exponential

storageProvider: "Local" # Abs,Gcs,S3,Swift empty means no backup,
storageProvider: "Local" # Abs,Gcs,S3,Swift,Oss empty means no backup,

backupSecret: etcd-backup

Expand Down Expand Up @@ -58,6 +58,26 @@ tls:
# podAnnotations will be placed to the resulting etcd pod
podAnnotations: {}

# Alicloud OSS storage configuration
# Note: No volumeMounts needed
# storageProvider: "OSS"
# env:
# - name: "ALICLOUD_ENDPOINT"
# valueFrom:
# secretKeyRef:
# name: etcd-backup
# key: "storageEndpoint"
# - name: "ALICLOUD_ACCESS_KEY_ID"
# valueFrom:
# secretKeyRef:
# name: etcd-backup
# key: "accessKeyID"
# - name: "ALICLOUD_ACCESS_KEY_SECRET"
# valueFrom:
# secretKeyRef:
# name: etcd-backup
# key: "accessKeySecret"

# Aws S3 storage configuration
# Note: No volumeMounts variable needed
# storageProvider: "S3"
Expand Down
Loading