0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-02-17 23:45:36 -05:00
zot/pkg/api
Andrei Aaron 05823cd74f
redis driver for blob cache information and metadb (#2865)
* feat: add redis cache support

https://github.com/project-zot/zot/pull/2005
Fixes https://github.com/project-zot/zot/issues/2004

* feat: add redis cache support

Currently, we have dynamoDB as the remote shared cache but ideal only
for the cloud use case.
For on-prem use case, add support for redis.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* feat(redis): added blackbox tests for redis

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>

* feat(redis): dummy implementation of MetaDB interface for redis cache

Signed-off-by: Alexei Dodon <adodon@cisco.com>

* feat: check validity of driver configuration on metadb instantiation

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat: multiple fixes for redis cache driver implementation

- add missing method GetAllBlobs
- add redis cache tests, with and without mocking

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): redis implementation for MetaDB

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): use redsync to block concurrent write access to the redis DB

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): update .github/workflows/cluster.yaml to also test redis

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(metadb): add keyPrefix parameter for redis and remove unneeded method meta.Crate()

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): support RedisCluster configuration and add unit tests

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): more tests for redis metadb implementation

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): add more examples and update examples/README.md

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): move option parsing and redis client initialization under pkg/api/config/redis

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* chore(cachedb): move Cache interface to pkg/storage/types

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): reorganize code in pkg/storage/cache.go

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): call redis.SetLogger() with the zot logger as parameter

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* feat(redis): rename pkg/meta/redisdb to pkg/meta/redis

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
Signed-off-by: Alexei Dodon <adodon@cisco.com>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: a <a@tuxpa.in>
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com>
Co-authored-by: Petu Eusebiu <peusebiu@cisco.com>
Co-authored-by: Alexei Dodon <adodon@cisco.com>
2025-01-30 11:00:52 -08:00
..
config redis driver for blob cache information and metadb (#2865) 2025-01-30 11:00:52 -08:00
constants feat(cluster): Add support for request proxying for scale out (#2385) 2024-05-20 09:05:21 -07:00
errors refactor: rename go module from zotregistry.io/zot to zotregistry.dev/zot (#2187) 2024-01-31 20:34:07 -08:00
authn.go chore: update go.mod deps (#2609) 2024-08-13 11:28:51 -07:00
authn_test.go feat: add support for docker images (#2714) 2024-10-31 09:44:04 +02:00
authz.go Catalog content discovery (#2782) 2024-12-19 09:38:35 -08:00
controller.go build: migrate to golang 1.23.x (#2701) 2024-11-08 08:58:55 -08:00
controller_test.go redis driver for blob cache information and metadb (#2865) 2025-01-30 11:00:52 -08:00
cookiestore.go fix(authn): make hashing/encryption keys used to secure cookies (#2536) 2024-08-12 15:11:53 -07:00
ldap.go build: migrate to golang 1.23.x (#2701) 2024-11-08 08:58:55 -08:00
proxy.go feat(sync): support for periodic repo sync in scale-out cluster (#2424) 2024-05-31 09:25:34 -07:00
proxy_test.go feat(cluster): Add support for request proxying for scale out (#2385) 2024-05-20 09:05:21 -07:00
recovery.go refactor: rename go module from zotregistry.io/zot to zotregistry.dev/zot (#2187) 2024-01-31 20:34:07 -08:00
routes.go Catalog content discovery (#2782) 2024-12-19 09:38:35 -08:00
routes_test.go Catalog content discovery (#2782) 2024-12-19 09:38:35 -08:00
session.go chore: update go.mod deps (#2609) 2024-08-13 11:28:51 -07:00