diff --git a/deploy/chart/local-path-provisioner/README.md b/deploy/chart/local-path-provisioner/README.md index 263622644abbe02b10a6710331e1163e614f08aa..e785246f659255e0397a34f8e39e737e7bb6135e 100644 --- a/deploy/chart/local-path-provisioner/README.md +++ b/deploy/chart/local-path-provisioner/README.md @@ -43,7 +43,7 @@ The command deploys Local Path Provisioner on the Kubernetes cluster in the defa To uninstall/delete the `local-path-storage` deployment: ```console -$ helm delete --purge local-path-storage +$ helm uninstall local-path-storage ``` The command removes all the Kubernetes components associated with the chart and deletes the release. @@ -55,6 +55,7 @@ default values. | Parameter | Description | Default | | ----------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `commonLabels` | Custom labels to apply to all resources | `{}` | | `image.repository` | Local Path Provisioner image name | `rancher/local-path-provisioner` | | `image.tag` | Local Path Provisioner image tag | `master-head` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | diff --git a/deploy/chart/local-path-provisioner/templates/_helpers.tpl b/deploy/chart/local-path-provisioner/templates/_helpers.tpl index cd58f3ddb86725e957380a627203061004bd3374..40c0fa5de60f13d989e0c2e8d25a076d611d9db4 100644 --- a/deploy/chart/local-path-provisioner/templates/_helpers.tpl +++ b/deploy/chart/local-path-provisioner/templates/_helpers.tpl @@ -42,6 +42,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} {{- end -}} {{/* diff --git a/deploy/chart/local-path-provisioner/templates/deployment.yaml b/deploy/chart/local-path-provisioner/templates/deployment.yaml index 8375cbfcb632f478afd17a77d82f3c95fb890694..98c1ff0a8998801f7cd1ecdb38d968b541d83aed 100644 --- a/deploy/chart/local-path-provisioner/templates/deployment.yaml +++ b/deploy/chart/local-path-provisioner/templates/deployment.yaml @@ -20,6 +20,7 @@ spec: labels: app.kubernetes.io/name: {{ include "local-path-provisioner.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{ include "local-path-provisioner.labels" . | indent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/deploy/chart/local-path-provisioner/values.yaml b/deploy/chart/local-path-provisioner/values.yaml index f67a3937d3118ff5dc027b1f9de3355a00f7a8ac..277007535f9866fcbb829a2b2fb5fe90caca105d 100644 --- a/deploy/chart/local-path-provisioner/values.yaml +++ b/deploy/chart/local-path-provisioner/values.yaml @@ -1,6 +1,7 @@ # Default values for local-path-provisioner. replicaCount: 1 +commonLabels: {} image: repository: rancher/local-path-provisioner