Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ spec:
serviceAccountName: {{ include "command-cert-manager-issuer.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if not .Values.serviceAccount.automountServiceAccountToken }}
volumes:
- name: serviceaccount-token
projected:
defaultMode: {{ .Values.serviceAccount.projectedTokenVolume.defaultMode }}
sources:
- serviceAccountToken:
expirationSeconds: {{ .Values.serviceAccount.projectedTokenVolume.expirationSeconds }}
path: token
{{- end }}
containers:
- args:
- --health-probe-bind-address=:8081
Expand Down Expand Up @@ -57,6 +67,12 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if not .Values.serviceAccount.automountServiceAccountToken }}
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: serviceaccount-token
readOnly: true
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}
9 changes: 9 additions & 0 deletions deploy/charts/command-cert-manager-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ serviceAccount:
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# Specifies whether to automount the service account token
# If false, a projected volume will be used to mount the token
automountServiceAccountToken: false
# Configuration for projected service account token volume (used when automountServiceAccountToken is false)
projectedTokenVolume:
# Token expiration time in seconds
expirationSeconds: 3607
# File permissions for the token
defaultMode: 0444

podLabels: {}

Expand Down
Loading