Skip to content

Commit

Permalink
feat: be able to create the dedicated k8s sa for pipecd server with h…
Browse files Browse the repository at this point in the history
…elm chart.

Hi team, PipeCD is very good software.
Currently, the default service account annotation must be edited in order to use GCP Workload Identity or AWS WebIdentity.
This change should improve convenience by allowing k8s service accounts dedicated to PipeCD Server to be created from the helm chart.

Signed-off-by: mugioka <[email protected]>
  • Loading branch information
mugioka committed Apr 14, 2022
1 parent 01af803 commit cb15699
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/pipecd/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ spec:
{{- include "pipecd.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: ops
spec:
{{- if .Values.serviceAccount.create -}}
serviceAccountName: {{ include "pipecd.fullname" . }}-server
{{- end }}
containers:
{{- if .Values.cloudSQLProxy.enabled }}
- name: cloud-sql-proxy
Expand Down
12 changes: 12 additions & 0 deletions manifests/pipecd/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "pipecd.fullname" . }}-server
labels:
{{- include "pipecd.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions manifests/pipecd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ ingress:
# kubernetes.io/ingress.allow-http: "false"
# kubernetes.io/ingress.global-static-ip-name: pipecd

# ServiceAccount
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}

# Workloads.
gateway:
replicasCount: 1
Expand Down

0 comments on commit cb15699

Please sign in to comment.