8000 Allow configuration of imagePullSecret for all trivy components by K4iM4k3r · Pull Request #2929 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ Committing with `git commit -s` will add the sign-off at the end of the commit m
- Tobias Stenby Brixen <kind.job1347@fastmail.com>
- Eline Henriksen <mains.moon.0x@icloud.com>
- Michael Kruggel <michael.kruggel@defenseunicorns.com>
- Ochi Daiki <lbfdeatq@gmail.com>
- Ochi Daiki <lbfdeatq@gmail.com>
- Kai Schäfer <kai.schaefer@claranet.com>
4 changes: 4 additions & 0 deletions scanners/trivy/templates/trivy-database-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ spec:
labels:
app: trivy-database
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: trivy-database
image: "{{ .Values.scanner.image.repository }}:{{ .Values.scanner.image.tag | default .Chart.AppVersion }}"
Expand Down
12 changes: 12 additions & 0 deletions scanners/trivy/templates/trivy-scan-type.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ spec:
{{- end }}
template:
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: OnFailure
affinity:
{{- toYaml .Values.scanner.affinity | nindent 12 }}
Expand Down Expand Up @@ -216,6 +220,10 @@ spec:
{{- toYaml .Values.scanner.affinity | nindent 12 }}
tolerations:
{{- toYaml .Values.scanner.tolerations | nindent 12 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: trivy
image: "{{ .Values.scanner.image.repository }}:{{ .Values.scanner.image.tag | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -267,6 +275,10 @@ spec:
{{- end }}
template:
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: OnFailure
affinity:
{{- toYaml .Values.scanner.affinity | nindent 12 }}
Expand Down
8 changes: 8 additions & 0 deletions scanners/trivy/tests/__snapshot__/scanner_test.yaml.snap
9EBC
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ matches the snapshot:
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
imagePullSecrets:
- name: foo
3: |
apiVersion: execution.securecodebox.io/v1
kind: ParseDefinition
Expand Down Expand Up @@ -256,6 +258,8 @@ matches the snapshot:
volumeMounts: []
- image: bar
name: foo
imagePullSecrets:
- name: foo
restartPolicy: OnFailure
tolerations:
- foo: bar
Expand Down Expand Up @@ -307,6 +311,8 @@ matches the snapshot:
volumeMounts: []
- image: bar
name: foo
imagePullSecrets:
- name: foo
restartPolicy: OnFailure
tolerations:
- foo: bar
Expand Down Expand Up @@ -357,6 +363,8 @@ matches the snapshot:
volumeMounts: []
- image: bar
name: foo
imagePullSecrets:
- name: foo
restartPolicy: OnFailure
serviceAccountName: trivy-k8s
tolerations:
Expand Down
Loading
0