AppManager: Add API endpoint to install dodo app
Refactors cue definitions.
Next steps:
* Needs some cleanup, namespace is hard coded ...
* Maybe merge with regular install API
* Support exposing ports across clusters
Change-Id: Ibfc3c3f742b61f2c5874012fe6c77b958eae81d9
diff --git a/core/installer/values-tmpl/config-repo.cue b/core/installer/values-tmpl/config-repo.cue
index 4fdb20a..384ee3f 100644
--- a/core/installer/values-tmpl/config-repo.cue
+++ b/core/installer/values-tmpl/config-repo.cue
@@ -26,7 +26,7 @@
}
}
- volumes: data: size: "1Gi"
+ volume: data: size: "1Gi"
helm: {
softserve: {
@@ -43,7 +43,7 @@
tag: images.softserve.tag
pullPolicy: images.softserve.pullPolicy
}
- persistentVolumeClaimName: volumes.data.name
+ persistentVolumeClaimName: volume.data.name
}
}
}
diff --git a/core/installer/values-tmpl/dodo-app.cue b/core/installer/values-tmpl/dodo-app.cue
index 349f0d6..5ad606e 100644
--- a/core/installer/values-tmpl/dodo-app.cue
+++ b/core/installer/values-tmpl/dodo-app.cue
@@ -83,7 +83,7 @@
}
}
- volumes: {
+ volume: {
"config-repo": size: "10Gi"
db: size: "10Gi"
}
@@ -137,7 +137,7 @@
tag: images.softserve.tag
pullPolicy: images.softserve.pullPolicy
}
- persistentVolumeClaimName: volumes["config-repo"].name
+ persistentVolumeClaimName: volume["config-repo"].name
}
}
"dodo-app": {
@@ -161,7 +161,7 @@
envAppManagerAddr: "http://appmanager.\(global.namespacePrefix)appmanager.svc.cluster.local"
envConfig: base64.Encode(null, json.Marshal(global))
gitRepoPublicKey: input.ssKeys.public
- persistentVolumeClaimName: volumes.db.name
+ persistentVolumeClaimName: volume.db.name
allowedNetworks: strings.Join([for n in input.allowedNetworks { n.name }], ",")
external: input.external
fetchUsersAddr: "http://memberships-api.\(global.namespacePrefix)core-auth-memberships.svc.cluster.local/api/users"
diff --git a/core/installer/values-tmpl/env-dns.cue b/core/installer/values-tmpl/env-dns.cue
index 2b73ada..f5b8ac2 100644
--- a/core/installer/values-tmpl/env-dns.cue
+++ b/core/installer/values-tmpl/env-dns.cue
@@ -53,10 +53,11 @@
}
}
- volumes: data: {
+ volume: data: {
accessMode: "ReadWriteMany"
size: "5Gi"
}
+ _volume: volume
helm: {
coredns: {
@@ -116,11 +117,11 @@
}]
extraConfig: import: parameters: "\(_mountPath)/coredns.conf"
extraVolumes: [{
- name: volumes.data.name
- persistentVolumeClaim: claimName: volumes.data.name
+ name: volume.data.name
+ persistentVolumeClaim: claimName: volume.data.name
}]
extraVolumeMounts: [{
- name: volumes.data.name
+ name: volume.data.name
mountPath: _mountPath
}]
livenessProbe: {
@@ -161,7 +162,7 @@
nameserverIP: strings.Join(global.nameserverIP, ",")
service: type: "ClusterIP"
volume: {
- claimName: volumes.data.name
+ claimName: _volume.data.name
mountPath: _mountPath
}
}
diff --git a/core/installer/values-tmpl/etherpad.cue b/core/installer/values-tmpl/etherpad.cue
index 980c5eb..a70b7cd 100644
--- a/core/installer/values-tmpl/etherpad.cue
+++ b/core/installer/values-tmpl/etherpad.cue
@@ -46,7 +46,7 @@
}
}
- volumes: data: size: "1Gi"
+ volume: data: size: "1Gi"
postgresql: db: {
name: "db"
@@ -64,7 +64,7 @@
pullPolicy: images.etherpad.pullPolicy
}
portName: _httpPortName
- persistentVolumeClaimName: volumes.data.name
+ persistentVolumeClaimName: volume.data.name
db: {
type: "postgres"
host: "postgres-db.\(release.namespace).svc.cluster.local"
diff --git a/core/installer/values-tmpl/gerrit.cue b/core/installer/values-tmpl/gerrit.cue
index 2c57ed5..c783817 100644
--- a/core/installer/values-tmpl/gerrit.cue
+++ b/core/installer/values-tmpl/gerrit.cue
@@ -104,7 +104,7 @@
}
}
- volumes: {
+ volume: {
git: {
accessMode: "ReadWriteMany"
size: "50Gi"
@@ -246,14 +246,14 @@
gitRepositoryStorage: {
externalPVC: {
use: true
- name: volumes.git.name
+ name: volume.git.name
}
}
logStorage: {
enabled: true
externalPVC: {
use: true
- name: volumes.logs.name
+ name: volume.logs.name
}
}
ingress: enabled: false
diff --git a/core/installer/values-tmpl/jenkins.cue b/core/installer/values-tmpl/jenkins.cue
index 3169853..5d4110e 100644
--- a/core/installer/values-tmpl/jenkins.cue
+++ b/core/installer/values-tmpl/jenkins.cue
@@ -69,7 +69,7 @@
}
}
- volumes: jenkins: size: "10Gi"
+ volume: jenkins: size: "10Gi"
helm: {
"oauth2-client": {
@@ -140,7 +140,7 @@
}
persistence: {
enabled: true
- existingClaim: volumes.jenkins.name
+ existingClaim: volume.jenkins.name
}
}
}
diff --git a/core/installer/values-tmpl/memberships.cue b/core/installer/values-tmpl/memberships.cue
index 95a2b60..521c4d1 100644
--- a/core/installer/values-tmpl/memberships.cue
+++ b/core/installer/values-tmpl/memberships.cue
@@ -49,7 +49,7 @@
}
}
- volumes: data: size: "1Gi"
+ volume: data: size: "1Gi"
helm: {
memberships: {
@@ -61,7 +61,7 @@
pullPolicy: images.memberships.pullPolicy
}
portName: _httpPortName
- volumeClaimName: volumes.data.name
+ volumeClaimName: volume.data.name
}
}
}
diff --git a/core/installer/values-tmpl/open-project.cue b/core/installer/values-tmpl/open-project.cue
index 6598094..10234b4 100644
--- a/core/installer/values-tmpl/open-project.cue
+++ b/core/installer/values-tmpl/open-project.cue
@@ -63,7 +63,7 @@
}
}
- volumes: {
+ volume: {
openProject: {
name: "open-project"
accessMode: "ReadWriteMany"
@@ -99,7 +99,7 @@
}
persistence: {
enabled: true
- existingClaim: volumes.openProject.name
+ existingClaim: volume.openProject.name
}
postgresql: {
bundled: false
@@ -129,7 +129,7 @@
}
"open-project-volume": {
chart: charts.volume
- values: volumes.openProject
+ values: volume.openProject
}
postgres: {
chart: charts.postgres
diff --git a/core/installer/values-tmpl/pihole.cue b/core/installer/values-tmpl/pihole.cue
index 01a3ca1..6607409 100644
--- a/core/installer/values-tmpl/pihole.cue
+++ b/core/installer/values-tmpl/pihole.cue
@@ -65,7 +65,7 @@
}
}
- volumes: data: size: input.storageSize
+ volume: data: size: input.storageSize
helm: {
pihole: {
@@ -75,7 +75,7 @@
fullnameOverride: "pihole"
persistentVolumeClaim: {
enabled: true
- existingClaim: volumes.data.name
+ existingClaim: volume.data.name
}
admin: {
enabled: false
diff --git a/core/installer/values-tmpl/soft-serve.cue b/core/installer/values-tmpl/soft-serve.cue
index dae0515..23e07bb 100644
--- a/core/installer/values-tmpl/soft-serve.cue
+++ b/core/installer/values-tmpl/soft-serve.cue
@@ -77,7 +77,7 @@
}
}]
- volumes: data: size: "1Gi"
+ volume: data: size: "1Gi"
helm: {
softserve: {
@@ -88,7 +88,7 @@
adminKey: input.adminKey
host: _domain
sshPublicPort: input.sshPort
- persistentVolumeClaimName: volumes.data.name
+ persistentVolumeClaimName: volume.data.name
image: {
repository: images.softserve.fullName
tag: images.softserve.tag
diff --git a/core/installer/values-tmpl/url-shortener.cue b/core/installer/values-tmpl/url-shortener.cue
index 1fa70c4..9f401fb 100644
--- a/core/installer/values-tmpl/url-shortener.cue
+++ b/core/installer/values-tmpl/url-shortener.cue
@@ -69,7 +69,7 @@
}
}
- volumes: data: size: input.storageSize
+ volume: data: size: input.storageSize
helm: {
"url-shortener": {
@@ -82,7 +82,7 @@
pullPolicy: images.urlShortener.pullPolicy
}
portName: _httpPortName
- persistentVolumeClaimNama: volumes.data.name
+ persistentVolumeClaimNama: volume.data.name
requireAuth: input.auth.enabled
}
}
diff --git a/core/installer/values-tmpl/vaultwarden.cue b/core/installer/values-tmpl/vaultwarden.cue
index 69ac75f..7b68190 100644
--- a/core/installer/values-tmpl/vaultwarden.cue
+++ b/core/installer/values-tmpl/vaultwarden.cue
@@ -62,7 +62,7 @@
}
}
- volumes: data: size: input.storageSize
+ volume: data: size: input.storageSize
helm: {
vaultwarden: {
@@ -75,7 +75,7 @@
pullPolicy: images.vaultwarden.pullPolicy
}
domain: _domain
- persistentVolumeClaimName: volumes.data.name
+ persistentVolumeClaimName: volume.data.name
httpPortName: _httpPortName
}
}
diff --git a/core/installer/values-tmpl/zot.cue b/core/installer/values-tmpl/zot.cue
index c5cf631..4f98388 100644
--- a/core/installer/values-tmpl/zot.cue
+++ b/core/installer/values-tmpl/zot.cue
@@ -84,7 +84,7 @@
}
}
- volumes: zot: size: "100Gi"
+ volume: zot: size: "100Gi"
_httpPort: 80
_oauth2ClientSecretName: "oauth2-client"
@@ -176,7 +176,7 @@
persistence: true
pvc: {
create: false
- name: volumes.zot.name
+ name: volume.zot.name
}
extraVolumes: [{
name: "config"