Skip to content

Commit

Permalink
fix(jiva): add serviceAccount name in jiva deployments
Browse files Browse the repository at this point in the history
required for provision jiva volume deployments in
restricted environment using pod security policy(PSP)

Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
  • Loading branch information
prateekpandey14 authored and kmova committed Dec 4, 2020
1 parent badde9b commit 7c0a870
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/install/v1alpha1/jiva_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
value: "default"
- name: VolumeMonitor
enabled: "true"
# ServiceAccountName is the account name assigned to m-apiserver pod
- name: ServiceAccountName
value: {{env "OPENEBS_SERVICE_ACCOUNT"}}
# TargetTolerations allows you to specify the tolerations for target
# Example:
# - name: TargetTolerations
Expand Down Expand Up @@ -872,6 +875,7 @@ spec:
{{ $sK }}: {{ $sV }}
{{- end }}
{{- end}}
serviceAccountName: {{ .Config.ServiceAccountName.value }}
{{- if ne (.TaskResult.sts.applicationName | default "") "" }}
affinity:
podAffinity:
Expand Down Expand Up @@ -1062,6 +1066,7 @@ spec:
{{ $sK }}: {{ $sV }}
{{- end }}
{{- end}}
serviceAccountName: {{ .Config.ServiceAccountName.value }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down

0 comments on commit 7c0a870

Please sign in to comment.