-
Notifications
You must be signed in to change notification settings - Fork 72
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
Credentials are not passed along with REST backend #397
Comments
When the REST backend is configured, K8up should create the wrestic pod with |
Closing due to no activity. Please respond if there's still an issue |
Still an issue: Schedule: `backend:
Pod logs: 1.6617079835027344e+09 INFO k8up Starting k8up… {"version": "2.4.0", "date": "2022-07-15T12:46:47Z", "commit": "37fc6af9487af5485d15c8b7608f31627419c1db", "go_os": "linux", "go_arch": "amd64", "go_version": "go1.18.3", "uid": 65532, "gid": 0} |
It looks like the credentials for the rest connection don't need to be passed as env vars at all: https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#rest-server @pczerkas could you please test if it works with If so we'd have to adjust the logic a bit and add it from the secrets to the URL. |
Hey @Kidswiss, |
In k8up/api/v1/backend.go would it need a change like func (in *RestServerSpec) String() string {
protocol, url, _ := strings.Cut(in.URL, "://")
return fmt.Sprintf("rest:%s://%s:%s@%s", protocol, in.UserSecretRef, in.PasswordSecretReg, url)
} ? |
Describe the bug
Using the rest backend, with the
--private-repos
option enabled, it seems that k8up is not correctly passing the credentials.Additional context
I'm using the
--private-repos
, meaning every user has it's own URL. It would be great if k8up appends the username to the URL itself but that might be a feature request. It could be handled within this bug report though as it seems to affect a similar thing.https://github.com/restic/rest-server
Logs & config
Without repo url:
With repo url:
Passing the entire url with basic auth data works:
Backup config:
Expected behavior
The password and user from the secret are actually used to connect to the restic URL. I only want to define the actual URL of the restic instance.
To Reproduce
Steps to reproduce the behavior:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: