From 76ff283a25985d13718a61784e0aea63a5ce5b82 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Mon, 8 Aug 2022 10:57:43 +0200 Subject: [PATCH] PR Suggestions --- templates/cronjob.yaml | 20 ++++++++++++++++++++ values.yaml | 5 ----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/templates/cronjob.yaml b/templates/cronjob.yaml index f784469..23a4485 100644 --- a/templates/cronjob.yaml +++ b/templates/cronjob.yaml @@ -3,6 +3,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: {{ template "docker-registry.fullname" . }}-garbage-collector + namespace: {{ .Values.namespace | default .Release.Namespace }} labels: app: {{ template "docker-registry.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} @@ -11,12 +12,31 @@ metadata: spec: schedule: {{ .Values.garbageCollect.schedule | quote }} jobTemplate: + metadata: + labels: + app: {{ template "docker-registry.name" . }} + release: {{ .Release.Name }} + {{- with .Values.podLabels }} + {{ 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 | indent 8 }} +{{- end }} spec: template: spec: + {{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }} + serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }} + {{- end }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 12 }} {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: "{{ .Values.priorityClassName }}" + {{- end }} {{- if .Values.securityContext.enabled }} securityContext: fsGroup: {{ .Values.securityContext.fsGroup }} diff --git a/values.yaml b/values.yaml index 8285f67..cbf0ec8 100644 --- a/values.yaml +++ b/values.yaml @@ -77,9 +77,6 @@ storage: filesystem secrets: haSharedSecret: "" htpasswd: "" - azure: {} - s3: {} - swift: {} # Secrets for Azure # azure: # accountName: "" @@ -96,7 +93,6 @@ secrets: # username: "" # password: "" -s3: {} # Options for s3 storage type: # s3: # region: us-east-1 @@ -106,7 +102,6 @@ s3: {} # encrypt: false # secure: true -swift: {} # Options for swift storage type: # swift: # authurl: http://swift.example.com/