Skip to content

Commit

Permalink
Use helm keep annotation to mark those resources that should not be c…
Browse files Browse the repository at this point in the history
…leared on uninstall
  • Loading branch information
simar0at committed Oct 29, 2024
1 parent 546def3 commit a1d07be
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ data:
POSTGRES_DB: {{ .Values.postgis.name | default (printf "%s" (include "fullname" .)) | quote }}
kind: ConfigMap
metadata:
annotations:
helm.sh/resource-policy: keep
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
name: {{ template "fullname" . }}-configmap
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/export.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ print ( include "fullname" . ) "-export"| quote }}
spec:
accessModes:
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/postgis-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ print ( include "fullname" . ) "-postgis"| quote }}
spec:
accessModes:
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/processed-images.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ print ( include "fullname" . ) "-processed-images"| quote }}
spec:
accessModes:
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: v1
kind: Secret
type: Opaque
metadata:
annotations:
helm.sh/resource-policy: keep
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
name: {{ template "fullname" . }}-secret
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/uploads.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ print ( include "fullname" . ) "-uploads"| quote }}
spec:
accessModes:
Expand Down

0 comments on commit a1d07be

Please sign in to comment.