From d76a5c7d01f345670822184f482108ef10f36629 Mon Sep 17 00:00:00 2001 From: joshkwedar <53263595+joshkwedar@users.noreply.github.com> Date: Wed, 9 Aug 2023 05:00:25 -0400 Subject: [PATCH] add support for initContainer resources in statefulset (#128) Enables the ability to specify initContainer resources. Addresses the condition where resources must be specified due to quota enforcement in a given namespace. --- couchdb/Chart.yaml | 2 +- couchdb/README.md | 1 + couchdb/templates/statefulset.yaml | 2 ++ couchdb/values.yaml | 10 ++++++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/couchdb/Chart.yaml b/couchdb/Chart.yaml index fb81f90..7818518 100644 --- a/couchdb/Chart.yaml +++ b/couchdb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: couchdb -version: 4.4.2 +version: 4.4.3 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 cb32002..7c76bf8 100644 --- a/couchdb/README.md +++ b/couchdb/README.md @@ -203,6 +203,7 @@ A variety of other parameters are also configurable. See the comments in the | `annotations` | | | `tolerations` | | | `resources` | | +| `initResources` | | | `autoSetup.enabled` | false (if set to true, must have `service.enabled` set to true and a correct `adminPassword` - deploy it with the `--wait` flag to avoid first jobs failure) | | `autoSetup.image.repository` | curlimages/curl | | `autoSetup.image.tag` | latest | diff --git a/couchdb/templates/statefulset.yaml b/couchdb/templates/statefulset.yaml index a844ada..cfc0105 100644 --- a/couchdb/templates/statefulset.yaml +++ b/couchdb/templates/statefulset.yaml @@ -67,6 +67,8 @@ spec: volumeMounts: - name: local-config-storage mountPath: /local.d + resources: +{{ toYaml .Values.initResources | indent 12 }} {{- end }} containers: - name: couchdb diff --git a/couchdb/values.yaml b/couchdb/values.yaml index 8e85063..266ce11 100644 --- a/couchdb/values.yaml +++ b/couchdb/values.yaml @@ -171,6 +171,16 @@ resources: {} # cpu: 56 # memory: 256Gi +## Optional resource requests and limits for the CouchDB init container +## ref: http://kubernetes.io/docs/user-guide/compute-resources/ +initResources: {} + # requests: + # cpu: 100m + # memory: 128Mi + # limits: + # cpu: 500m + # memory: 128Mi + # -- erlangFlags is a map that is passed to the Erlang VM as flags using the # ERL_FLAGS env. The `name` flag is required to establish connectivity # between cluster nodes.