Skip to content

Commit

Permalink
Allow adding annotations on the ServiceAccount
Browse files Browse the repository at this point in the history
Allow specifying annotations that will be added to the ServiceAccount.
This fixes jcmoraisjr/haproxy-ingress/issues/1056.
  • Loading branch information
Fredrik Wendel committed Sep 16, 2024
1 parent eddd1a6 commit 7d4e42e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions haproxy-ingress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Parameter | Description | Default
`serviceAccount.create` | If true, create serviceAccount | `true`
`serviceAccount.name` | ServiceAccount to be used | ``
`serviceAccount.automountServiceAccountToken` | Automount API credentials for the ServiceAccount | `true` |
`serviceAccount.annotations` | A list of annotations to add to the ServiceAccount | ``
`controller.automountServiceAccountToken` | Automount API credentials to the controller's pod | `true` |
`controller.name` | name of the controller component | `controller`
`controller.image.registry` | controller container image registry | `quay.io`
Expand Down
4 changes: 4 additions & 0 deletions haproxy-ingress/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ metadata:
{{- include "haproxy-ingress.labels" . | nindent 4 }}
name: {{ include "haproxy-ingress.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions haproxy-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ rbac:

# Create ServiceAccount
serviceAccount:
# Annotations to be added to the ServiceAccount
annotations: {}
# - eks.amazonaws.com/role-arn: "arn:aws:iam::111111111111:role/some-role-name"
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
Expand Down

0 comments on commit 7d4e42e

Please sign in to comment.