blob: 0c63c76b6666469aa2539693b352bb3eeaeade41 [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
giof9f0bee2024-06-11 20:10:05 +040070 info: "Installing Zot server"
gio4a9d83d2024-04-14 13:14:40 +040071 values: {
72 image: {
73 repository: images.zot.fullName
74 tag: images.zot.tag
75 pullPolicy: images.zot.pullPolicy
76 }
77 service: {
78 type: "ClusterIP"
79 additionalAnnotations: {
80 "metallb.universe.tf/address-pool": global.id
81 }
82 port: _httpPort
83 }
84 ingress: enabled: false
85 mountConfig: true
86 configFiles: {
87 "config.json": json.Marshal({
88 storage: rootDirectory: "/var/lib/registry"
89 http: {
90 address: "0.0.0.0"
91 port: "5000"
92 }
93 log: level: "debug"
94 extensions: {
95 ui: enable: true
96 search: enable: true
97 }
98 })
99 }
giof8843412024-05-22 16:38:05 +0400100 persistence: true
gio4a9d83d2024-04-14 13:14:40 +0400101 pvc: {
102 create: false
103 name: volumes.zot.name
104 }
105 startupProbe: {}
106 }
107 }
108 volume: {
109 chart: charts.volume
giof9f0bee2024-06-11 20:10:05 +0400110 info: "Creating disk"
gio4a9d83d2024-04-14 13:14:40 +0400111 values: volumes.zot
112 }
113}