From 0dba8af6e36ce35ab43a198abf141ed79ae0a41a Mon Sep 17 00:00:00 2001 From: Austin Porter Date: Tue, 17 Oct 2023 07:52:30 -0700 Subject: [PATCH] Allow configuration of Pod Labels (#131) Allow the configuration of additional Pod Labels. There are several use cases for this, one of which is injecting Istio sidecars which can only be done via Pod Labels. --- couchdb/Chart.yaml | 2 +- couchdb/README.md | 1 + couchdb/README.md.gotmpl | 1 + couchdb/templates/statefulset.yaml | 7 +++++-- couchdb/values.yaml | 3 +++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/couchdb/Chart.yaml b/couchdb/Chart.yaml index f5e44cf..e04d936 100644 --- a/couchdb/Chart.yaml +++ b/couchdb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: couchdb -version: 4.4.4 +version: 4.4.5 appVersion: 3.3.2 description: A database featuring seamless multi-master sync, that scales from big data to mobile, with an intuitive HTTP/JSON API and designed for diff --git a/couchdb/README.md b/couchdb/README.md index 7c76bf8..a0b8690 100644 --- a/couchdb/README.md +++ b/couchdb/README.md @@ -200,6 +200,7 @@ A variety of other parameters are also configurable. See the comments in the | `podManagementPolicy` | Parallel | | `affinity` | | | `topologySpreadConstraints` | | +| `labels` | | | `annotations` | | | `tolerations` | | | `resources` | | diff --git a/couchdb/README.md.gotmpl b/couchdb/README.md.gotmpl index 261d081..b8de044 100644 --- a/couchdb/README.md.gotmpl +++ b/couchdb/README.md.gotmpl @@ -185,6 +185,7 @@ A variety of other parameters are also configurable. See the comments in the | `podManagementPolicy` | Parallel | | `affinity` | | | `topologySpreadConstraints` | | +| `labels` | | | `annotations` | | | `tolerations` | | | `resources` | | diff --git a/couchdb/templates/statefulset.yaml b/couchdb/templates/statefulset.yaml index 9104879..f5c93bd 100644 --- a/couchdb/templates/statefulset.yaml +++ b/couchdb/templates/statefulset.yaml @@ -18,6 +18,9 @@ spec: metadata: labels: {{ include "couchdb.ss.selector" . | indent 8 }} +{{- if .Values.labels }} +{{ toYaml .Values.labels | indent 8 }} +{{- end }} annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} @@ -35,7 +38,7 @@ spec: - name: init-copy image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}" imagePullPolicy: {{ .Values.initImage.pullPolicy }} - command: + command: - 'sh' - '-c' {{- if .Values.prometheusPort.enabled }} @@ -199,7 +202,7 @@ spec: - key: seedlistinifile path: seedlist.ini {{- if .Values.prometheusPort.enabled }} - - key: prometheusinifile + - key: prometheusinifile path: prometheus.ini {{- end }} diff --git a/couchdb/values.yaml b/couchdb/values.yaml index 266ce11..35d3e67 100644 --- a/couchdb/values.yaml +++ b/couchdb/values.yaml @@ -124,6 +124,9 @@ topologySpreadConstraints: {} # matchLabels: # app: couchdb +## Optional pod labels +labels: {} + ## Optional pod annotations annotations: {}