| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 1 | input: { |
| 2 | network: #Network |
| 3 | subdomain: string |
| Giorgi Lekveishvili | a09fad7 | 2024-03-21 15:24:35 +0400 | [diff] [blame] | 4 | auth: #Auth |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 5 | } |
| 6 | |
| 7 | _domain: "\(input.subdomain).\(input.network.domain)" |
| 8 | |
| 9 | name: "url-shortener" |
| 10 | namespace: "app-url-shortener" |
| 11 | readme: "URL shortener application will be installed on \(input.network.name) network and be accessible at https://\(_domain)" |
| 12 | description: "Provides URL shortening service. Can be configured to be reachable only from private network or publicly." |
| Giorgi Lekveishvili | b4fcaa2 | 2024-03-13 16:34:49 +0400 | [diff] [blame] | 13 | icon: "<svg xmlns='http://www.w3.org/2000/svg' width='40.63' height='50' viewBox='0 0 13 16'><circle cx='2' cy='10' r='1' fill='currentColor'/><circle cx='2' cy='6' r='1' fill='currentColor'/><path fill='currentColor' d='M4.5 14c-.06 0-.11 0-.17-.03a.501.501 0 0 1-.3-.64l4-11a.501.501 0 0 1 .94.34l-4 11c-.07.2-.27.33-.47.33m3 0c-.06 0-.11 0-.17-.03a.501.501 0 0 1-.3-.64l4-11a.501.501 0 0 1 .94.34l-4 11c-.07.2-.27.33-.47.33'/></svg>" |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 14 | |
| Giorgi Lekveishvili | 6738396 | 2024-03-22 19:27:34 +0400 | [diff] [blame] | 15 | _httpPortName: "http" |
| 16 | |
| 17 | _ingressWithAuthProxy: _IngressWithAuthProxy & { |
| 18 | inp: { |
| 19 | auth: input.auth |
| 20 | network: input.network |
| 21 | subdomain: input.subdomain |
| 22 | serviceName: "url-shortener" |
| 23 | port: name: _httpPortName |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | images: _ingressWithAuthProxy.out.images & { |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 28 | urlShortener: { |
| 29 | repository: "giolekva" |
| 30 | name: "url-shortener" |
| 31 | tag: "latest" |
| 32 | pullPolicy: "Always" |
| 33 | } |
| 34 | } |
| 35 | |
| Giorgi Lekveishvili | 6738396 | 2024-03-22 19:27:34 +0400 | [diff] [blame] | 36 | charts: _ingressWithAuthProxy.out.charts & { |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 37 | urlShortener: { |
| 38 | chart: "charts/url-shortener" |
| 39 | sourceRef: { |
| 40 | kind: "GitRepository" |
| 41 | name: "pcloud" |
| 42 | namespace: global.id |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| Giorgi Lekveishvili | 6738396 | 2024-03-22 19:27:34 +0400 | [diff] [blame] | 47 | helm: _ingressWithAuthProxy.out.helm & { |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 48 | "url-shortener": { |
| Giorgi Lekveishvili | b4fcaa2 | 2024-03-13 16:34:49 +0400 | [diff] [blame] | 49 | chart: charts.urlShortener |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 50 | values: { |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 51 | storage: { |
| 52 | size: "1Gi" |
| 53 | } |
| 54 | image: { |
| 55 | repository: images.urlShortener.fullName |
| 56 | tag: images.urlShortener.tag |
| 57 | pullPolicy: images.urlShortener.pullPolicy |
| 58 | } |
| Giorgi Lekveishvili | 0ba5e40 | 2024-03-20 15:56:30 +0400 | [diff] [blame] | 59 | portName: _httpPortName |
| Giorgi Lekveishvili | 6738396 | 2024-03-22 19:27:34 +0400 | [diff] [blame] | 60 | requireAuth: input.auth.enabled |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 61 | } |
| 62 | } |
| DTabidze | 0993581 | 2024-03-13 13:47:39 +0400 | [diff] [blame] | 63 | } |