DodoApp: Prepare dodo-app to support multiple app repositories

Previously Git repository storing configuration for PCloud
environment, linked dodo-app repositories directly. After this change,
dodo-app will first create config repository which will link
individual application repositories. And PCloud env will link to the
config repo. That way dodo-app manger will be able to create multiple
app repositories per installation.

Change-Id: I647cacda7a9a4f241d2acc28ae5d8bbd8c6424d6
diff --git a/core/installer/values-tmpl/dodo-app.cue b/core/installer/values-tmpl/dodo-app.cue
index 80d0e4c..abc09b2 100644
--- a/core/installer/values-tmpl/dodo-app.cue
+++ b/core/installer/values-tmpl/dodo-app.cue
@@ -70,7 +70,7 @@
 			serviceType: "ClusterIP"
 			addressPool: ""
 			reservedIP: ""
-			adminKey: strings.Join([input.adminKey, input.fluxKeys.public, input.dAppKeys.public], "\n")
+			adminKey: strings.Join([input.fluxKeys.public, input.dAppKeys.public], "\n")
 			privateKey: input.ssKeys.private
 			publicKey: input.ssKeys.public
 			ingress: {
@@ -97,6 +97,8 @@
 			self: "dodo-app.\(release.namespace).svc.cluster.local"
 			namespace: release.namespace
 			envConfig: base64.Encode(null, json.Marshal(global))
+			appAdminKey: input.adminKey
+			gitRepoPublicKey: input.ssKeys.public
 		}
 	}
 }
@@ -106,15 +108,15 @@
 		apiVersion: "kustomize.toolkit.fluxcd.io/v1"
 		kind: "Kustomization"
 		metadata: {
-			name: "app"
+			name: "config"
 			namespace: release.namespace
 		}
 		spec: {
 			interval: "1m"
-			path: "./.dodo"
+			path: "./"
 			sourceRef: {
 				kind: "GitRepository"
-				name: "app"
+				name: "config"
 				namespace: release.namespace
 			}
 			prune: true
@@ -125,7 +127,7 @@
 		kind: "Secret"
 		type: "Opaque"
 		metadata: {
-			name: "app"
+			name: "config"
 			namespace: release.namespace
 		}
 		data: {
@@ -138,15 +140,15 @@
 		apiVersion: "source.toolkit.fluxcd.io/v1"
 		kind: "GitRepository"
 		metadata: {
-			name: "app"
+			name: "config"
 			namespace: release.namespace
 		}
 		spec: {
 			interval: "1m0s"
-			ref: branch: "dodo"
-			secretRef: name: "app"
+			ref: branch: "master"
+			secretRef: name: "config"
 			timeout: "60s"
-			url: "ssh://soft-serve.\(release.namespace).svc.cluster.local:22/app"
+			url: "ssh://soft-serve.\(release.namespace).svc.cluster.local:22/config"
 		}
 	}
 }