Skip to content

Commit

Permalink
feat(helm): add sumologic.serviceAccount.annotations so custom annota…
Browse files Browse the repository at this point in the history
…tions can be added (#1714)

* Adding ability to specify for annotations for serviceAccounts

* updating README.md, adding annotations to setup and cleanup
  • Loading branch information
nairb authored and sumo-drosiek committed Aug 31, 2021
1 parent ea73145 commit 73a0dcb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Parameter | Description | Default
`sumologic.podLabels` | Additional labels for the pods. | `{}`
`sumologic.podAnnotations` | Additional annotations for the pods. | `{}`
`sumologic.scc.create` | Create OpenShift's Security Context Constraint | `false`
`sumologic.serviceAccount.annotations` | Add custom annotations to sumologic serviceAccounts | `{}`
`sumologic.setup.clusterRole.annotations` | Annotations for the ClusterRole. | `[{"helm.sh/hook":"pre-install,pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation,hook-succeeded","helm.sh/hook-weight":"1"}]`
`sumologic.setup.clusterRoleBinding.annotations` | Annotations for the ClusterRole. | `[{"helm.sh/hook":"pre-install,pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation,hook-succeeded","helm.sh/hook-weight":"2"}]`
`sumologic.setup.configMap` | Annotations for the ConfigMap. | `[{"helm.sh/hook":"pre-install,pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation,hook-succeeded","helm.sh/hook-weight":"2"}]`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ template "sumologic.metadata.name.cleanup.roles.serviceaccount" . }}
annotations:
{{ include "sumologic.annotations.app.cleanup.helmsh" "0" | indent 4 }}
{{- with .Values.sumologic.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app: {{ template "sumologic.labels.app.cleanup.roles.serviceaccount" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
app: {{ template "sumologic.labels.app.roles.serviceaccount" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
{{- with .Values.sumologic.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.sumologic.pullSecrets }}
imagePullSecrets:
{{ toYaml .Values.sumologic.pullSecrets | indent 2 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ template "sumologic.metadata.name.setup.roles.serviceaccount" . }}
annotations:
{{ include "sumologic.annotations.app.setup.helmsh" "0" | indent 4 }}
{{- with .Values.sumologic.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app: {{ template "sumologic.labels.app.setup.roles.serviceaccount" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ sumologic:
## Add custom annotations to the following sumologic resources(fluentd sts, setup job, otelcol deployment)
podAnnotations: {}

## Add custom annotations to sumologic serviceAccounts
serviceAccount:
annotations: {}

## creation of Security Context Constraints in Openshift
scc:
create: false
Expand Down

0 comments on commit 73a0dcb

Please sign in to comment.