blob: ac0674e1f11c819b7e1580390116c3e4e8bb4439 [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: {
44 chart: "charts/zot"
45 sourceRef: {
46 kind: "GitRepository"
47 name: "pcloud"
48 namespace: global.id
49 }
50 }
51 volume: {
52 chart: "charts/volumes"
53 sourceRef: {
54 kind: "GitRepository"
55 name: "pcloud"
56 namespace: global.id
57 }
58 }
59}
60
61volumes: {
62 zot: {
63 name: "zot"
64 accessMode: "ReadWriteOnce"
65 size: "100Gi"
66 }
67}
68
69_httpPort: 80
70
gio1de49582024-04-21 08:33:57 +040071helm: {
gio4a9d83d2024-04-14 13:14:40 +040072 zot: {
73 chart: charts.zot
74 values: {
75 image: {
76 repository: images.zot.fullName
77 tag: images.zot.tag
78 pullPolicy: images.zot.pullPolicy
79 }
80 service: {
81 type: "ClusterIP"
82 additionalAnnotations: {
83 "metallb.universe.tf/address-pool": global.id
84 }
85 port: _httpPort
86 }
87 ingress: enabled: false
88 mountConfig: true
89 configFiles: {
90 "config.json": json.Marshal({
91 storage: rootDirectory: "/var/lib/registry"
92 http: {
93 address: "0.0.0.0"
94 port: "5000"
95 }
96 log: level: "debug"
97 extensions: {
98 ui: enable: true
99 search: enable: true
100 }
101 })
102 }
103 persistnce: true
104 pvc: {
105 create: false
106 name: volumes.zot.name
107 }
108 startupProbe: {}
109 }
110 }
111 volume: {
112 chart: charts.volume
113 values: volumes.zot
114 }
115}