mirror of
https://github.com/twuni/docker-registry.helm.git
synced 2026-02-14 12:49:51 +00:00
Merge pull request #164 from Mercbot7/update-garbagecollect-cronjob
Update garbageCollect cronjob
This commit is contained in:
@@ -17,16 +17,26 @@ spec:
|
||||
app: {{ template "docker-registry.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
{{ toYaml .Values.podAnnotations | nindent 8 }}
|
||||
{{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
{{- if or .Values.podLabels .Values.garbageCollect.podLabels }}
|
||||
{{- toYaml (merge (.Values.garbageCollect.podLabels | default (dict)) (.Values.podLabels | default (dict))) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAnnotations .Values.garbageCollect.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml (merge (.Values.garbageCollect.podAnnotations | default (dict)) (.Values.podAnnotations | default (dict))) | nindent 12 }}
|
||||
{{- end}}
|
||||
spec:
|
||||
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }}
|
||||
@@ -49,7 +59,10 @@ spec:
|
||||
- garbage-collect
|
||||
- --delete-untagged={{ .Values.garbageCollect.deleteUntagged }}
|
||||
- /etc/docker/registry/config.yml
|
||||
resources: {{ toYaml .Values.garbageCollect.resources | nindent 12 }}
|
||||
{{- if .Values.garbageCollect.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.garbageCollect.resources | nindent 16 }}
|
||||
{{- end }}
|
||||
env: {{ include "docker-registry.envs" . | nindent 16 }}
|
||||
{{- if .Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{ omit .Values.containerSecurityContext "enabled" | toYaml | nindent 16 }}
|
||||
|
||||
36
values.yaml
36
values.yaml
@@ -61,11 +61,11 @@ resources: {}
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
persistence:
|
||||
accessMode: 'ReadWriteOnce'
|
||||
enabled: false
|
||||
@@ -98,17 +98,17 @@ secrets:
|
||||
|
||||
# Options for s3 storage type:
|
||||
# s3:
|
||||
# region: us-east-1
|
||||
# regionEndpoint: https://s3.us-east-1.amazonaws.com
|
||||
# bucket: my-bucket
|
||||
# rootdirectory: /object/prefix
|
||||
# encrypt: false
|
||||
# secure: true
|
||||
# region: us-east-1
|
||||
# regionEndpoint: https://s3.us-east-1.amazonaws.com
|
||||
# bucket: my-bucket
|
||||
# rootdirectory: /object/prefix
|
||||
# encrypt: false
|
||||
# secure: true
|
||||
|
||||
# Options for swift storage type:
|
||||
# swift:
|
||||
# authurl: http://swift.example.com/
|
||||
# container: my-container
|
||||
# authurl: http://swift.example.com/
|
||||
# container: my-container
|
||||
|
||||
# https://docs.docker.com/registry/recipes/mirror/
|
||||
proxy:
|
||||
@@ -245,4 +245,16 @@ garbageCollect:
|
||||
enabled: false
|
||||
deleteUntagged: true
|
||||
schedule: "0 1 * * *"
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
Reference in New Issue
Block a user