| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 1 | import ( |
| 2 | "encoding/json" |
| 3 | ) |
| 4 | |
| 5 | input: { |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame^] | 6 | network: #Network @name(Network) |
| 7 | subdomain: string @name(Subdomain) |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 8 | } |
| 9 | |
| 10 | _domain: "\(input.subdomain).\(input.network.domain)" |
| 11 | |
| gio | 44f621b | 2024-04-29 09:44:38 +0400 | [diff] [blame^] | 12 | name: "Zot" |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 13 | namespace: "app-zot" |
| 14 | readme: "OCI-native container image registry, simplified" |
| 15 | description: "OCI-native container image registry, simplified" |
| 16 | icon: "<svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 24 24'><path fill='currentColor' d='M21.231 2.462L7.18 20.923h14.564V24H2.256v-2.462L16.308 3.076H2.975V0h18.256z'/></svg>" |
| 17 | |
| gio | 1de4958 | 2024-04-21 08:33:57 +0400 | [diff] [blame] | 18 | ingress: { |
| 19 | zot: { |
| 20 | auth: enabled: false |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 21 | network: input.network |
| 22 | subdomain: input.subdomain |
| gio | 1de4958 | 2024-04-21 08:33:57 +0400 | [diff] [blame] | 23 | service: { |
| 24 | name: "zot" |
| 25 | port: number: _httpPort // TODO(gio): make optional |
| 26 | } |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 27 | } |
| 28 | } |
| 29 | |
| 30 | // TODO(gio): configure busybox |
| gio | 1de4958 | 2024-04-21 08:33:57 +0400 | [diff] [blame] | 31 | images: { |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 32 | zot: { |
| 33 | registry: "ghcr.io" |
| 34 | repository: "project-zot" |
| 35 | name: "zot-linux-amd64" |
| 36 | tag: "v2.0.3" |
| 37 | pullPolicy: "IfNotPresent" |
| 38 | } |
| 39 | } |
| 40 | |
| gio | 1de4958 | 2024-04-21 08:33:57 +0400 | [diff] [blame] | 41 | charts: { |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 42 | zot: { |
| 43 | chart: "charts/zot" |
| 44 | sourceRef: { |
| 45 | kind: "GitRepository" |
| 46 | name: "pcloud" |
| 47 | namespace: global.id |
| 48 | } |
| 49 | } |
| 50 | volume: { |
| 51 | chart: "charts/volumes" |
| 52 | sourceRef: { |
| 53 | kind: "GitRepository" |
| 54 | name: "pcloud" |
| 55 | namespace: global.id |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | volumes: { |
| 61 | zot: { |
| 62 | name: "zot" |
| 63 | accessMode: "ReadWriteOnce" |
| 64 | size: "100Gi" |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | _httpPort: 80 |
| 69 | |
| gio | 1de4958 | 2024-04-21 08:33:57 +0400 | [diff] [blame] | 70 | helm: { |
| gio | 4a9d83d | 2024-04-14 13:14:40 +0400 | [diff] [blame] | 71 | zot: { |
| 72 | chart: charts.zot |
| 73 | values: { |
| 74 | image: { |
| 75 | repository: images.zot.fullName |
| 76 | tag: images.zot.tag |
| 77 | pullPolicy: images.zot.pullPolicy |
| 78 | } |
| 79 | service: { |
| 80 | type: "ClusterIP" |
| 81 | additionalAnnotations: { |
| 82 | "metallb.universe.tf/address-pool": global.id |
| 83 | } |
| 84 | port: _httpPort |
| 85 | } |
| 86 | ingress: enabled: false |
| 87 | mountConfig: true |
| 88 | configFiles: { |
| 89 | "config.json": json.Marshal({ |
| 90 | storage: rootDirectory: "/var/lib/registry" |
| 91 | http: { |
| 92 | address: "0.0.0.0" |
| 93 | port: "5000" |
| 94 | } |
| 95 | log: level: "debug" |
| 96 | extensions: { |
| 97 | ui: enable: true |
| 98 | search: enable: true |
| 99 | } |
| 100 | }) |
| 101 | } |
| 102 | persistnce: true |
| 103 | pvc: { |
| 104 | create: false |
| 105 | name: volumes.zot.name |
| 106 | } |
| 107 | startupProbe: {} |
| 108 | } |
| 109 | } |
| 110 | volume: { |
| 111 | chart: charts.volume |
| 112 | values: volumes.zot |
| 113 | } |
| 114 | } |