diff --git a/charts/nx-agents/Chart.yaml b/charts/nx-agents/Chart.yaml index 8646daa..4d3ed42 100644 --- a/charts/nx-agents/Chart.yaml +++ b/charts/nx-agents/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: nx-agents description: Nx Cloud Agents Helm Chart type: application -version: 1.2.4 +version: 1.2.5 maintainers: - name: nx url: "https://nx.app/" diff --git a/charts/nx-agents/templates/rolebinding.yaml b/charts/nx-agents/templates/rolebinding.yaml index c635a71..c737f87 100644 --- a/charts/nx-agents/templates/rolebinding.yaml +++ b/charts/nx-agents/templates/rolebinding.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.roleBindings.controller.existingRoleBinding }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -14,6 +15,8 @@ subjects: - kind: ServiceAccount name: {{ .Values.serviceAccounts.controller.name }} namespace: {{ .Values.global.namespace }} +{{- end }} +{{- if not .Values.roleBindings.runner.existingRoleBinding }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding @@ -29,4 +32,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ .Values.serviceAccounts.runner.name }} - namespace: {{ .Values.global.namespace }} \ No newline at end of file + namespace: {{ .Values.global.namespace }} +{{- end }} \ No newline at end of file diff --git a/charts/nx-agents/templates/roles.yaml b/charts/nx-agents/templates/roles.yaml index 30fcb57..94607e9 100644 --- a/charts/nx-agents/templates/roles.yaml +++ b/charts/nx-agents/templates/roles.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.roles.controller.existingRole }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -60,6 +61,8 @@ rules: - jobs/status verbs: - get +{{- end }} +{{- if not .Values.roles.runner.existingRole }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -73,4 +76,5 @@ rules: - services verbs: - get - - list \ No newline at end of file + - list +{{- end }} \ No newline at end of file diff --git a/charts/nx-agents/values.yaml b/charts/nx-agents/values.yaml index d5e8645..b0b6740 100644 --- a/charts/nx-agents/values.yaml +++ b/charts/nx-agents/values.yaml @@ -28,6 +28,22 @@ serviceAccounts: annotations: {} imagePullSecrets: [] +roles: + controller: + # when set to true, controller role will not be created and will use the existing role + existingRole: false + runner: + # when set to true, runner role will not be created and will use the existing role + existingRole: false + +roleBindings: + controller: + # when set to true, controller role binding will not be created and will use the existing role binding + existingRoleBinding: false + runner: + # when set to true, runner role binding will not be created and will use the existing role binding + existingRoleBinding: false + # 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 # your nx-api and frontend deployments in your application cluster. Within Nx, we accomplish this with a service of type