blob: fa54dd8ad9f3324322d6569728d92b40dd375fd8 [file] [log] [blame]
gio4a9d83d2024-04-14 13:14:40 +04001import (
2 "encoding/json"
3)
4
5input: {
6 network: #Network
7 subdomain: string
8}
9
10_domain: "\(input.subdomain).\(input.network.domain)"
11
12name: "zot"
13namespace: "app-zot"
14readme: "OCI-native container image registry, simplified"
15description: "OCI-native container image registry, simplified"
16icon: "<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
gio1de49582024-04-21 08:33:57 +040018ingress: {
19 zot: {
20 auth: enabled: false
gio4a9d83d2024-04-14 13:14:40 +040021 network: input.network
22 subdomain: input.subdomain
gio1de49582024-04-21 08:33:57 +040023 service: {
24 name: "zot"
25 port: number: _httpPort // TODO(gio): make optional
26 }
gio4a9d83d2024-04-14 13:14:40 +040027 }
28}
29
30// TODO(gio): configure busybox
gio1de49582024-04-21 08:33:57 +040031images: {
gio4a9d83d2024-04-14 13:14:40 +040032 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
gio1de49582024-04-21 08:33:57 +040041charts: {
gio4a9d83d2024-04-14 13:14:40 +040042 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
60volumes: {
61 zot: {
62 name: "zot"
63 accessMode: "ReadWriteOnce"
64 size: "100Gi"
65 }
66}
67
68_httpPort: 80
69
gio1de49582024-04-21 08:33:57 +040070helm: {
gio4a9d83d2024-04-14 13:14:40 +040071 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}