Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions snyk-monitor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if ne .Values.securityContext.fsGroup "" }}
securityContext:
fsGroup: 65534
{{- end }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -172,6 +176,13 @@ spec:
name: {{ .Values.defaultWorkloadPoliciesMap }}
{{- end }}
optional: true
{{- if .Values.volumes.projected.serviceAccountToken }}
- name: token-vol
projected:
sources:
- serviceAccountToken:
path: token
{{- end }}
Comment on lines +179 to +185
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tektite-io I was wondering if this volume also needs to be mounted with a volumeMount? The example in the docs both declares the volume and a volumeMount - https://kubernetes.io/docs/concepts/storage/volumes/#example-configuration-secret-downwardapi-configmap
And if we have to mount this volume, where should it go?

Also, it looks like token expires by default after 1 hour according to the docs. How should we handle this?

- name: registries-conf
configMap:
name: {{ .Values.registriesConfConfigMap }}
Expand Down
15 changes: 15 additions & 0 deletions snyk-monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,18 @@ psp:

# Override the excluded namespaces
excludedNamespaces:

# Allow specifying a fsGroup in
# spec:
# template:
# spec:
# securityContext:
# fsGroup: 65534 <-- here
securityContext:
fsGroup: ""

# A projected volume maps several existing volume sources into the same directory.
# https://kubernetes.io/docs/concepts/storage/volumes/#projected
volumes:
projected:
serviceAccountToken: false