kubernetes: update doc related to registry

- add instructions on how to retain PVC when using helm
This commit is contained in:
2025-06-30 23:30:21 +03:00
parent b75bed709d
commit 82421c60cb
2 changed files with 11 additions and 3 deletions

View File

@ -178,7 +178,8 @@ in desired namespaces by deploying the Certificate resource in the namespace.
# Deploy Private Docker Registry (Deprecated) # 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 Create a new namespace called docker-registry and deploy the private
docker-registry. docker-registry.
@ -194,7 +195,12 @@ kubectl create secret generic registry-credentials \
-n docker-registry -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 ```bash
source .env source .env

View File

@ -3,9 +3,11 @@ kind: PersistentVolumeClaim
metadata: metadata:
name: {{ .Values.pvc.claimName }} name: {{ .Values.pvc.claimName }}
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
annotations:
helm.sh/resource-policy: "keep"
spec: spec:
accessModes: accessModes:
- {{ .Values.pvc.accessMode }} - {{ .Values.pvc.accessMode }}
resources: resources:
requests: requests:
storage: {{ .Values.pvc.size }} storage: {{ .Values.pvc.size }}