From 7e9476ae87a251f911610b79030f491fe0181ac8 Mon Sep 17 00:00:00 2001 From: Xtigyro Date: Wed, 30 Oct 2019 11:35:13 +0200 Subject: [PATCH] Turn "selector" for PVs/PVCs off by Default --- templates/hiera-pvc.yaml | 2 ++ templates/postgres-pvc.yaml | 2 ++ templates/puppetdb-pvc.yaml | 2 ++ templates/puppetserver-code-pvc.yaml | 2 ++ templates/puppetserver-data-pvc.yaml | 2 ++ templates/puppetserver-pvc.yaml | 2 ++ values.yaml | 1 + 7 files changed, 13 insertions(+) diff --git a/templates/hiera-pvc.yaml b/templates/hiera-pvc.yaml index 604a6825..6aecaf89 100644 --- a/templates/hiera-pvc.yaml +++ b/templates/hiera-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.hiera.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/templates/postgres-pvc.yaml b/templates/postgres-pvc.yaml index 137b3eef..2483f9b9 100644 --- a/templates/postgres-pvc.yaml +++ b/templates/postgres-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.postgres.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/templates/puppetdb-pvc.yaml b/templates/puppetdb-pvc.yaml index 076afa8f..d62ee20a 100644 --- a/templates/puppetdb-pvc.yaml +++ b/templates/puppetdb-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.puppetdb.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/templates/puppetserver-code-pvc.yaml b/templates/puppetserver-code-pvc.yaml index 98b76d2e..8bef9cc2 100644 --- a/templates/puppetserver-code-pvc.yaml +++ b/templates/puppetserver-code-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.puppetserver.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/templates/puppetserver-data-pvc.yaml b/templates/puppetserver-data-pvc.yaml index 08cf1081..0f25d357 100644 --- a/templates/puppetserver-data-pvc.yaml +++ b/templates/puppetserver-data-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.puppetserver.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/templates/puppetserver-pvc.yaml b/templates/puppetserver-pvc.yaml index bd668fbc..6a010a98 100644 --- a/templates/puppetserver-pvc.yaml +++ b/templates/puppetserver-pvc.yaml @@ -9,9 +9,11 @@ metadata: {{ toYaml .Values.storage.annotations | nindent 4 }} {{- end }} spec: + {{- if .Values.storage.selector }} selector: matchLabels: {{- include "puppetserver.puppetserver.matchLabels" . | nindent 6 }} + {{- end }} accessModes: - ReadWriteOnce resources: diff --git a/values.yaml b/values.yaml index 224f76d0..07446087 100644 --- a/values.yaml +++ b/values.yaml @@ -276,5 +276,6 @@ storage: ## GKE, AWS & OpenStack) ## storageClass: "" + selector: false annotations: {} size: 100Mi