Added nodeSelector, affinity and tolerations to helm chart (#803)

* Added nodeSelector, affinity and tolerations to helm chart

* Updated helm README.md and bumped version
This commit is contained in:
Carlos Tolon
2021-01-11 15:33:35 +01:00
committed by GitHub
parent f6afdf0145
commit 6b29bf1c71
4 changed files with 28 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: trivy name: trivy
version: 0.4.1 version: 0.4.2
appVersion: "0.15.0" appVersion: "0.15.0"
description: Trivy helm chart description: Trivy helm chart
keywords: keywords:

View File

@@ -63,6 +63,9 @@ The following table lists the configurable parameters of the Trivy chart and the
| `httpProxy` | The URL of the HTTP proxy server | | | `httpProxy` | The URL of the HTTP proxy server | |
| `httpsProxy` | The URL of the HTTPS proxy server | | | `httpsProxy` | The URL of the HTTPS proxy server | |
| `noProxy` | The URLs that the proxy settings do not apply to | | | `noProxy` | The URLs that the proxy settings do not apply to | |
| `nodeSelector` | Node labels for pod assignment | |
| `affinity` | Affinity settings for pod assignment | |
| `tolerations` | Tolerations for pod assignment | |
The above parameters map to the env variables defined in [trivy](https://github.com/aquasecurity/trivy#configuration). The above parameters map to the env variables defined in [trivy](https://github.com/aquasecurity/trivy#configuration).

View File

@@ -40,6 +40,18 @@ spec:
imagePullSecrets: imagePullSecrets:
- name: {{ .Values.image.pullSecret }} - name: {{ .Values.image.pullSecret }}
{{- end }} {{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
containers: containers:
- name: main - name: main
image: {{ template "trivy.imageRef" . }} image: {{ template "trivy.imageRef" . }}

View File

@@ -37,6 +37,18 @@ securityContext:
privileged: false privileged: false
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
nodeSelector: {}
## Affinity settings for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
affinity: {}
## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []
trivy: trivy:
# debugMode the flag to enable Trivy debug mode # debugMode the flag to enable Trivy debug mode
debugMode: false debugMode: false