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

Remove trailing slashes in s3 endpoint configuration #1038

Open
wejdross opened this issue Jan 13, 2025 · 0 comments
Open

Remove trailing slashes in s3 endpoint configuration #1038

wejdross opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@wejdross
Copy link
Contributor

Description

When defining for example Restore job, if our s3 endpoint contain trailing slashes whole restore fails.

Additional Context

No response

Logs

2025-01-13T09:40:14Z    INFO    k8up    Starting k8up…  {"version": "2.11.3", "date": "2024-12-13T15:23:43Z", "commit": "be9529f1242148b614a3d0911e7c655955b2835e", "go_os": "linux", "go_arch": "amd64", "go_version": "go1.23.4", "uid": 65532, "gid": 0}
2025-01-13T09:40:14Z    INFO    k8up.restic     initializing
2025-01-13T09:40:14Z    INFO    k8up.restic     setting up a signal handler
2025-01-13T09:40:14Z    INFO    k8up.restic.restic      using the following restic options      {"options": [""]}
2025-01-13T09:40:14Z    INFO    k8up.restic.restic.RepoInit.command     restic command  {"path": "/usr/local/bin/restic", "args": ["init", "--option", ""]}
2025-01-13T09:40:14Z    INFO    k8up.restic.restic.RepoInit.command     Defining RESTIC_PROGRESS_FPS    {"frequency": 0.016666666666666666}
2025-01-13T09:40:14Z    INFO    k8up.restic.restic.RepoInit.restic.stderr       Fatal: create repository at s3:http://minio-server.minio.svc:9000//hello-testing1-ppb2w-backup failed: client.BucketExists: Bucket name cannot be empty
2025-01-13T09:40:14Z    INFO    k8up.restic.restic.RepoInit.restic.stderr
2025/01/13 09:40:14 unable to start k8up: failed to initialise the restic repository: cmd.Wait() err: 1


### Expected Behavior

regardless of trailing slashes, jobs are working 

### Steps To Reproduce

apiVersion: k8up.io/v1
kind: Restore
metadata:
  name: nextcloud-restore
  namespace: vshn-nextcloud-hello-testing1-ppb2w
spec:
  restoreMethod:
    folder:
      claimName: hello-testing1-ppb2w-nextcloud-nextcloud
  backend:
    repoPasswordSecretRef:
      name: k8up-repository-password
      key: password
    s3:
      endpoint: http://minio-server.minio.svc:9000/ # <<---- here
      bucket: hello-testing1-ppb2w-backup
      accessKeyIDSecretRef:
        name: backup-bucket-credentials
        key: AWS_ACCESS_KEY_ID
      secretAccessKeySecretRef:
        name: backup-bucket-credentials
        key: AWS_SECRET_ACCESS_KEY

### Version of K8up

ghcr.io/k8up-io/k8up:v2.11.3

### Version of Kubernetes

Server Version: v1.29.7

### Distribution of Kubernetes

kind
@wejdross wejdross added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant