You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: snyk-monitor/README.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,54 @@ You can provide custom CA certificates to use for validating TLS connections by
277
277
278
278
If running Snyk on-prem, you can also use a custom CA certificate to validate the connection to kubernetes-upstream for sending scan results by providing the certificate under the following path in the ConfigMap: /srv/app/certs/ca.pem
279
279
280
+
## Helm chart extensibility ##
281
+
282
+
### Additional Kubernetes volumes and volume mounts ###
283
+
284
+
The helm chart supports mounting custom volumes in addition to the built-in ones through the use of `extraVolumes` and `extraVolumeMounts`.
285
+
286
+
**Note** that `extraVolumes` are available to all containers in the snyk-monitor deployment (including any init containers), whilst `extraVolumeMounts` applies only to the main snyk-monitor container.
287
+
288
+
#### Example ####
289
+
290
+
Let's say you need to mount in an additional kubernetes secret that is created outside of the snyk-monitor chart. You would define the following in your `values.yaml`:
291
+
292
+
```yaml
293
+
extraVolumes:
294
+
# this volume will be available to all containers in the deployment
295
+
- name: "my-k8s-secret"
296
+
secret:
297
+
secretName: "name-of-my-k8s-secret-resource"# kubernetes secret created elsewhere
298
+
299
+
extraVolumeMounts:
300
+
# this mounts the kubernetes secret into the main snyk-monitor container
301
+
- mountPath: "/mnt/additional-secrets"
302
+
name: "my-k8s-secret"
303
+
readOnly: true
304
+
```
305
+
306
+
### Additional init containers ###
307
+
308
+
The helm chart supports specifying additional init containers that will run before the main snyk-monitor container through the use of `extraInitContainers`. This field is templated ie. Helm will parse any helm template directives within the specification.
309
+
310
+
#### Example ####
311
+
312
+
Continuing on with the example above for additional volumes, let's say you need to have a secret copied into a specific path in the main snyk-monitor container before it is started. You would define the following in your `values.yaml`:
313
+
314
+
```yaml
315
+
extraInitContainers:
316
+
- name: install-my-secret
317
+
# notice how the image specification is templated. This would result in running the same
318
+
# image as the built-in 'volume-permissions' init container.
0 commit comments