Using these values above as test.yaml with K8S (EKS) 1.27 using both helm template or helm install --debug --dry-run, and I could not see any issue.
# template test
helm template dgraph/dgraph --namespace dgraph \
--values test.yaml | grep -A11 -B3 ServiceAccount
# ---
# # Source: dgraph/templates/serviceaccount.yaml
# apiVersion: v1
# kind: ServiceAccount
# metadata:
# name: demo-service-account
# labels:
# app: dgraph
# chart: dgraph-0.2.1
# component: alpha
# release: release-name
# heritage: Helm
# annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::xxxxxxxxxxx:role/demo-iam-role
# ---
# debug dry-run install test
helm install mydg dgraph/dgraph --namespace dgraph --debug --dry-run \
--create-namespace --values test.yaml | grep serviceAccountName
# serviceAccountName: demo-service-account
# serviceAccountName: demo-service-account
I have also installed this with K8S (EKS) 1.26, with an IAM Role for S3 bucket access for backups, and have not encountered any issues. Though with this one, I used the default dgraph sa name.