blob: 1fa70c43442bb1faecabead05ebfef77291687fe [file] [log] [blame]
DTabidze09935812024-03-13 13:47:39 +04001input: {
gio44f621b2024-04-29 09:44:38 +04002 network: #Network @name(Network)
3 subdomain: string @name(Subdomain)
4 auth: #Auth @name(Authentication)
gio7fbd4ad2024-08-27 10:06:39 +04005 storageSize: string @name(Storage Size)
DTabidze09935812024-03-13 13:47:39 +04006}
7
8_domain: "\(input.subdomain).\(input.network.domain)"
gio09a3e5b2024-04-26 14:11:06 +04009url: "https://\(_domain)"
DTabidze09935812024-03-13 13:47:39 +040010
gio44f621b2024-04-29 09:44:38 +040011name: "URL Shortener"
DTabidze09935812024-03-13 13:47:39 +040012namespace: "app-url-shortener"
13readme: "URL shortener application will be installed on \(input.network.name) network and be accessible at https://\(_domain)"
14description: "Provides URL shortening service. Can be configured to be reachable only from private network or publicly."
gio8c942d22024-07-17 13:43:02 +040015icon: """
16<svg width='50px' height='50px' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36.43807123 39.68503937'>
17 <defs>
18 <style>
19 .cls-1 {
20 fill: currentColor;
21 }
22
23 .cls-2 {
24 fill: none;
25 stroke: #3a3a3a;
26 stroke-miterlimit: 10;
27 stroke-width: .98133445px;
28 }
29 </style>
30 </defs>
31 <rect class='cls-2' x='-11.59787432' y='-9.97439025' width='59.63381987' height='59.63381987'/>
32 <g>
33 <circle class='cls-1' cx='3.31578123' cy='26.42191445' r='3.31578123'/>
34 <circle class='cls-1' cx='3.31578123' cy='13.15878954' r='3.31578123'/>
35 <path class='cls-1' d='m11.6052343,39.68503937c-.19894668,0-.36473638,0-.56368306-.09947255-.85909349-.31306169-1.30368349-1.26152142-.994735-2.12210113L23.30994116.98987217c.37099907-.83910142,1.3519786-1.21857512,2.19107766-.84757764.75807463.33517241,1.1530841,1.1778629.92575531,1.97494297l-13.26312492,36.47359431c-.23210526.66315561-.89526087,1.09420755-1.55841648,1.09420755m9.94734369,0c-.19894668,0-.36473638,0-.56368306-.09947255-.85909349-.31306169-1.3036827-1.26152142-.994735-2.12210113L33.25728168.98987217c.37099907-.83910142,1.3519786-1.21857512,2.19107766-.84757764.75807463.33517241,1.1530841,1.1778629.92575531,1.97494297l-13.26312492,36.47359431c-.23210526.66315561-.89526087,1.09420755-1.55841648,1.09420755'/>
36 </g>
37</svg>"""
DTabidze09935812024-03-13 13:47:39 +040038
Giorgi Lekveishvili67383962024-03-22 19:27:34 +040039_httpPortName: "http"
40
gio7fbd4ad2024-08-27 10:06:39 +040041out: {
42 ingress: {
43 "url-shorteners": {
44 auth: input.auth
45 network: input.network
46 subdomain: input.subdomain
47 service: {
48 name: "url-shortener"
49 port: name: _httpPortName
50 }
gio1de49582024-04-21 08:33:57 +040051 }
Giorgi Lekveishvili67383962024-03-22 19:27:34 +040052 }
Giorgi Lekveishvili67383962024-03-22 19:27:34 +040053
gio7fbd4ad2024-08-27 10:06:39 +040054 images: {
55 urlShortener: {
56 repository: "giolekva"
57 name: "url-shortener"
58 tag: "latest"
59 pullPolicy: "Always"
60 }
DTabidze09935812024-03-13 13:47:39 +040061 }
DTabidze09935812024-03-13 13:47:39 +040062
gio7fbd4ad2024-08-27 10:06:39 +040063 charts: {
64 urlShortener: {
65 kind: "GitRepository"
66 address: "https://code.v1.dodo.cloud/helm-charts"
67 branch: "main"
68 path: "charts/url-shortener"
69 }
70 }
DTabidze09935812024-03-13 13:47:39 +040071
gio7fbd4ad2024-08-27 10:06:39 +040072 volumes: data: size: input.storageSize
73
74 helm: {
75 "url-shortener": {
76 chart: charts.urlShortener
77 info: "Installing server"
78 values: {
79 image: {
80 repository: images.urlShortener.fullName
81 tag: images.urlShortener.tag
82 pullPolicy: images.urlShortener.pullPolicy
83 }
84 portName: _httpPortName
85 persistentVolumeClaimNama: volumes.data.name
86 requireAuth: input.auth.enabled
DTabidze09935812024-03-13 13:47:39 +040087 }
gio7fbd4ad2024-08-27 10:06:39 +040088 }
89 }
DTabidze09935812024-03-13 13:47:39 +040090}