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

Allow disabling redis in registry #1707

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,4 @@ app: "{{ template "harbor.name" . }}"
{{/* Allow KubeVersion to be overridden. */}}
{{- define "harbor.ingress.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}}
{{- end -}}
{{- end -}}
4 changes: 4 additions & 0 deletions templates/registry/registry-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,10 @@ data:
rootdirectory: {{ $storage.oss.rootdirectory }}
{{- end }}
{{- end }}
{{- if .Values.redis.enabledForRegistry }}
cache:
layerinfo: redis
{{- end }}
maintenance:
uploadpurging:
{{- if .Values.registry.upload_purging.enabled }}
Expand All @@ -169,6 +171,7 @@ data:
enabled: true
redirect:
disable: {{ $storage.disableredirect }}
{{- if .Values.redis.enabledForRegistry }}
redis:
addr: {{ template "harbor.redis.addr" . }}
{{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }}
Expand All @@ -185,6 +188,7 @@ data:
maxidle: 100
maxactive: 500
idletimeout: 60s
{{- end }}
http:
addr: :{{ template "harbor.registry.containerPort" . }}
relativeurls: {{ .Values.registry.relativeurls }}
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,11 @@ redis:
# if external Redis is used, set "type" to "external"
# and fill the connection information in "external" section
type: internal
# If redis should be used by the registry.
# The registry has some bugs related to cache invalidation when deleting
# images, see https://github.com/distribution/distribution/issues/4269. If you
# encounter this bug, setting this value to false may help.
enabledForRegistry: true
internal:
image:
repository: goharbor/redis-photon
Expand Down
Loading