Skip to content

feat: replace redis with valkey as cache backend#23157

Merged
chlins merged 2 commits into
goharbor:mainfrom
chlins:feat/valkey
Apr 28, 2026
Merged

feat: replace redis with valkey as cache backend#23157
chlins merged 2 commits into
goharbor:mainfrom
chlins:feat/valkey

Conversation

@chlins

@chlins chlins commented Apr 22, 2026

Copy link
Copy Markdown
Member

Thank you for contributing to Harbor!

Comprehensive Summary of your change

This pull request migrates Harbor's internal caching service from Redis to Valkey. The changes update all relevant build files, Dockerfiles, and configuration templates to replace Redis with Valkey, ensuring Harbor uses Valkey for caching in both runtime and build/test environments.

Key changes include:

Build System and Docker Images:

  • Updated the main Makefile and make/photon/Makefile to remove Redis-related build targets and add Valkey equivalents, including image naming and build logic. All references to redis-photon are replaced with valkey-photon. [1] [2] [3] [4] [5]
  • Added new Dockerfiles for Valkey (make/photon/valkey/Dockerfile, make/photon/valkey/Dockerfile.base) and removed old Redis Dockerfiles (make/photon/redis/Dockerfile, make/photon/redis/Dockerfile.base). Healthcheck scripts and configuration files are also migrated. [1] [2] [3] [4] [5] [6]

Configuration and Templates:

  • Updated Docker Compose templates to use the valkey-photon image instead of redis-photon for the default internal cache service.
  • Updated test compose files to use Valkey for integration testing.

CI/CD and Testing:

  • Modified the nightly Trivy scan workflow to scan the Valkey image instead of Redis.
  • Updated robot test cases to reference the Valkey base image instead of the Redis base image.

These changes ensure Harbor now uses Valkey as its internal cache, fully replacing Redis in both build and runtime environments.

Issue being fixed

Fixes #22935

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@chlins chlins added the release-note/new-feature New Harbor Feature label Apr 22, 2026
@chlins
chlins requested a review from a team as a code owner April 22, 2026 08:30
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.99%. Comparing base (406089a) to head (6e31549).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #23157      +/-   ##
==========================================
- Coverage   66.02%   65.99%   -0.03%     
==========================================
  Files        1074     1074              
  Lines      116793   116793              
  Branches     2955     2955              
==========================================
- Hits        77110    77081      -29     
- Misses      35407    35439      +32     
+ Partials     4276     4273       -3     
Flag Coverage Δ
unittests 65.99% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread make/photon/valkey/Dockerfile
Comment thread make/photon/valkey/Dockerfile.base

@wy65701436 wy65701436 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chlins
chlins enabled auto-merge (squash) April 28, 2026 05:57
@chlins
chlins merged commit 88ab662 into goharbor:main Apr 28, 2026
17 of 18 checks passed
chlins added a commit to chlins/harbor that referenced this pull request May 19, 2026
chlins added a commit to chlins/harbor that referenced this pull request May 19, 2026
chlins added a commit to chlins/harbor that referenced this pull request May 20, 2026
wy65701436 pushed a commit that referenced this pull request May 22, 2026
… (#23261)

feat: replace redis with valkey as cache backend (#23157)

Signed-off-by: chlins <[email protected]>
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 11, 2026
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 23, 2026
Upstream-PR: goharbor/harbor#23157

Upstream-Author: @chlins
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Chlins Zhang <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 23, 2026
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 23, 2026
Upstream-PR: goharbor/harbor#23157

Upstream-Author: @chlins
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Chlins Zhang <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
bupd added a commit to container-registry/harbor-next that referenced this pull request Jun 23, 2026
Upstream-PR: goharbor/harbor#23157

Upstream-Author: @chlins
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Chlins Zhang <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
bupd added a commit to container-registry/harbor-next that referenced this pull request Jul 2, 2026
Upstream-PR: goharbor/harbor#23157

Upstream-Author: @chlins
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Chlins Zhang <[email protected]>
Signed-off-by: Prasanth Baskar <[email protected]>
(cherry picked from commit 8b68b94)
dasomel added a commit to dasomel/harbor that referenced this pull request Jul 5, 2026
…oded matrix

Upstream renamed make/photon/redis to make/photon/valkey between v2.15.1
and v2.15.2 (goharbor#23157), but build-package.yml's matrix was never updated —
a pre-existing bug on main itself, since main's own source tree already
has valkey, not redis. A single static matrix can't build both v2.15.0/
v2.15.1 (redis) and v2.15.2+ (valkey) release_tag checkouts, so the
matrix is now discovered at runtime from whichever source tree is
actually checked out, self-adapting to this rename (and any future one).
dasomel added a commit to dasomel/harbor that referenced this pull request Jul 7, 2026
…ation

- README: add Known Limitations (exporter amd64-only on v2.15.x tags,
  root-caused to upstream GOARCH=amd64 hardcode since v2.2.0; fix goharbor#22311
  is master-only/unreleased) + :latest-tracks-newest-build note +
  redis->valkey (v2.15.2, goharbor#23157) cache-backend note.
- plan doc: correct the false "v2.15.2+ ships multiarch exporter" claim
  (multiarch exporter Dockerfile is fork-main-only, absent from all GA
  tags) and record the 2026-07-07 :latest->v2.15.2 reconciliation run
  (run 28865019658; latest==v2.15.2 verified for all 7 tag-published
  components incl valkey-photon).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
dasomel added a commit to dasomel/harbor that referenced this pull request Jul 7, 2026
…udit gaps

A missing redis-photon:v2.15.2 is expected, not a coverage gap: upstream
replaced Redis with Valkey in v2.15.2 (goharbor#23157), so the internal-cache image
is valkey-photon for v2.15.2+ (multi-arch) and redis-photon only for
v2.15.0/v2.15.1. Auditors should check valkey-photon for v2.15.2+.

- README: strengthen cache-backend note with explicit "expected, not a gap".
- arm64-build-guide: version-scope the redis/valkey component row and add a
  valkey-photon hint to the Helm internal-cache example.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Redis with Valkey

5 participants