diff --git a/templates/jobservice/jobservice-cm.yaml b/templates/jobservice/jobservice-cm.yaml index f9eb51bda..046f233e9 100644 --- a/templates/jobservice/jobservice-cm.yaml +++ b/templates/jobservice/jobservice-cm.yaml @@ -22,7 +22,7 @@ data: namespace: "harbor_job_service_namespace" idle_timeout_second: 3600 job_loggers: - {{- if eq .Values.jobservice.jobLogger "file" }} + {{- if has "file" .Values.jobservice.jobLoggers }} - name: "FILE" level: {{ .Values.logLevel | upper }} settings: # Customized settings of logger @@ -31,12 +31,14 @@ data: duration: 14 #days settings: # Customized settings of sweeper work_dir: "/var/log/jobs" - {{- else if eq .Values.jobservice.jobLogger "database" }} + {{- end }} + {{- if has "database" .Values.jobservice.jobLoggers }} - name: "DB" level: {{ .Values.logLevel | upper }} sweeper: duration: 14 #days - {{- else }} + {{- end }} + {{- if has "stdout" .Values.jobservice.jobLoggers }} - name: "STD_OUTPUT" level: {{ .Values.logLevel | upper }} {{- end }} diff --git a/templates/jobservice/jobservice-dpl.yaml b/templates/jobservice/jobservice-dpl.yaml index 859657180..8296d5cd5 100644 --- a/templates/jobservice/jobservice-dpl.yaml +++ b/templates/jobservice/jobservice-dpl.yaml @@ -110,7 +110,7 @@ spec: configMap: name: "{{ template "harbor.jobservice" . }}" - name: job-logs - {{- if and .Values.persistence.enabled (eq .Values.jobservice.jobLogger "file") }} + {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLogger) }} persistentVolumeClaim: claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.existingClaim | default (include "harbor.jobservice" .) }} {{- else }} diff --git a/templates/jobservice/jobservice-pvc.yaml b/templates/jobservice/jobservice-pvc.yaml index 04cc64d6b..2c903a32e 100644 --- a/templates/jobservice/jobservice-pvc.yaml +++ b/templates/jobservice/jobservice-pvc.yaml @@ -1,6 +1,6 @@ {{- $jobservice := .Values.persistence.persistentVolumeClaim.jobservice -}} {{- if and .Values.persistence.enabled (not $jobservice.existingClaim) }} -{{- if eq .Values.jobservice.jobLogger "file" }} +{{- if has "file" .Values.jobservice.jobLoggers }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/values.yaml b/values.yaml index ce31e74f9..1b79b5c46 100644 --- a/values.yaml +++ b/values.yaml @@ -444,7 +444,11 @@ jobservice: serviceAccountName: "" maxJobWorkers: 10 # The logger for jobs: "file", "database" or "stdout" - jobLogger: file + jobLoggers: + - file + # - database + # - stdout + # resources: # requests: # memory: 256Mi