blob: 97b4cf61af0b0f6a0d42580e5119d6d17e1dfe6a [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001import (
2 "encoding/base64"
3)
4
5input: {
gio9bd87ca2025-04-20 08:05:34 +04006 network: #Network @name(Network)
7 repoAddr: string @name(Repository Address)
8 sshPrivateKey: string @name(SSH Private Key)
9 authGroups: string @name(Allowed Groups)
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040010}
11
gio9bd87ca2025-04-20 08:05:34 +040012name: "App Manager"
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +040013namespace: "appmanager"
gio8c942d22024-07-17 13:43:02 +040014icon: """
giod2d2df02025-05-03 19:15:17 +040015 <svg width='50px' height='50px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 33.66287237 39.68503937'>
16 <defs>
17 <style>
18 .cls-1 {
19 fill: currentColor;
20 }
21 </style>
22 </defs>
23 <path class='cls-1' d='m2.77885812,10.03744798c-1.53217449,0-2.77885812,1.24698542-2.77885812,2.77885812v24.08987515c0,1.5318727,1.24668363,2.77885812,2.77885812,2.77885812h28.10515613c1.53217449,0,2.77885812-1.24698542,2.77885812-2.77885812V12.8163061c0-1.5318727-1.24668363-2.77885812-2.77885812-2.77885812h-5.25110027v-1.23612107c0-4.9348271-3.86589623-8.80132691-8.80132691-8.80132691s-8.80162869,3.86649981-8.80162869,8.80132691v1.23612107H2.77885812Zm29.34127721,28.10485435H1.54273704V11.58018502h30.57739828v26.5621173ZM8.11234634,16.05991677c.58426035,4.33004521,4.20419987,7.56520583,8.71924074,7.56520583,4.51473908,0,8.1346786-3.23516062,8.71893895-7.56520583h-1.56084429c-.57067992,3.46210473-3.51008892,6.02246879-7.15809467,6.02246879s-6.58771654-2.56036406-7.15839646-6.02246879h-1.56084429Zm15.9778306-6.02246879h-14.51748151v-1.23612107c0-4.07050807,3.18838358-7.25858986,7.25889165-7.25858986,4.07020628,0,7.25858986,3.18808179,7.25858986,7.25858986v1.23612107Z'/>
24 </svg>"""
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +040025
gio24312cc2025-04-20 15:53:15 +040026_subdomain: "apps"
27_webPort: 8080
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040028
gio7841f4f2024-07-26 19:53:49 +040029_domain: "\(_subdomain).\(input.network.domain)"
gio9bd87ca2025-04-20 08:05:34 +040030url: "https://\(_domain)"
gio09a3e5b2024-04-26 14:11:06 +040031
gio7fbd4ad2024-08-27 10:06:39 +040032out: {
33 ingress: {
34 appmanager: {
35 auth: {
36 enabled: true
gio9bd87ca2025-04-20 08:05:34 +040037 groups: input.authGroups
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040038 }
gio9bd87ca2025-04-20 08:05:34 +040039 network: input.network
gio7fbd4ad2024-08-27 10:06:39 +040040 subdomain: _subdomain
41 service: {
42 name: "appmanager"
gio24312cc2025-04-20 15:53:15 +040043 port: _webPort
gio7fbd4ad2024-08-27 10:06:39 +040044 }
45 }
46 }
47
48 images: {
49 appmanager: {
50 repository: "giolekva"
gio9bd87ca2025-04-20 08:05:34 +040051 name: "pcloud-installer"
52 tag: "latest"
gio7fbd4ad2024-08-27 10:06:39 +040053 pullPolicy: "Always"
54 }
55 }
56
57 charts: {
58 appmanager: {
gio9bd87ca2025-04-20 08:05:34 +040059 kind: "GitRepository"
gio7fbd4ad2024-08-27 10:06:39 +040060 address: "https://code.v1.dodo.cloud/helm-charts"
gio9bd87ca2025-04-20 08:05:34 +040061 branch: "main"
62 path: "charts/appmanager"
gio7fbd4ad2024-08-27 10:06:39 +040063 }
64 }
65
66 helm: {
67 appmanager: {
68 chart: charts.appmanager
69 values: {
gio9bd87ca2025-04-20 08:05:34 +040070 repoAddr: input.repoAddr
gio7fbd4ad2024-08-27 10:06:39 +040071 sshPrivateKey: base64.Encode(null, input.sshPrivateKey)
giof6ad2982024-08-23 17:42:49 +040072 // TODO(gio): de-hardcode these variables
gio9bd87ca2025-04-20 08:05:34 +040073 headscaleAPIAddr: "http://headscale-api.\(global.namespacePrefix)app-headscale.svc.cluster.local"
74 dnsAPIAddr: "http://dns-api.\(global.namespacePrefix)dns.svc.cluster.local"
giof6ad2982024-08-23 17:42:49 +040075 clusterProxyConfigPath: "/apps/private-network/resources/proxy-backend-config.yaml"
gio7fbd4ad2024-08-27 10:06:39 +040076 ingress: {
gio9bd87ca2025-04-20 08:05:34 +040077 className: input.network.ingressClass
78 domain: _domain
gio7fbd4ad2024-08-27 10:06:39 +040079 certificateIssuer: ""
80 }
81 clusterRoleName: "\(global.id)-appmanager"
gio24312cc2025-04-20 15:53:15 +040082 port: _webPort
gio7fbd4ad2024-08-27 10:06:39 +040083 image: {
84 repository: images.appmanager.fullName
gio9bd87ca2025-04-20 08:05:34 +040085 tag: images.appmanager.tag
gio7fbd4ad2024-08-27 10:06:39 +040086 pullPolicy: images.appmanager.pullPolicy
87 }
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040088 }
89 }
90 }
91}