File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 2727 {{- toYaml . | nindent 8 }}
2828 {{- end }}
2929 spec :
30+ {{- with .Values.securityContext.fsGroup }}
31+ securityContext :
32+ fsGroup : {{ int . }}
33+ {{- end }}
3034 affinity :
3135 nodeAffinity :
3236 requiredDuringSchedulingIgnoredDuringExecution :
@@ -172,6 +176,13 @@ spec:
172176 name : {{ .Values.defaultWorkloadPoliciesMap }}
173177 {{- end }}
174178 optional : true
179+ {{- if .Values.volumes.projected.serviceAccountToken }}
180+ - name : token-vol
181+ projected :
182+ sources :
183+ - serviceAccountToken :
184+ path : token
185+ {{- end }}
175186 - name : registries-conf
176187 configMap :
177188 name : {{ .Values.registriesConfConfigMap }}
Original file line number Diff line number Diff line change @@ -108,3 +108,18 @@ psp:
108108
109109# Override the excluded namespaces
110110excludedNamespaces :
111+
112+ # Allow specifying a fsGroup in the PodSpec securityContext:
113+ # spec:
114+ # template:
115+ # spec:
116+ # securityContext:
117+ # fsGroup: <-- here
118+ securityContext :
119+ fsGroup :
120+
121+ # A projected volume maps several existing volume sources into the same directory.
122+ # https://kubernetes.io/docs/concepts/storage/volumes/#projected
123+ volumes :
124+ projected :
125+ serviceAccountToken : false
Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ async function deployKubernetesMonitor(
3535 '--set pvc.enabled=true ' +
3636 '--set pvc.create=true ' +
3737 '--set log_level="INFO" ' +
38- '--set rbac.serviceAccount.annotations."foo"="bar"' ,
38+ '--set rbac.serviceAccount.annotations."foo"="bar" ' +
39+ '--set volumes.projected.serviceAccountToken=true ' +
40+ '--set securityContext.fsGroup=65534 ' ,
3941 ) ;
4042 console . log (
4143 `Deployed ${ imageOptions . nameAndTag } with pull policy ${ imageOptions . pullPolicy } ` ,
You can’t perform that action at this time.
0 commit comments