Commit Graph

3 Commits (6c236d061f478f879ab02544495cc1e62c9daeed)

Author SHA1 Message Date
Brad Davidson 6c236d061f Move core/v1 mock into tests package for reuse
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8f8cfb56b5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson 97df5ce8d2 Fix race condition when multiple nodes reconcile S3 snapshots
Don't delete s3 etcdsnapshotfiles if they are missing from s3 but less than a minute old, its possible the other node just finished uploading it and the object key has not yet become visible.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 0826ebc142)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-10-10 11:40:39 -07:00
Brad Davidson bcaa63929f Add etcd s3 config secret implementation
* Move snapshot structs and functions into pkg/etcd/snapshot
* Move s3 client code and functions into pkg/etcd/s3
* Refactor pkg/etcd to track snapshot and s3 moves
* Add support for reading s3 client config from secret
* Add minio client cache, since S3 client configuration can now be
  changed at runtime by modifying the secret, and don't want to have to
  create a new minio client every time we read config.
* Add tests for pkg/etcd/s3

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c36db53e54)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2024-07-15 10:14:20 -07:00