Skip to content

Commit

Permalink
chore(nx-cloud): Allow serviceAccountName to be defined for all nx-cl…
Browse files Browse the repository at this point in the history
…oud deployments
  • Loading branch information
pmariglia committed Oct 3, 2024
1 parent 699b2ca commit 22691c3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/nx-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nx-cloud
description: Nx Cloud Helm Chart
type: application
version: 0.15.11
version: 0.15.12
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
5 changes: 5 additions & 0 deletions charts/nx-cloud/ci/basic-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ secret:
# When creating new values files for testing, bring over the lines below. The generated environment is quite resource
# constrained and with the default settings from values.yaml some of the pods will fail to schedule.
frontend:
serviceAccountName: 'myFrontendServiceAccount'
deployment:
env:
- name: TEST_VARIABLE
Expand All @@ -24,6 +25,7 @@ frontend:
cpu: '0.1'

nxApi:
serviceAccountName: 'myApiServiceAccount'
deployment:
env:
- name: TEST_VARIABLE
Expand All @@ -37,6 +39,7 @@ nxApi:
cpu: '0.1'

fileServer:
serviceAccountName: 'myFileserverServiceAccount'
deployment:
env:
- name: TEST_VARIABLE
Expand All @@ -52,6 +55,7 @@ fileServer:
cpu: '0.1'

aggregator:
serviceAccountName: 'myAggregatorServiceAccount'
schedule: "*/10 * * * *"
env:
- name: TEST_VARIABLE
Expand All @@ -62,6 +66,7 @@ aggregator:
cpu: '0.1'

messagequeue:
serviceAccountName: 'myMQServiceAccount'
deployment:
port: 61616
service:
Expand Down
3 changes: 3 additions & 0 deletions charts/nx-cloud/templates/nx-cloud-aggregator-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
spec:
template:
spec:
{{- if .Values.aggregator.serviceAccountName }}
serviceAccountName: {{ .Values.aggregator.serviceAccountName }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
initContainers:
- command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
labels:
app: nx-cloud-file-server
spec:
{{- if .Values.fileServer.serviceAccountName }}
serviceAccountName: {{ .Values.fileServer.serviceAccountName }}
{{- end }}
volumes:
- name: data
persistentVolumeClaim:
Expand Down
3 changes: 3 additions & 0 deletions charts/nx-cloud/templates/nx-cloud-frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
labels:
app: nx-cloud-frontend
spec:
{{- if .Values.frontend.serviceAccountName }}
serviceAccountName: {{ .Values.frontend.serviceAccountName }}
{{- end }}
containers:
- name: nx-cloud-frontend
image: {{ include "nxCloud.images.frontend.image" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
labels:
app: nx-cloud-messagequeue
spec:
{{- if .Values.messagequeue.serviceAccountName }}
serviceAccountName: {{ .Values.messagequeue.serviceAccountName }}
{{- end }}
containers:
- name: nx-cloud-messagequeue
image: {{ include "nxCloud.images.messagequeue.image" . }}
Expand Down
4 changes: 2 additions & 2 deletions charts/nx-cloud/templates/nx-cloud-nx-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ spec:
app: nx-cloud-nx-api
spec:
terminationGracePeriodSeconds: 60
{{- if .Values.awsS3.serviceAccountName }}
serviceAccountName: {{ .Values.awsS3.serviceAccountName }}
{{- if .Values.nxApi.serviceAccountName }}
serviceAccountName: {{ .Values.nxApi.serviceAccountName }}
{{- end }}
{{- if .Values.selfSignedCertConfigMap }}
initContainers:
Expand Down
5 changes: 5 additions & 0 deletions charts/nx-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ verboseMongoLogging: false
enableMessageQueue: true

frontend:
serviceAccountName: ''
image:
registry: ''
imageName: nx-cloud-frontend
Expand All @@ -42,6 +43,7 @@ frontend:
cpu: '0.5'

nxApi:
serviceAccountName: ''
image:
registry: ''
imageName: nx-cloud-nx-api
Expand All @@ -66,6 +68,7 @@ nxApi:
cpu: '1.0'

fileServer:
serviceAccountName: ''
image:
registry: ''
imageName: nx-cloud-file-server
Expand Down Expand Up @@ -94,6 +97,7 @@ fileServer:
fsGroupChangePolicy: "OnRootMismatch"

aggregator:
serviceAccountName: ''
schedule: '*/10 * * * *'
image:
registry: ''
Expand All @@ -110,6 +114,7 @@ aggregator:
cpu: '0.5'

messagequeue:
serviceAccountName: ''
image:
registry: ''
imageName: nx-cloud-messagequeue
Expand Down

0 comments on commit 22691c3

Please sign in to comment.