| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 1 | input: { |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 2 | network: #Network @name(Network) |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame] | 3 | subdomain: string @name(Subdomain) |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 4 | sshPort: int @name(SSH Port) |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame] | 5 | adminKey: string @name(Admin SSH Public Key) |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 6 | } |
| 7 | |
| gio | 0eaf271 | 2024-04-14 13:08:46 +0400 | [diff] [blame] | 8 | _domain: "\(input.subdomain).\(input.network.domain)" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 9 | |
| Giorgi Lekveishvili | ef21c13 | 2024-01-17 18:57:58 +0400 | [diff] [blame] | 10 | name: "Soft-Serve" |
| 11 | namespace: "app-soft-serve" |
| 12 | // TODO(gio): make public network an option |
| 13 | readme: "softserve application will be installed on private network and be accessible to any user on https://\(_domain)" |
| 14 | description: "A tasty, self-hostable Git server for the command line. 🍦" |
| 15 | icon: "<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 48 48'><g fill='none' stroke='currentColor' stroke-linecap='round' stroke-width='4'><path stroke-linejoin='round' d='M15.34 22.5L21 37l3 6l3-6l5.66-14.5'/><path d='M19 32h10'/><path stroke-linejoin='round' d='M24 3c-6 0-8 6-8 6s-6 2-6 7s5 7 5 7s3.5-2 9-2s9 2 9 2s5-2 5-7s-6-7-6-7s-2-6-8-6Z'/></g></svg>" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 16 | |
| 17 | images: { |
| 18 | softserve: { |
| 19 | repository: "charmcli" |
| 20 | name: "soft-serve" |
| 21 | tag: "v0.7.1" |
| 22 | pullPolicy: "IfNotPresent" |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | charts: { |
| 27 | softserve: { |
| gio | f884341 | 2024-05-22 16:38:05 +0400 | [diff] [blame] | 28 | kind: "GitRepository" |
| 29 | address: "https://github.com/giolekva/pcloud.git" |
| 30 | branch: "main" |
| 31 | path: "charts/soft-serve" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 32 | } |
| 33 | } |
| 34 | |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 35 | ingress: { |
| gio | 0eaf271 | 2024-04-14 13:08:46 +0400 | [diff] [blame] | 36 | gerrit: { // TODO(gio): rename to soft-serve |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 37 | auth: enabled: false |
| 38 | network: input.network |
| 39 | subdomain: input.subdomain |
| 40 | service: { |
| 41 | name: "soft-serve" |
| 42 | port: number: 80 |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | portForward: [#PortForward & { |
| 48 | allocator: input.network.allocatePortAddr |
| 49 | sourcePort: input.sshPort |
| 50 | // TODO(gio): namespace part must be populated by app manager. Otherwise |
| 51 | // third-party app developer might point to a service from different namespace. |
| 52 | targetService: "\(release.namespace)/soft-serve" |
| 53 | targetPort: 22 |
| 54 | }] |
| 55 | |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 56 | helm: { |
| 57 | softserve: { |
| 58 | chart: charts.softserve |
| gio | f9f0bee | 2024-06-11 20:10:05 +0400 | [diff] [blame^] | 59 | info: "Installing SoftServe server" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 60 | values: { |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 61 | serviceType: "ClusterIP" |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 62 | adminKey: input.adminKey |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 63 | sshPublicPort: input.sshPort |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 64 | ingress: { |
| 65 | enabled: false |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 66 | domain: _domain |
| Giorgi Lekveishvili | e009a5d | 2024-01-05 14:10:11 +0400 | [diff] [blame] | 67 | } |
| 68 | image: { |
| 69 | repository: images.softserve.fullName |
| 70 | tag: images.softserve.tag |
| 71 | pullPolicy: images.softserve.pullPolicy |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | } |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 76 | |
| 77 | help: [{ |
| 78 | title: "Access" |
| 79 | contents: """ |
| 80 | SSH CLI: ssh \(_domain) -p \(input.sshPort) help |
| 81 | SSH TUI: ssh \(_domain) -p \(input.sshPort) |
| gio | 4e3e998 | 2024-05-20 13:09:45 +0400 | [diff] [blame] | 82 | Create repository: ssh \(_domain) -p \(input.sshPort) repos create \\<REPO-NAME\\> |
| 83 | HTTP: git clone https://\(_domain)/\\<REPO-NAME\\> |
| 84 | SSH: git clone ssh://\(_domain):\(input.sshPort)/\\<REPO-NAME\\> |
| gio | ff2a29a | 2024-05-01 17:06:42 +0400 | [diff] [blame] | 85 | |
| 86 | See following resource on what you can do with Soft-Serve TUI: [https://github.com/charmbracelet/soft-serve](https://github.com/charmbracelet/soft-serve) |
| 87 | """ |
| 88 | }] |