Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Fix missing resources and security context in registry pod
Browse files Browse the repository at this point in the history
  • Loading branch information
glb committed Mar 20, 2020
1 parent 80e81d6 commit 4ceeb2d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions templates/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,23 @@ spec:
mountPath: /var/lib/registry/
- name: registry-config
mountPath: /etc/docker/registry
{{- if $securityContextEnabled }}
securityContext: {{ toYaml $containerSecurityContext | nindent 10 }}
{{- end }}{{/* if $securityContextEnabled*/}}
resources: {{ toYaml (default .Values.resources.defaults .Values.resources.registryGarbageCollector) | nindent 10 }}

- name: cleaner
{{- if $securityContextEnabled }}
securityContext:
{{ toYaml $containerSecurityContext | indent 16 }}
{{- end }}
{{- with .Values.images.registryCleaner }}
{{- $project := (default (default "deepsecurity" $imageDefaults.project) .project) }}
{{- $repository := printf "%s/%s" $project (required ".repository is required!" .repository) }}
{{- $tag := (default $imageDefaults.tag .tag) }}
image: {{ include "image.source" (dict "repository" $repository "registry" .registry "tag" $tag "imageDefaults" $imageDefaults "digest" .digest) }}
imagePullPolicy: {{ default (default "Always" $imageDefaults.pullPolicy) .pullPolicy }}
{{- end }}
resources:
{{ toYaml (default .Values.resources.defaults .Values.resources.registryCleaner) | indent 16 }}
{{- if $securityContextEnabled }}
securityContext: {{ toYaml $containerSecurityContext | nindent 10 }}
{{- end }}{{/* if $securityContextEnabled */}}
resources: {{ toYaml (default .Values.resources.defaults .Values.resources.registryCleaner) | nindent 10 }}
args:
- purge-local
{{- if (and .Values.registry.auth.username .Values.registry.auth.password) }}
Expand Down Expand Up @@ -263,7 +265,10 @@ spec:
volumeMounts:
- name: htpasswd
mountPath: "/auth"
resources: {{ toYaml (default .Values.resources.defaults .Values.resources.htPasswd) | nindent 12 }}
resources: {{ toYaml (default .Values.resources.defaults .Values.resources.htPasswd) | nindent 10 }}
{{- if $securityContextEnabled }}
securityContext: {{ toYaml $containerSecurityContext | nindent 10 }}
{{- end }}{{/* if $securityContextEnabled */}}
{{- end }}

nodeSelector:
Expand Down

0 comments on commit 4ceeb2d

Please sign in to comment.