Add topologySpreadConstraints parameter to be used in StatefulSet (#59)

Co-authored-by: Francisco Alberto <lemufen@gmail.com>
diff --git a/couchdb/Chart.yaml b/couchdb/Chart.yaml
index 1e9c6d1..fc14ae4 100644
--- a/couchdb/Chart.yaml
+++ b/couchdb/Chart.yaml
@@ -1,6 +1,6 @@
 apiVersion: v1
 name: couchdb
-version: 3.4.1
+version: 3.5.0
 appVersion: 3.2.0
 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 037641d..e7058b0 100644
--- a/couchdb/README.md
+++ b/couchdb/README.md
@@ -185,6 +185,7 @@
 | `persistentVolume.storageClass`      | Default for the Kube cluster           |
 | `podManagementPolicy`                | Parallel                               |
 | `affinity`                           |                                        |
+| `topologySpreadConstraints`          |                                        |
 | `annotations`                        |                                        |
 | `tolerations`                        |                                        |
 | `resources`                          |                                        |
diff --git a/couchdb/templates/statefulset.yaml b/couchdb/templates/statefulset.yaml
index 3506f89..ae3ffa5 100644
--- a/couchdb/templates/statefulset.yaml
+++ b/couchdb/templates/statefulset.yaml
@@ -165,6 +165,10 @@
       affinity:
 {{ toYaml . | indent 8 }}
 {{- end }}
+{{- with .Values.topologySpreadConstraints }}
+      topologySpreadConstraints:
+{{ toYaml . | indent 8 }}
+{{- end }}
       volumes:
         - name: config-storage
           emptyDir: {}
diff --git a/couchdb/values.yaml b/couchdb/values.yaml
index 787be28..172d774 100644
--- a/couchdb/values.yaml
+++ b/couchdb/values.yaml
@@ -95,6 +95,17 @@
   #             - couchdb
   #       topologyKey: "kubernetes.io/hostname"
 
+## To control how Pods are spread across your cluster among failure-domains such as regions,
+## zones, nodes, and other user-defined topology domains use topologySpreadConstraints.
+topologySpreadConstraints: {}
+  # topologySpreadConstraints:
+  #   - maxSkew: 1
+  #     topologyKey: "topology.kubernetes.io/zone"
+  #     whenUnsatisfiable: ScheduleAnyway
+  #     labelSelector:
+  #       matchLabels:
+  #         app: couchdb
+
 ## Optional pod annotations
 annotations: {}
 
diff --git a/docs/couchdb-3.5.0.tgz b/docs/couchdb-3.5.0.tgz
new file mode 100644
index 0000000..106cc8c
--- /dev/null
+++ b/docs/couchdb-3.5.0.tgz
Binary files differ
diff --git a/docs/index.yaml b/docs/index.yaml
index 1d94f64..aade4c0 100644
--- a/docs/index.yaml
+++ b/docs/index.yaml
@@ -3,6 +3,29 @@
   couchdb:
   - apiVersion: v1
     appVersion: 3.2.0
+    created: "2022-01-10T07:49:23.501939784-03:00"
+    description: A database featuring seamless multi-master sync, that scales from
+      big data to mobile, with an intuitive HTTP/JSON API and designed for reliability.
+    digest: ea79c63e56c3c7d9f4b185bba5c5e89402de62b31dd61b928d9666b0466179a7
+    home: https://couchdb.apache.org/
+    icon: http://couchdb.apache.org/CouchDB-visual-identity/logo/CouchDB-couch-symbol.svg
+    keywords:
+    - couchdb
+    - database
+    - nosql
+    maintainers:
+    - email: kocolosk@apache.org
+      name: kocolosk
+    - email: willholley@apache.org
+      name: willholley
+    name: couchdb
+    sources:
+    - https://github.com/apache/couchdb-docker
+    urls:
+    - https://apache.github.io/couchdb-helm/couchdb-3.5.0.tgz
+    version: 3.5.0
+  - apiVersion: v1
+    appVersion: 3.2.0
     created: "2022-01-07T09:59:37.621788-05:00"
     description: A database featuring seamless multi-master sync, that scales from
       big data to mobile, with an intuitive HTTP/JSON API and designed for reliability.
@@ -323,4 +346,4 @@
     urls:
     - https://apache.github.io/couchdb-helm/couchdb-2.2.0.tgz
     version: 2.2.0
-generated: "2022-01-07T09:59:37.620754-05:00"
+generated: "2022-01-10T07:49:23.499066257-03:00"