Skip to content

Commit

Permalink
feat(helm): pass arbitrary env vars to trivy (#3208)
Browse files Browse the repository at this point in the history
  • Loading branch information
jouve authored Nov 29, 2022
1 parent bd30e98 commit b1a2c4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/trivy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The following table lists the configurable parameters of the Trivy chart and the
| `trivy.serverToken` | The token to authenticate Trivy client with Trivy server | `` |
| `trivy.existingSecret` | existingSecret if an existing secret has been created outside the chart. Overrides gitHubToken, registryUsername, registryPassword, serverToken | `` |
| `trivy.podAnnotations` | Annotations for pods created by statefulset | `{}` |
| `trivy.extraEnvVars` | extraEnvVars to be set on the container | `{}` |
| `service.name` | If specified, the name used for the Trivy service | |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.port` | Kubernetes service port | `4954` |
Expand Down
3 changes: 3 additions & 0 deletions helm/trivy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ data:
{{- if .Values.noProxy }}
NO_PROXY: {{ .Values.noProxy | quote }}
{{- end }}
{{- with .Values.trivy.extraEnvVars }}
{{- . | toYaml | nindent 2 }}
{{- end }}
2 changes: 2 additions & 0 deletions helm/trivy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ trivy:
# existingSecret if an existing secret has been created outside the chart.
# Overrides gitHubToken, registryUsername, registryPassword, serverToken
existingSecret: ""
# extraEnvVars to be set on the container
extraEnvVars: {}

service:
# If specified, the name used for the Trivy service.
Expand Down

0 comments on commit b1a2c4e

Please sign in to comment.