Skip to content

Commit 5c5e0cb

Browse files
authored
Add imagePullSecrets to helm Chart (#789)
* Add imagePullSecrets to helm Chart Fixes #787 Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud> * use only one imagePullSecret Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud> * Bugfix Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
1 parent b9b84cd commit 5c5e0cb

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

helm/trivy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: trivy
3-
version: 0.3.0
3+
version: 0.4.0
44
appVersion: "0.15.0"
55
description: Trivy helm chart
66
keywords:

helm/trivy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ The following table lists the configurable parameters of the Trivy chart and the
5151
| `image.repository` | Image name | `aquasec/trivy` |
5252
| `image.tag` | Image tag | `{TAG_NAME}` |
5353
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
54+
| `image.pullSecret` | The name of an imagePullSecret used to pull trivy image from e.g. Docker Hub or a private registry | |
5455
| `replicaCount` | Number of Trivy Pods to run | `1` |
5556
| `trivy.debugMode` | The flag to enable or disable Trivy debug mode | `false` |
5657
| `trivy.gitHubToken` | The GitHub access token to download Trivy DB | |

helm/trivy/templates/statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ spec:
3636
securityContext:
3737
{{ toYaml .Values.podSecurityContext | indent 8 }}
3838
{{- end }}
39+
{{- if .Values.image.pullSecret }}
40+
imagePullSecrets:
41+
- name: {{ .Values.image.pullSecret }}
42+
{{- end }}
3943
containers:
4044
- name: main
4145
image: {{ template "trivy.imageRef" . }}

helm/trivy/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ image:
66
repository: aquasec/trivy
77
tag: 0.15.0
88
pullPolicy: IfNotPresent
9+
pullSecret: ""
910

1011
replicaCount: 1
1112

0 commit comments

Comments
 (0)