Skip to content

Commit e2e0bdf

Browse files
NVSHAS-9426 AddhostPath for scanner in helm chart
1 parent d3b7ebb commit e2e0bdf

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

charts/core/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ Because the CRD (Custom Resource Definition) policies can be deployed before Neu
88
## Choosing container runtime
99
Prior to 5.3 release, the user has to specify the correct container runtime type and its socket path. In 5.3.0 release, the enforcer is able to automatically detect the container runtime at its default socket location. The settings of docker/containerd/crio/k8s/bottlerocket become deprecated. If the container runtime socket is not at the default location, please specify it using 'runtimePath' field. In the meantime, the controller does not require the runtime socket to be mounted any more.
1010

11+
12+
## Scan caching
13+
Scan caching can be enabled by editing values.yaml or creating below override file and pass them with "-f" option on HELM commands.
14+
```console
15+
cve:
16+
scanner:
17+
volumes:
18+
- name: scan-cache
19+
hostPath:
20+
path: /tmp/
21+
type: ""
22+
volumeMounts:
23+
- mountPath: /tmp/images/caches
24+
name: scan-cache
25+
```
26+
1127
## Configuration
1228

1329
The following table lists the configurable parameters of the NeuVector chart and their default values.

charts/core/templates/scanner-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ spec:
125125
- mountPath: /etc/neuvector/certs/internal/
126126
name: internal-cert-dir
127127
{{- end }}
128+
{{- with .Values.cve.scanner.volumeMounts }}
129+
{{- toYaml . | nindent 12 }}
130+
{{- end }}
128131
restartPolicy: Always
129132
volumes:
130133
{{- if or .Values.internal.certmanager.enabled .Values.cve.scanner.internal.certificate.secret }}
@@ -136,4 +139,7 @@ spec:
136139
emptyDir:
137140
sizeLimit: 50Mi
138141
{{- end }}
142+
{{- with .Values.cve.scanner.volumes }}
143+
{{- toYaml . | nindent 8 }}
144+
{{- end }}
139145
{{- end }}

charts/core/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ cve:
596596
keyFile: tls.key
597597
pemFile: tls.crt
598598
caFile: ca.crt # must be the same CA for all internal.
599-
599+
volumes:
600+
volumeMounts:
600601
resources:
601602
{}
602603
# limits:

0 commit comments

Comments
 (0)