From 8d6cc2b84eaa0a22e24d2de88c2d18713a1af571 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Tue, 26 Mar 2024 21:57:13 +0700 Subject: [PATCH] refactor!: replace docker registry with Zot --- platform/registry/Chart.yaml | 7 --- platform/registry/values.yaml | 46 ------------------- platform/zot/Chart.yaml | 7 +++ .../templates/admin-secret.yaml | 0 platform/zot/values.yaml | 20 ++++++++ 5 files changed, 27 insertions(+), 53 deletions(-) delete mode 100644 platform/registry/Chart.yaml delete mode 100644 platform/registry/values.yaml create mode 100644 platform/zot/Chart.yaml rename platform/{registry => zot}/templates/admin-secret.yaml (100%) create mode 100644 platform/zot/values.yaml diff --git a/platform/registry/Chart.yaml b/platform/registry/Chart.yaml deleted file mode 100644 index eda273c6..00000000 --- a/platform/registry/Chart.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v2 -name: registry -version: 0.0.0 -dependencies: - - name: docker-registry - version: 2.2.2 - repository: https://helm.twun.io diff --git a/platform/registry/values.yaml b/platform/registry/values.yaml deleted file mode 100644 index 67b47e2f..00000000 --- a/platform/registry/values.yaml +++ /dev/null @@ -1,46 +0,0 @@ -docker-registry: - ingress: - enabled: true - className: nginx - hosts: - - &host registry.khuedoan.com - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - tls: - - secretName: registry-tls-certificate - hosts: - - *host - extraVolumes: - - name: auth - emptyDir: {} - extraVolumeMounts: - - mountPath: /auth - name: auth - # TODO uncomment to enable auth - # extraEnvVars: - # - name: REGISTRY_AUTH - # value: "htpasswd" - # - name: REGISTRY_AUTH_HTPASSWD_REALM - # value: "Registry Realm" - # - name: REGISTRY_AUTH_HTPASSWD_PATH - # value: "/auth/htpasswd" - # initContainers: - # - name: htpasswd - # image: httpd:2-alpine - # command: - # - sh - # - -c - # - htpasswd -Bbn "${username}" "${password}" > /auth/htpasswd - # envFrom: - # - secretRef: - # name: registry-admin-secret - # volumeMounts: - # - mountPath: /auth - # name: auth - persistence: - enabled: true - size: 10Gi - garbageCollect: - enabled: true diff --git a/platform/zot/Chart.yaml b/platform/zot/Chart.yaml new file mode 100644 index 00000000..627547b5 --- /dev/null +++ b/platform/zot/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +name: registry +version: 0.0.0 +dependencies: + - name: zot + version: 0.1.52 + repository: http://zotregistry.dev/helm-charts diff --git a/platform/registry/templates/admin-secret.yaml b/platform/zot/templates/admin-secret.yaml similarity index 100% rename from platform/registry/templates/admin-secret.yaml rename to platform/zot/templates/admin-secret.yaml diff --git a/platform/zot/values.yaml b/platform/zot/values.yaml new file mode 100644 index 00000000..9964ab3f --- /dev/null +++ b/platform/zot/values.yaml @@ -0,0 +1,20 @@ +zot: + ingress: + enabled: true + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "0" + className: nginx + hosts: + - host: &host registry.khuedoan.com + paths: + - path: / + tls: + - secretName: zot-tls-certificate + hosts: + - *host + # TODO enable auth + persistence: true + pvc: + create: true + storage: 10Gi