blob: fd162f1fff20988735286725a99a18de7cb5db0d [file] [log] [blame]
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +04001import (
2 "encoding/base64"
3)
4
5input: {
gio7841f4f2024-07-26 19:53:49 +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
gio44f621b2024-04-29 09:44:38 +040012name: "App Manager"
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +040013namespace: "appmanager"
gio09a3e5b2024-04-26 14:11:06 +040014icon: "<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 24 24'><path fill='currentColor' d='M19 6h-2c0-2.8-2.2-5-5-5S7 3.2 7 6H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-7-3c1.7 0 3 1.3 3 3H9c0-1.7 1.3-3 3-3m7 17H5V8h14zm-7-8c-1.7 0-3-1.3-3-3H7c0 2.8 2.2 5 5 5s5-2.2 5-5h-2c0 1.7-1.3 3-3 3'/></svg>"
Giorgi Lekveishvili03d6f4b2024-03-08 13:05:21 +040015
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040016_subdomain: "apps"
17_httpPortName: "http"
18
gio7841f4f2024-07-26 19:53:49 +040019_domain: "\(_subdomain).\(input.network.domain)"
gio09a3e5b2024-04-26 14:11:06 +040020url: "https://\(_domain)"
21
gio1de49582024-04-21 08:33:57 +040022ingress: {
23 appmanager: {
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040024 auth: {
25 enabled: true
26 groups: input.authGroups
27 }
gio7841f4f2024-07-26 19:53:49 +040028 network: input.network
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040029 subdomain: _subdomain
gio1de49582024-04-21 08:33:57 +040030 service: {
31 name: "appmanager"
32 port: name: _httpPortName
33 }
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040034 }
35}
36
gio1de49582024-04-21 08:33:57 +040037images: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040038 appmanager: {
39 repository: "giolekva"
40 name: "pcloud-installer"
41 tag: "latest"
42 pullPolicy: "Always"
43 }
44}
45
gio1de49582024-04-21 08:33:57 +040046charts: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040047 appmanager: {
giof8843412024-05-22 16:38:05 +040048 kind: "GitRepository"
49 address: "https://github.com/giolekva/pcloud.git"
50 branch: "main"
51 path: "charts/appmanager"
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040052 }
53}
54
gio1de49582024-04-21 08:33:57 +040055helm: {
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040056 appmanager: {
57 chart: charts.appmanager
58 values: {
59 repoAddr: input.repoAddr
60 sshPrivateKey: base64.Encode(null, input.sshPrivateKey)
61 ingress: {
gio7841f4f2024-07-26 19:53:49 +040062 className: input.network.ingressClass
gio09a3e5b2024-04-26 14:11:06 +040063 domain: _domain
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040064 certificateIssuer: ""
65 }
66 clusterRoleName: "\(global.id)-appmanager"
Giorgi Lekveishvili3c91e8b2024-03-25 20:20:14 +040067 portName: _httpPortName
Giorgi Lekveishvilie009a5d2024-01-05 14:10:11 +040068 image: {
69 repository: images.appmanager.fullName
70 tag: images.appmanager.tag
71 pullPolicy: images.appmanager.pullPolicy
72 }
73 }
74 }
75}