Skip to content

Commit

Permalink
Include serviceAccountName in deployments (#214)
Browse files Browse the repository at this point in the history
* option to include serviceAccountName in deployments
* Update README with custom serviceAccount info

Co-authored-by: tandz <Zachary.Tandara-Kuhns@pega.com>
  • Loading branch information
zitikay and tandz authored Dec 4, 2020
1 parent ace46a4 commit 5dbadbb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions charts/pega/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,20 @@ tier:
- name: MY_ENV_NAME
value: MY_ENV_VALUE
```

### Service Account

If the pod needs to be run with a specific [service account](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/), you can specify a custom `serviceAccountName` for your deployment tier.

Example:

```yaml
tier:
- name: my-tier
custom:
serviceAccountName: MY_SERVICE_ACCOUNT_NAME
```

### Custom Annotations for Pods

You may optionally provide custom annotations for Pods as metadata to be consumed by other tools and libraries. Pod annotations may be specified by using the `podAnnotations` element for a given `tier`.
Expand Down
5 changes: 5 additions & 0 deletions charts/pega/templates/_pega-deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ spec:
{{- include "generatedPodAnnotations" .root | indent 8 }}
spec:
{{- if .custom }}
{{- if .custom.serviceAccountName }}
serviceAccountName: {{ .custom.serviceAccountName }}
{{- end }}
{{- end }}
volumes:
# Volume used to mount config files.
- name: {{ template "pegaVolumeConfig" }}
Expand Down

0 comments on commit 5dbadbb

Please sign in to comment.