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

Commit

Permalink
Merge pull request #10 from stoehdoi/feature/support-secrets-in-scanner
Browse files Browse the repository at this point in the history
Allow the use of secrets for scanner user and password
  • Loading branch information
pipo02mix authored Dec 3, 2019
2 parents e12183e + 79b3960 commit d4d5977
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions helm/aqua-app-scanner/templates/scanner-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,32 @@ spec:
- name: scanner
image: "{{ .Values.imageCredentials.repositoryUriPrefix }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
{{- if .Values.secretName }}
env:
- name: SCANNER_USER
valueFrom:
secretKeyRef:
name: {{ .Values.secretName }}
key: {{ .Values.userKey }}
- name: SCANNER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secretName }}
key: {{ .Values.passwordKey }}
{{- end}}
args:
- "daemon"
{{- if .Values.secretName }}
- "--user"
- "$(SCANNER_USER)"
- "--password"
- "$(SCANNER_PASSWORD)"
{{- else }}
- "--user"
- "{{ required "Please specify a username associated with the Scanner role!" .Values.user }}"
- "--password"
- "{{ required "Please specify a password for a user associated with the Scanner role!" .Values.password }}"
{{- end }}
- "--host"
- "http://{{ .Values.server.serviceName }}:{{ .Values.server.port }}"
volumeMounts:
Expand Down
3 changes: 3 additions & 0 deletions helm/aqua-app-scanner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ image:

user:
password:
secretName: null
userKey: null
passwordKey: null
replicaCount: 1
livenessProbe: {}
readinessProbe: {}
Expand Down

0 comments on commit d4d5977

Please sign in to comment.