Skip to content

Commit

Permalink
Merge pull request #868 from k8up-io/fix/archive_backend
Browse files Browse the repository at this point in the history
Don't drop the backend configuration for archives
  • Loading branch information
Kidswiss authored Aug 7, 2023
2 parents 4abacf0 + 19d65f5 commit 484a8fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions operator/archivecontroller/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ func (a *ArchiveExecutor) setupEnvVars(ctx context.Context, archive *k8upv1.Arch
}
}

if archive.Spec.Backend != nil {
for key, value := range archive.Spec.Backend.GetCredentialEnv() {
vars.SetEnvVarSource(key, value)
}
vars.SetString(cfg.ResticRepositoryEnvName, archive.Spec.Backend.String())
}

err := vars.Merge(executor.DefaultEnv(a.Obj.GetNamespace()))
if err != nil {
log.Error(err, "error while merging the environment variables", "name", a.Obj.GetName(), "namespace", a.Obj.GetNamespace())
Expand Down

0 comments on commit 484a8fc

Please sign in to comment.