DodoApp: API to create new app
Change-Id: I20d73ef17cc03073c913fceb4f3bed7a26754cea
diff --git a/charts/dodo-app/templates/install.yaml b/charts/dodo-app/templates/install.yaml
index 30a6553..b8c1359 100644
--- a/charts/dodo-app/templates/install.yaml
+++ b/charts/dodo-app/templates/install.yaml
@@ -1,23 +1,35 @@
apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
+kind: ClusterRole
metadata:
- name: job-creator
+ name: {{ .Values.clusterRoleName }}
rules:
- apiGroups:
+ - ""
+ resources:
+ - namespaces
+ verbs:
+ - create
+- apiGroups:
- "batch"
resources:
- jobs
verbs:
- create
+- apiGroups:
+ - "helm.toolkit.fluxcd.io"
+ resources:
+ - helmreleases
+ verbs:
+ - get
---
apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
+kind: ClusterRoleBinding
metadata:
- name: job-creator
+ name: {{ .Values.clusterRoleName }}
roleRef:
apiGroup: rbac.authorization.k8s.io
- kind: Role
- name: job-creator
+ kind: ClusterRole
+ name: {{ .Values.clusterRoleName }}
subjects:
- kind: ServiceAccount
name: default
diff --git a/charts/dodo-app/values.yaml b/charts/dodo-app/values.yaml
index c606c50..66588cf 100644
--- a/charts/dodo-app/values.yaml
+++ b/charts/dodo-app/values.yaml
@@ -2,6 +2,7 @@
repository: giolekva/pcloud-installer
tag: latest
pullPolicy: Always
+clusterRoleName: dodo-app-creator
repoAddr: 192.168.0.11
sshPrivateKey: key
self: ""