blob: f83c671f67a0ddd2f0af40235b3cbe815c3a00e6 [file] [log] [blame]
gio4a9d83d2024-04-14 13:14:40 +04001import (
2 "encoding/json"
3)
4
5input: {
gio44f621b2024-04-29 09:44:38 +04006 network: #Network @name(Network)
7 subdomain: string @name(Subdomain)
gio4a9d83d2024-04-14 13:14:40 +04008}
9
10_domain: "\(input.subdomain).\(input.network.domain)"
gio09a3e5b2024-04-26 14:11:06 +040011url: "https://\(_domain)"
gio4a9d83d2024-04-14 13:14:40 +040012
gio44f621b2024-04-29 09:44:38 +040013name: "Zot"
gio4a9d83d2024-04-14 13:14:40 +040014namespace: "app-zot"
15readme: "OCI-native container image registry, simplified"
16description: "OCI-native container image registry, simplified"
17icon: "<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>"
18
gio1de49582024-04-21 08:33:57 +040019ingress: {
20 zot: {
21 auth: enabled: false
gio4a9d83d2024-04-14 13:14:40 +040022 network: input.network
23 subdomain: input.subdomain
gio1de49582024-04-21 08:33:57 +040024 service: {
25 name: "zot"
26 port: number: _httpPort // TODO(gio): make optional
27 }
gio4a9d83d2024-04-14 13:14:40 +040028 }
29}
30
31// TODO(gio): configure busybox
gio1de49582024-04-21 08:33:57 +040032images: {
gio4a9d83d2024-04-14 13:14:40 +040033 zot: {
34 registry: "ghcr.io"
35 repository: "project-zot"
36 name: "zot-linux-amd64"
37 tag: "v2.0.3"
38 pullPolicy: "IfNotPresent"
39 }
40}
41
gio1de49582024-04-21 08:33:57 +040042charts: {
gio4a9d83d2024-04-14 13:14:40 +040043 zot: {
giof8843412024-05-22 16:38:05 +040044 kind: "GitRepository"
45 address: "https://github.com/giolekva/pcloud.git"
46 branch: "main"
47 path: "charts/zot"
gio4a9d83d2024-04-14 13:14:40 +040048 }
49 volume: {
giof8843412024-05-22 16:38:05 +040050 kind: "GitRepository"
51 address: "https://github.com/giolekva/pcloud.git"
52 branch: "main"
53 path: "charts/volumes"
gio4a9d83d2024-04-14 13:14:40 +040054 }
55}
56
57volumes: {
58 zot: {
59 name: "zot"
60 accessMode: "ReadWriteOnce"
61 size: "100Gi"
62 }
63}
64
65_httpPort: 80
66
gio1de49582024-04-21 08:33:57 +040067helm: {
gio4a9d83d2024-04-14 13:14:40 +040068 zot: {
69 chart: charts.zot
70 values: {
71 image: {
72 repository: images.zot.fullName
73 tag: images.zot.tag
74 pullPolicy: images.zot.pullPolicy
75 }
76 service: {
77 type: "ClusterIP"
78 additionalAnnotations: {
79 "metallb.universe.tf/address-pool": global.id
80 }
81 port: _httpPort
82 }
83 ingress: enabled: false
84 mountConfig: true
85 configFiles: {
86 "config.json": json.Marshal({
87 storage: rootDirectory: "/var/lib/registry"
88 http: {
89 address: "0.0.0.0"
90 port: "5000"
91 }
92 log: level: "debug"
93 extensions: {
94 ui: enable: true
95 search: enable: true
96 }
97 })
98 }
giof8843412024-05-22 16:38:05 +040099 persistence: true
gio4a9d83d2024-04-14 13:14:40 +0400100 pvc: {
101 create: false
102 name: volumes.zot.name
103 }
104 startupProbe: {}
105 }
106 }
107 volume: {
108 chart: charts.volume
109 values: volumes.zot
110 }
111}