apiVersion: v1
kind: Secret
metadata:
  name: scanner-config
type: Opaque
stringData:
  scanner.yaml: |-
    log:
      level: {{ .Values.log.level }}
      pretty: {{ .Values.log.pretty }}
    db:
      host: {{ default (printf "%s-postgresql.%s" .Release.Name .Release.Namespace) .Values.db.host }}
      port: {{ .Values.db.port }}
      database: {{ .Values.db.database }}
      user: {{ .Values.db.user }}
      password: {{ .Values.db.password }}
    scanner:
      concurrency: {{ .Values.scanner.concurrency }}
      trivyURL: {{ .Values.scanner.trivyURL }}
      dockerUsername: {{ .Values.scanner.dockerUsername }}
      dockerPassword: {{ .Values.scanner.dockerPassword }}
