diff --git a/kubernetes/README.md b/kubernetes/README.md index b7244ac..a5c217b 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -178,7 +178,8 @@ in desired namespaces by deploying the Certificate resource in the namespace. # Deploy Private Docker Registry (Deprecated) -The private docker registry is depcrecated in favor of gitea image registry. +> **Note:** The docker registry helm chart is deprecated in favor of gitea image +> registry. Create a new namespace called docker-registry and deploy the private docker-registry. @@ -194,7 +195,12 @@ kubectl create secret generic registry-credentials \ -n docker-registry ``` -Next, deploy the docker registry with helm chart: +Next, deploy the docker registry with helm chart. In the PVC, the following +annotation is added to ensure that the PVC is not deleted when the helm +chart is deleted. This is useful to retain the images in the registry even +after the helm chart is deleted. + +`helm.sh/resource-policy: "keep"` ```bash source .env diff --git a/kubernetes/docker-registry-helm-chart/templates/pvc.yaml b/kubernetes/docker-registry-helm-chart/templates/pvc.yaml index dc017f8..c244df6 100644 --- a/kubernetes/docker-registry-helm-chart/templates/pvc.yaml +++ b/kubernetes/docker-registry-helm-chart/templates/pvc.yaml @@ -3,9 +3,11 @@ kind: PersistentVolumeClaim metadata: name: {{ .Values.pvc.claimName }} namespace: {{ .Values.namespace }} + annotations: + helm.sh/resource-policy: "keep" spec: accessModes: - - {{ .Values.pvc.accessMode }} + - {{ .Values.pvc.accessMode }} resources: requests: storage: {{ .Values.pvc.size }}