diff --git a/charts/sddi-ckan/charts/redis/templates/redis-statefulset.yml b/charts/sddi-ckan/charts/redis/templates/redis-statefulset.yml index 2f818bd..a7069d4 100644 --- a/charts/sddi-ckan/charts/redis/templates/redis-statefulset.yml +++ b/charts/sddi-ckan/charts/redis/templates/redis-statefulset.yml @@ -11,6 +11,9 @@ metadata: app.kubernetes.io/component: {{ .Values.component }} spec: serviceName: {{ include "redis.fullname" . }}-hl + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} selector: matchLabels: {{- include "redis.selectorLabels" . | nindent 6 }} diff --git a/charts/sddi-ckan/charts/redis/values.yaml b/charts/sddi-ckan/charts/redis/values.yaml index 8abcdb1..427e8ea 100644 --- a/charts/sddi-ckan/charts/redis/values.yaml +++ b/charts/sddi-ckan/charts/redis/values.yaml @@ -68,6 +68,8 @@ persistence: # helm.sh/resource-policy: keep # -- Number of replicas. Only used if `autoscaling.enabled = false`. +# **Note:** Running multiple replicas requires to enable persistent data storage (`persistence.enabled = true`) and, +# if Pods run on different nodes, a storage that supports RWX. replicaCount: 1 autoscaling: # -- Enable/disable pod autoscaling, if disabled `replicaCount` is used to set number of pods. diff --git a/charts/sddi-ckan/charts/solr/templates/solr-statefulset.yml b/charts/sddi-ckan/charts/solr/templates/solr-statefulset.yml index 7269d5e..9476bdf 100644 --- a/charts/sddi-ckan/charts/solr/templates/solr-statefulset.yml +++ b/charts/sddi-ckan/charts/solr/templates/solr-statefulset.yml @@ -10,6 +10,7 @@ metadata: app.kubernetes.io/component: {{ .Values.component }} spec: serviceName: {{ include "solr.fullname" . }}-hl + replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "solr.selectorLabels" . | nindent 6 }} diff --git a/charts/sddi-ckan/charts/solr/values.yaml b/charts/sddi-ckan/charts/solr/values.yaml index 6661e4a..2b7cd17 100644 --- a/charts/sddi-ckan/charts/solr/values.yaml +++ b/charts/sddi-ckan/charts/solr/values.yaml @@ -67,6 +67,11 @@ persistence: annotations: # helm.sh/resource-policy: keep +# -- Number of replicas. +# **Note:** Running multiple replicas requires to enable persistent data storage (`persistence.enabled = true`) and, +# if Pods run on different nodes, a storage that supports RWX. +replicaCount: 1 + # initContainers -------------------------------------------------------------- # -- Sets [`initContainers`](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). # Set to `[]` to disable the default initContainers.