Skip to content

Commit

Permalink
chore(charts): provide more config options
Browse files Browse the repository at this point in the history
Includes dynamic service account names and some missing roles
  • Loading branch information
stevepentland committed Feb 29, 2024
1 parent 7750567 commit cc8c266
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 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.0.0-rc.2
version: 1.0.0-rc.3
maintainers:
- name: nx
url: "https://nx.app/"
Expand Down
2 changes: 1 addition & 1 deletion charts/nx-agents/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ spec:
{{- end }}
{{- end }}
{{- end }}
serviceAccountName: nx-cloud-workflow-controller
serviceAccountName: {{ .Values.serviceAccounts.controller.name }}
terminationGracePeriodSeconds: 10
20 changes: 18 additions & 2 deletions charts/nx-agents/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@ roleRef:
name: nx-cloud-workflow-controller-role
subjects:
- kind: ServiceAccount
name: nx-cloud-workflow-controller
namespace: {{ .Values.global.namespace }}
name: {{ .Values.serviceAccounts.controller.name }}
namespace: {{ .Values.global.namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
name: nx-cloud-workflow-runner-rolebinding
namespace: {{ .Values.global.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: nx-cloud-workflow-runner-role
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccounts.runner.name }}
namespace: {{ .Values.global.namespace }}
16 changes: 15 additions & 1 deletion charts/nx-agents/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,18 @@ rules:
resources:
- jobs/status
verbs:
- get
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: nx-cloud-workflow-runner-role
namespace: {{ .Values.global.namespace }}
rules:
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
6 changes: 4 additions & 2 deletions charts/nx-agents/templates/serviceaccounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: nx-cloud-workflow-runner
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
name: {{ .Values.serviceAccounts.runner.name }}
namespace: {{ .Values.global.namespace }}
{{- if .Values.serviceAccounts.runner.annotations }}
annotations:
Expand All @@ -15,7 +17,7 @@ kind: ServiceAccount
metadata:
labels:
{{- include "nxCloud.app.labels" . | indent 4 }}
name: nx-cloud-workflow-controller
name: {{ .Values.serviceAccounts.controller.name }}
namespace: {{ .Values.global.namespace }}
{{- if .Values.serviceAccounts.controller.annotations }}
annotations:
Expand Down
2 changes: 2 additions & 0 deletions charts/nx-agents/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ naming:

serviceAccounts:
controller:
name: nx-cloud-workflow-controller
annotations: {}
runner:
name: nx-cloud-workflow-runner
annotations: {}

controller:
Expand Down

0 comments on commit cc8c266

Please sign in to comment.