Skip to content

Commit

Permalink
use of automount service account on v1.22 and newer (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmoraisjr committed Sep 1, 2023
1 parent 16eb840 commit d13a42b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions haproxy-ingress/templates/_podtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ spec:
{{- toYaml .Values.controller.podAffinity | nindent 4 }}
{{- end }}
serviceAccountName: {{ include "haproxy-ingress.serviceAccountName" . }}
{{- if semverCompare ">= 1.22-0" .Capabilities.KubeVersion.Version }}
automountServiceAccountToken: {{ .Values.controller.automountServiceAccountToken }}
{{- end }}
{{- if or .Values.controller.haproxy.enabled .Values.controller.initContainers }}
initContainers:
{{- if .Values.controller.haproxy.enabled }}
Expand Down
2 changes: 2 additions & 0 deletions haproxy-ingress/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
{{- if semverCompare ">= 1.22-0" .Capabilities.KubeVersion.Version }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}
metadata:
labels:
{{- include "haproxy-ingress.labels" . | nindent 4 }}
Expand Down

0 comments on commit d13a42b

Please sign in to comment.