Skip to content

Commit 3f2f090

Browse files
Add support for specifying S3 region (#20)
* Add support for specifying S3 region Signed-off-by: hossainemruz <emruz@appscode.com> * Update restic version to 0.9.6 Signed-off-by: hossainemruz <emruz@appscode.com> * Update dependencies Signed-off-by: Tamal Saha <tamal@appscode.com> Co-authored-by: Tamal Saha <tamal@appscode.com>
1 parent 55f007d commit 3f2f090

File tree

522 files changed

+1548
-75477
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

522 files changed

+1548
-75477
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ endif
4545

4646
RESTIC_VER := 0.8.3
4747
# also update in restic wrapper library
48-
NEW_RESTIC_VER := 0.9.5
48+
NEW_RESTIC_VER := 0.9.6
4949

5050
###
5151
### These variables should not need tweaking.

charts/stash-mongodb/templates/mongodb-backup-function.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
- --provider=${REPOSITORY_PROVIDER:=}
1313
- --bucket=${REPOSITORY_BUCKET:=}
1414
- --endpoint=${REPOSITORY_ENDPOINT:=}
15+
- --region=${REPOSITORY_REGION:=}
1516
- --path=${REPOSITORY_PREFIX:=}
1617
- --secret-dir=/etc/repository/secret
1718
- --scratch-dir=/tmp

charts/stash-mongodb/templates/mongodb-restore-function.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
- --provider=${REPOSITORY_PROVIDER:=}
1313
- --bucket=${REPOSITORY_BUCKET:=}
1414
- --endpoint=${REPOSITORY_ENDPOINT:=}
15+
- --region=${REPOSITORY_REGION:=}
1516
- --path=${REPOSITORY_PREFIX:=}
1617
- --secret-dir=/etc/repository/secret
1718
- --scratch-dir=/tmp

cmd/stash-mongodb/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"os"
2121
"runtime"
2222

23+
_ "stash.appscode.dev/apimachinery/client/clientset/versioned/fake"
2324
"stash.appscode.dev/mongodb/pkg"
24-
_ "stash.appscode.dev/stash/client/clientset/versioned/fake"
2525

2626
"github.com/appscode/go/log"
2727
_ "k8s.io/client-go/kubernetes/fake"

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ require (
99
github.com/spf13/cobra v0.0.5
1010
k8s.io/apimachinery v0.16.5-beta.1
1111
k8s.io/client-go v12.0.0+incompatible
12-
kmodules.xyz/client-go v0.0.0-20200108114229-70ba8841e60f
12+
kmodules.xyz/client-go v0.0.0-20200216080917-08714f78f885
1313
kmodules.xyz/custom-resources v0.0.0-20191130062942-f41b54f62419
14-
kubedb.dev/apimachinery v0.13.0-rc.3
15-
stash.appscode.dev/stash v0.9.0-rc.3
14+
kmodules.xyz/offshoot-api v0.0.0-20200216080509-45ee6418d1c1
15+
kubedb.dev/apimachinery v0.13.0-rc.4
16+
stash.appscode.dev/apimachinery v0.9.0-rc.6
1617
)
1718

1819
replace (

go.sum

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
352352
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
353353
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
354354
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
355-
github.com/kubernetes-csi/csi-lib-utils v0.6.1/go.mod h1:GVmlUmxZ+SUjVLXicRFjqWUUvWez0g0Y78zNV9t7KfQ=
356-
github.com/kubernetes-csi/csi-test v2.0.0+incompatible/go.mod h1:YxJ4UiuPWIhMBkxUKY5c267DyA0uDZ/MtAimhx/2TA0=
357-
github.com/kubernetes-csi/external-snapshotter v1.2.1-0.20191220025132-bbbadbc41e30 h1:4bGq2jzoxto8e82aI4kOpAW6/Byi7t9uW1mbi8sohvY=
358-
github.com/kubernetes-csi/external-snapshotter v1.2.1-0.20191220025132-bbbadbc41e30/go.mod h1:e8wfLpCQ7pkF8nDl2rLZKdE9MGjyD365GC/hrnSUEFw=
359355
github.com/kubernetes-incubator/service-catalog v0.2.2/go.mod h1:D0CRODiXUJs6VCZDB15TmCkesbuizkac9fYEiTA78BA=
360356
github.com/kubernetes-sigs/service-catalog v0.2.2/go.mod h1:fmRsWJ38Od93DQ7cOXR9mMSSwmjyDS1EAomWxBlumuo=
361357
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
@@ -444,7 +440,6 @@ github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h
444440
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
445441
github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
446442
github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw=
447-
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
448443
github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs=
449444
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
450445
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
@@ -593,7 +588,6 @@ golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn
593588
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
594589
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
595590
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
596-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
597591
golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
598592
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
599593
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
@@ -654,10 +648,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn
654648
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
655649
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
656650
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
657-
golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
658651
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
659-
gomodules.xyz/cert v1.0.2/go.mod h1:Sg8RWgr+w5FV7IhfQcGQnIApNiGdryamxQqiwkRFQl8=
660-
gomodules.xyz/envsubst v0.1.0/go.mod h1:2o5f7bd13XIITbE2ZKieE05YkqB2KDoZkqKccGebduA=
661652
gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0=
662653
gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU=
663654
gomodules.xyz/stow v0.2.3/go.mod h1:S9/zV1kNAWAvqmdum0oByA4+aNdTdoK9hKb1bObf1BI=
@@ -701,7 +692,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
701692
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
702693
gopkg.in/ini.v1 v1.38.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
703694
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
704-
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
705695
gopkg.in/kothar/go-backblaze.v0 v0.0.0-20190520213052-702d4e7eb465/go.mod h1:zJ2QpyDCYo1KvLXlmdnFlQAyF/Qfth0fB8239Qg7BIE=
706696
gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U=
707697
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
@@ -738,7 +728,6 @@ k8s.io/cloud-provider v0.0.0-20191114112024-4bbba8331835/go.mod h1:pYZm7Z5Trmx0W
738728
k8s.io/cluster-bootstrap v0.0.0-20191114111741-81bb9acf592d/go.mod h1:aM+TjO9utrBlfoItHUKK0oq1ujltsbSJ2FgTSrLq18w=
739729
k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=
740730
k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY=
741-
k8s.io/code-generator v0.0.0-20191121015212-c4c8f8345c7e/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
742731
k8s.io/component-base v0.0.0-20191114102325-35a9586014f7/go.mod h1:9rNMvrwbqPF4MxI+VQYETrWqMKxi8yAd8YZLdSJ9EDw=
743732
k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q=
744733
k8s.io/csi-translation-lib v0.0.0-20191114112310-0da609c4ca2d/go.mod h1:riElKBGzYzpYyINM3HozPTu1pscTbTdYW0N3Tg/U2ts=
@@ -763,27 +752,30 @@ k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLK
763752
k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
764753
kmodules.xyz/client-go v0.0.0-20191127054604-26981530831d/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
765754
kmodules.xyz/client-go v0.0.0-20191211192817-f1dcd02124ba/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
766-
kmodules.xyz/client-go v0.0.0-20200105092743-4b797c0c0802/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
767-
kmodules.xyz/client-go v0.0.0-20200108114229-70ba8841e60f h1:5ESkNkJbL/oqn82REmxuQUm4WKVFZeuU3P4mEvI24JM=
768-
kmodules.xyz/client-go v0.0.0-20200108114229-70ba8841e60f/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
755+
kmodules.xyz/client-go v0.0.0-20200116162153-e083ae16abca h1:WErv3VRRePgp4oszIHgrFnxIaIHyfP9+930B99B8BBM=
756+
kmodules.xyz/client-go v0.0.0-20200116162153-e083ae16abca/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
757+
kmodules.xyz/client-go v0.0.0-20200216080917-08714f78f885 h1:1v803gTRPSfjMYwW3YXoxs36gQ9YVe/1qWixPfLZ6bM=
758+
kmodules.xyz/client-go v0.0.0-20200216080917-08714f78f885/go.mod h1:OFxuKCiVR+MYlR2a08FkfaF+IbXkLe0xBetu2LTUuGI=
769759
kmodules.xyz/constants v0.0.0-20191024095500-cd4313df4aa6/go.mod h1:DbiFk1bJ1KEO94t1SlAn7tzc+Zz95rSXgyUKa2nzPmY=
770760
kmodules.xyz/crd-schema-fuzz v0.0.0-20191129174258-81f984340891/go.mod h1:9NXNZ4xhqof0WngtIuo4vl+WoCQpLJEJcyuEo3mPpiM=
771761
kmodules.xyz/custom-resources v0.0.0-20191130062942-f41b54f62419 h1:o6KD8XMxdyRR3rqScTsWvcufFDT7vQBnYXpHUp6UtRg=
772762
kmodules.xyz/custom-resources v0.0.0-20191130062942-f41b54f62419/go.mod h1:EksiAQK3p3bVU5cNBjLT0z5V7er1tvWLBWILTuf6G/0=
773-
kmodules.xyz/monitoring-agent-api v0.0.0-20191224204126-ee69caffab6c/go.mod h1:q5Adit2fxEoY1jSkYiK1t856Ombl8cunYJBmgL43wwc=
774-
kmodules.xyz/objectstore-api v0.0.0-20191127144749-5881939b57f0 h1:ilgkGU/bteKRvH99piXxU8b2c1E9lwxb0sDpLLhy4iY=
775-
kmodules.xyz/objectstore-api v0.0.0-20191127144749-5881939b57f0/go.mod h1:AE1rz+T/3dlUwH5pLgCNghWeeFfeVBnBXKJVpsLHlmc=
776-
kmodules.xyz/offshoot-api v0.0.0-20200103145223-2c4f520520d2 h1:c/wxNy8KgaS8v/htruqtL0YgrKciUKroK1zXPVZHuqg=
777-
kmodules.xyz/offshoot-api v0.0.0-20200103145223-2c4f520520d2/go.mod h1:k1M+OOFHbMeS6N6OB2j9smKfMCyQOEQjZ3SLZ/KSe+w=
763+
kmodules.xyz/monitoring-agent-api v0.0.0-20200125202117-d3b3e33ce41f/go.mod h1:q5Adit2fxEoY1jSkYiK1t856Ombl8cunYJBmgL43wwc=
764+
kmodules.xyz/objectstore-api v0.0.0-20200213071506-f176860e67f7 h1:b2ahs7RkOilWVsXHgx/t44FhL8xdbB0r2/W1Jf62Il8=
765+
kmodules.xyz/objectstore-api v0.0.0-20200213071506-f176860e67f7/go.mod h1:AE1rz+T/3dlUwH5pLgCNghWeeFfeVBnBXKJVpsLHlmc=
766+
kmodules.xyz/objectstore-api v0.0.0-20200214040336-fe8f39a4210d h1:NuVvPLZ7vR5KK/ETzRQFpYC33Oa4AcLcuId59PXCysQ=
767+
kmodules.xyz/objectstore-api v0.0.0-20200214040336-fe8f39a4210d/go.mod h1:AE1rz+T/3dlUwH5pLgCNghWeeFfeVBnBXKJVpsLHlmc=
768+
kmodules.xyz/offshoot-api v0.0.0-20200207061254-705ac16690ec h1:JdgvQhxyFXnxInPK42R3saSBjkhiiy8k5Uc9UdneVqE=
769+
kmodules.xyz/offshoot-api v0.0.0-20200207061254-705ac16690ec/go.mod h1:k1M+OOFHbMeS6N6OB2j9smKfMCyQOEQjZ3SLZ/KSe+w=
770+
kmodules.xyz/offshoot-api v0.0.0-20200216080509-45ee6418d1c1 h1:4ZXeBIppt2MlDPrFayUx1KIgBHJT+bHTP2FJrUhLEWI=
771+
kmodules.xyz/offshoot-api v0.0.0-20200216080509-45ee6418d1c1/go.mod h1:k1M+OOFHbMeS6N6OB2j9smKfMCyQOEQjZ3SLZ/KSe+w=
778772
kmodules.xyz/openshift v0.0.0-20191127054841-113eeb13704f/go.mod h1:de9+Zk2+wtGhRmGFBZ9T4+0lJZr4rHXW0dHffCaeO+g=
779-
kmodules.xyz/openshift v0.0.0-20191127145035-f6c48a90dbb7 h1:9PImU28r8bt+QoW7FkYbJ+prsZSNtwctLeXJj3wJK5U=
780-
kmodules.xyz/openshift v0.0.0-20191127145035-f6c48a90dbb7/go.mod h1:de9+Zk2+wtGhRmGFBZ9T4+0lJZr4rHXW0dHffCaeO+g=
781773
kmodules.xyz/prober v0.0.0-20191216013129-7c91e2b0edb2 h1:wxHidC0FZfaHTRG8ADG9qdxTBHXGUJylWEsTV/m/6Rg=
782774
kmodules.xyz/prober v0.0.0-20191216013129-7c91e2b0edb2/go.mod h1:YdapXw+AMO1U/yYZloDA0dTiha89Rv1iqK05Jh7qQQY=
783775
kmodules.xyz/webhook-runtime v0.0.0-20191127075323-d4bfdee6974d h1:qLWf0Xk2sAWT9qWBcodkinrzt0jkYTKhuHCsbwpXutE=
784776
kmodules.xyz/webhook-runtime v0.0.0-20191127075323-d4bfdee6974d/go.mod h1:aaaxyAmKOpw0ey3LrpBkqWq0LTl35f9PW6mhwVDBMow=
785-
kubedb.dev/apimachinery v0.13.0-rc.3 h1:kHojeCeGqCl3zM/QHq8lghUK2tyQB5Q7oCopgA7w5SM=
786-
kubedb.dev/apimachinery v0.13.0-rc.3/go.mod h1:E7vyf5egSHPkJtCXStcIOz85AiSHB1NffLNXMI3VSiU=
777+
kubedb.dev/apimachinery v0.13.0-rc.4 h1:NgFdT8nsKUmx0ez4lpFdqRL43bYEwN/iMTQQrflNJvU=
778+
kubedb.dev/apimachinery v0.13.0-rc.4/go.mod h1:YYIkCWfehcb/qR/oHz6nRo7t8nOiGgjel1df4t/6qgI=
787779
launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM=
788780
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
789781
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
@@ -799,6 +791,6 @@ sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9
799791
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
800792
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
801793
software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1:/xvNRWUqm0+/ZMiF4EX00vrSCMsE4/NHb+Pt3freEeQ=
802-
stash.appscode.dev/stash v0.9.0-rc.3 h1:31g/AeYfZwayvynNh72kqRCUzson9kj3YRnrI2V9rPs=
803-
stash.appscode.dev/stash v0.9.0-rc.3/go.mod h1:2oNiS7Vg3PKZxT6u2Q1+etbTEPNFOpR0/hx1kxnGVOU=
794+
stash.appscode.dev/apimachinery v0.9.0-rc.6 h1:rYp77PiYd05HwAtqbhVJFvmeGRZzcbOOMr6Pmh3zKKw=
795+
stash.appscode.dev/apimachinery v0.9.0-rc.6/go.mod h1:jLzf4kBtDJ1VeMuHm6PGPCR6is2cCfMO62FMrOwcig4=
804796
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=

pkg/backup.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ import (
2828
"syscall"
2929
"time"
3030

31-
"stash.appscode.dev/stash/apis"
32-
api_v1beta1 "stash.appscode.dev/stash/apis/stash/v1beta1"
33-
stash_cs "stash.appscode.dev/stash/client/clientset/versioned"
34-
stash_cs_util "stash.appscode.dev/stash/client/clientset/versioned/typed/stash/v1beta1/util"
35-
"stash.appscode.dev/stash/pkg/restic"
36-
"stash.appscode.dev/stash/pkg/util"
31+
"stash.appscode.dev/apimachinery/apis"
32+
api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1"
33+
stash_cs "stash.appscode.dev/apimachinery/client/clientset/versioned"
34+
stash_cs_util "stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util"
35+
"stash.appscode.dev/apimachinery/pkg/restic"
3736

3837
"github.com/appscode/go/flags"
3938
"github.com/appscode/go/log"
@@ -46,6 +45,7 @@ import (
4645
"k8s.io/client-go/kubernetes"
4746
"k8s.io/client-go/tools/clientcmd"
4847
appcatalog_cs "kmodules.xyz/custom-resources/client/clientset/versioned"
48+
v1 "kmodules.xyz/offshoot-api/api/v1"
4949
"kubedb.dev/apimachinery/apis/config/v1alpha1"
5050
)
5151

@@ -153,6 +153,7 @@ func NewCmdBackup() *cobra.Command {
153153
cmd.Flags().StringVar(&opt.setupOptions.Provider, "provider", opt.setupOptions.Provider, "Backend provider (i.e. gcs, s3, azure etc)")
154154
cmd.Flags().StringVar(&opt.setupOptions.Bucket, "bucket", opt.setupOptions.Bucket, "Name of the cloud bucket/container (keep empty for local backend)")
155155
cmd.Flags().StringVar(&opt.setupOptions.Endpoint, "endpoint", opt.setupOptions.Endpoint, "Endpoint for s3/s3 compatible backend or REST server URL")
156+
cmd.Flags().StringVar(&opt.setupOptions.Region, "region", opt.setupOptions.Region, "Region for s3/s3 compatible backend")
156157
cmd.Flags().StringVar(&opt.setupOptions.Path, "path", opt.setupOptions.Path, "Directory inside the bucket where backup will be stored")
157158
cmd.Flags().StringVar(&opt.setupOptions.SecretDir, "secret-dir", opt.setupOptions.SecretDir, "Directory where storage secret has been mounted")
158159
cmd.Flags().StringVar(&opt.setupOptions.ScratchDir, "scratch-dir", opt.setupOptions.ScratchDir, "Temporary directory")
@@ -179,11 +180,11 @@ func NewCmdBackup() *cobra.Command {
179180
func (opt *mongoOptions) backupMongoDB() (*restic.BackupOutput, error) {
180181
// apply nice, ionice settings from env
181182
var err error
182-
opt.setupOptions.Nice, err = util.NiceSettingsFromEnv()
183+
opt.setupOptions.Nice, err = v1.NiceSettingsFromEnv()
183184
if err != nil {
184185
return nil, err
185186
}
186-
opt.setupOptions.IONice, err = util.IONiceSettingsFromEnv()
187+
opt.setupOptions.IONice, err = v1.IONiceSettingsFromEnv()
187188
if err != nil {
188189
return nil, err
189190
}

pkg/restore.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ import (
2424
"path/filepath"
2525
"strings"
2626

27-
api_v1beta1 "stash.appscode.dev/stash/apis/stash/v1beta1"
28-
stash_cs "stash.appscode.dev/stash/client/clientset/versioned"
29-
stash_cs_util "stash.appscode.dev/stash/client/clientset/versioned/typed/stash/v1beta1/util"
30-
"stash.appscode.dev/stash/pkg/restic"
31-
"stash.appscode.dev/stash/pkg/util"
27+
api_v1beta1 "stash.appscode.dev/apimachinery/apis/stash/v1beta1"
28+
stash_cs "stash.appscode.dev/apimachinery/client/clientset/versioned"
29+
stash_cs_util "stash.appscode.dev/apimachinery/client/clientset/versioned/typed/stash/v1beta1/util"
30+
"stash.appscode.dev/apimachinery/pkg/restic"
3231

3332
"github.com/appscode/go/flags"
3433
"github.com/appscode/go/log"
@@ -40,6 +39,7 @@ import (
4039
"k8s.io/client-go/kubernetes"
4140
"k8s.io/client-go/tools/clientcmd"
4241
appcatalog_cs "kmodules.xyz/custom-resources/client/clientset/versioned"
42+
v1 "kmodules.xyz/offshoot-api/api/v1"
4343
"kubedb.dev/apimachinery/apis/config/v1alpha1"
4444
)
4545

@@ -118,6 +118,7 @@ func NewCmdRestore() *cobra.Command {
118118
cmd.Flags().StringVar(&opt.setupOptions.Provider, "provider", opt.setupOptions.Provider, "Backend provider (i.e. gcs, s3, azure etc)")
119119
cmd.Flags().StringVar(&opt.setupOptions.Bucket, "bucket", opt.setupOptions.Bucket, "Name of the cloud bucket/container (keep empty for local backend)")
120120
cmd.Flags().StringVar(&opt.setupOptions.Endpoint, "endpoint", opt.setupOptions.Endpoint, "Endpoint for s3/s3 compatible backend or REST server URL")
121+
cmd.Flags().StringVar(&opt.setupOptions.Region, "region", opt.setupOptions.Region, "Region for s3/s3 compatible backend")
121122
cmd.Flags().StringVar(&opt.setupOptions.Path, "path", opt.setupOptions.Path, "Directory inside the bucket where backup will be stored")
122123
cmd.Flags().StringVar(&opt.setupOptions.SecretDir, "secret-dir", opt.setupOptions.SecretDir, "Directory where storage secret has been mounted")
123124
cmd.Flags().StringVar(&opt.setupOptions.ScratchDir, "scratch-dir", opt.setupOptions.ScratchDir, "Temporary directory")
@@ -136,11 +137,11 @@ func NewCmdRestore() *cobra.Command {
136137
func (opt *mongoOptions) restoreMongoDB() (*restic.RestoreOutput, error) {
137138
// apply nice, ionice settings from env
138139
var err error
139-
opt.setupOptions.Nice, err = util.NiceSettingsFromEnv()
140+
opt.setupOptions.Nice, err = v1.NiceSettingsFromEnv()
140141
if err != nil {
141142
return nil, err
142143
}
143-
opt.setupOptions.IONice, err = util.IONiceSettingsFromEnv()
144+
opt.setupOptions.IONice, err = v1.IONiceSettingsFromEnv()
144145
if err != nil {
145146
return nil, err
146147
}

pkg/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ package pkg
1919
import (
2020
"flag"
2121

22-
"stash.appscode.dev/stash/client/clientset/versioned/scheme"
23-
"stash.appscode.dev/stash/pkg/util"
22+
"stash.appscode.dev/apimachinery/client/clientset/versioned/scheme"
2423

2524
"github.com/appscode/go/flags"
2625
v "github.com/appscode/go/version"
2726
"github.com/spf13/cobra"
2827
clientsetscheme "k8s.io/client-go/kubernetes/scheme"
2928
"kmodules.xyz/client-go/logs"
3029
"kmodules.xyz/client-go/tools/cli"
30+
"kmodules.xyz/client-go/tools/pushgateway"
3131
)
3232

3333
func NewRootCmd() *cobra.Command {
@@ -45,7 +45,7 @@ func NewRootCmd() *cobra.Command {
4545
}
4646
rootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
4747
logs.ParseFlags()
48-
rootCmd.PersistentFlags().StringVar(&util.ServiceName, "service-name", "stash-operator", "Stash service name.")
48+
rootCmd.PersistentFlags().StringVar(&pushgateway.ServiceName, "service-name", "stash-operator", "Stash service name.")
4949
rootCmd.PersistentFlags().BoolVar(&cli.EnableAnalytics, "enable-analytics", cli.EnableAnalytics, "Send analytical events to Google Analytics")
5050

5151
rootCmd.AddCommand(v.NewCmdVersion())

pkg/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"strings"
2323
"time"
2424

25-
stash_cs "stash.appscode.dev/stash/client/clientset/versioned"
26-
"stash.appscode.dev/stash/pkg/restic"
25+
stash_cs "stash.appscode.dev/apimachinery/client/clientset/versioned"
26+
"stash.appscode.dev/apimachinery/pkg/restic"
2727

2828
"github.com/appscode/go/log"
2929
"k8s.io/apimachinery/pkg/util/sets"

0 commit comments

Comments
 (0)