diff --git a/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml b/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml new file mode 100644 index 0000000000000000000000000000000000000000..658f75c8c5018fe5b9f47cf9619bb4ee5b26b8e5 --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/cluster-role-binding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.randomScheduler.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "theodolite.fullname" . }}-random-scheduler +subjects: +- kind: ServiceAccount + name: {{ include "theodolite.fullname" . }}-random-scheduler + namespace: kube-system +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: system:kube-scheduler +{{- end }} diff --git a/execution/helm/templates/theodolite/random-scheduler/deployment.yaml b/execution/helm/templates/theodolite/random-scheduler/deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a1ea535d52d3dce971806dd638a90e9acb81c5d0 --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/deployment.yaml @@ -0,0 +1,30 @@ +{{- if .Values.randomScheduler.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "theodolite.fullname" . }}-random-scheduler + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + namespace: kube-system +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + template: + metadata: + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler + spec: + serviceAccount: {{ include "theodolite.fullname" . }}-random-scheduler + containers: + - name: random-scheduler + image: ghcr.io/cau-se/theodolite-random-scheduler:latest + #imagePullPolicy: Always + env: + - name: TARGET_NAMESPACE + value: {{ .Release.Namespace }} +{{- end }} diff --git a/execution/helm/templates/theodolite/random-scheduler/service-account.yaml b/execution/helm/templates/theodolite/random-scheduler/service-account.yaml new file mode 100644 index 0000000000000000000000000000000000000000..babfff17b46d62e7e820fcb9dc8a35d73b4e6538 --- /dev/null +++ b/execution/helm/templates/theodolite/random-scheduler/service-account.yaml @@ -0,0 +1,10 @@ +{{- if .Values.randomScheduler.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + namespace: kube-system + name: {{ include "theodolite.fullname" . }}-random-scheduler + labels: + app: {{ include "theodolite.fullname" . }} + component: random-scheduler +{{- end }} diff --git a/execution/helm/values.yaml b/execution/helm/values.yaml index 67dab74c3931ce13a1ab0f7504a946a208b4dfb8..4e95e735e4d073bd4d9b2bd3ce2cc55d32c53e09 100644 --- a/execution/helm/values.yaml +++ b/execution/helm/values.yaml @@ -248,3 +248,10 @@ serviceAccount: rbac: create: true + +randomScheduler: + enabled: true + rbac: + create: true + serviceAccount: + create: true