Skip to content

Commit

Permalink
Allow imagePullSecrets in agents values.yaml
Browse files Browse the repository at this point in the history
Allows using imagePullSecrets for both the controller & executor's
SA.
  • Loading branch information
pmariglia committed Sep 12, 2024
1 parent f4b9c9d commit 698327b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/nx-agents/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nx-agents
description: Nx Cloud Agents Helm Chart
type: application
version: 1.2.2
version: 1.2.3
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
4 changes: 4 additions & 0 deletions charts/nx-agents/ci/basic-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ naming:
serviceAccounts:
controller:
annotations: {}
imagePullSecrets:
- "regcreds"
runner:
annotations: {}
imagePullSecrets:
- "regcreds"

controller:
deployment:
Expand Down
15 changes: 12 additions & 3 deletions charts/nx-agents/templates/serviceaccounts.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
apiVersion: v1
kind: ServiceAccount
{{- if .Values.serviceAccounts.runner.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.serviceAccounts.runner.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
metadata:
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
Expand All @@ -10,10 +16,15 @@ metadata:
annotations:
{{- toYaml .Values.serviceAccounts.runner.annotations | nindent 4 }}
{{- end }}

---
apiVersion: v1
kind: ServiceAccount
{{- if .Values.serviceAccounts.runner.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.serviceAccounts.runner.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
metadata:
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
Expand All @@ -23,5 +34,3 @@ metadata:
annotations:
{{- toYaml .Values.serviceAccounts.controller.annotations | nindent 4 }}
{{- end }}


2 changes: 2 additions & 0 deletions charts/nx-agents/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ serviceAccounts:
controller:
name: nx-cloud-workflow-controller
annotations: {}
imagePullSecrets: {}
runner:
name: nx-cloud-workflow-runner
annotations: {}
imagePullSecrets: {}

# The controller is the main component of the workflow system. It is responsible for managing the state of workflows, starting
# new runs in your cluster, and managing the agents that run your workflows. It should be internally accessible from both
Expand Down

0 comments on commit 698327b

Please sign in to comment.