Skip to content

Commit

Permalink
Allow overwriting secret key via SecretTransformation (#23)
Browse files Browse the repository at this point in the history
Signed-off-by: hossainemruz <[email protected]>
  • Loading branch information
hossainemruz authored and tamalsaha committed Jun 14, 2020
1 parent f223f71 commit 40f7aa5
Show file tree
Hide file tree
Showing 202 changed files with 17,040 additions and 90,225 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6
kmodules.xyz/client-go v0.0.0-20200525195850-2fd180961371
kmodules.xyz/crd-schema-fuzz v0.0.0-20200521005638-2433a187de95
kmodules.xyz/custom-resources v0.0.0-20200525205248-56eeb11ebcf3
kmodules.xyz/custom-resources v0.0.0-20200604135349-9e9f5c4fdba9
kmodules.xyz/offshoot-api v0.0.0-20200521035628-e135bf07b226
sigs.k8s.io/yaml v1.2.0
stash.appscode.dev/apimachinery v0.10.0-alpha.0
Expand Down
46 changes: 44 additions & 2 deletions go.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ func (opt *esOptions) backupElasticsearch() (*restic.BackupOutput, error) {
return nil, err
}

// transform secret
err = appBinding.TransformSecret(opt.kubeClient, appBindingSecret.Data)
if err != nil {
return nil, err
}

// clear directory before running multielasticdump
log.Infoln("Cleaning up directory: ", opt.interimDataDir)
if err := clearDir(opt.interimDataDir); err != nil {
Expand Down
6 changes: 6 additions & 0 deletions pkg/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ func (opt *esOptions) restoreElasticsearch() (*restic.RestoreOutput, error) {
return nil, err
}

// transform secret
err = appBinding.TransformSecret(opt.kubeClient, appBindingSecret.Data)
if err != nil {
return nil, err
}

// clear directory before running multielasticdump
log.Infoln("Cleaning up directory: ", opt.interimDataDir)
if err := clearDir(opt.interimDataDir); err != nil {
Expand Down
83 changes: 61 additions & 22 deletions vendor/github.com/google/go-cmp/cmp/compare.go

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

4 changes: 2 additions & 2 deletions vendor/github.com/google/go-cmp/cmp/export_panic.go

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

6 changes: 4 additions & 2 deletions vendor/github.com/google/go-cmp/cmp/export_unsafe.go

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

55 changes: 40 additions & 15 deletions vendor/github.com/google/go-cmp/cmp/options.go

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

Loading

0 comments on commit 40f7aa5

Please sign in to comment.