Skip to content

Commit 543a02b

Browse files
Add storage test connection
1 parent 333b589 commit 543a02b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

chart/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ This chart deploys the following components:
3737
- Redis metrics via redis-exporter sidecar
3838
- Optional ServiceMonitor for Prometheus Operator
3939
- Health checks (`/ping`, `/health`)
40-
- Role-based authentication (reader/writer roles)
4140
- Optional Reposilite dependency proxy
4241
- Kubernetes recommended labels (`app.kubernetes.io/*`)
4342

@@ -185,7 +184,6 @@ Changes:
185184
- MinIO StatefulSet replaced with Redis Deployment
186185
- Redis exporter sidecar for Prometheus metrics
187186
- Helm labels updated to `app.kubernetes.io/*` standard
188-
- Reader/writer role-based authentication
189187

190188
Migration steps:
191189
1. Cache data cannot be migrated — the cache will start cold

src/internal/storage/redis.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ func NewRedisStorage(cfg RedisConfig) (*RedisStorage, error) {
2525
Password: cfg.Password,
2626
DB: 0,
2727
})
28-
return &RedisStorage{client: client}, nil
28+
storage := &RedisStorage{client: client}
29+
30+
// Test connection
31+
if err := storage.Ping(context.Background()); err != nil {
32+
return nil, fmt.Errorf("failed to connect to Redis: %w", err)
33+
}
34+
return storage, nil
2935
}
3036

3137
func (s *RedisStorage) redisKey(key string) string {

0 commit comments

Comments
 (0)