diff --git a/README.md b/README.md index 6aafe23..3fbe68d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ One can change this in the deployment descriptors available in this repository. * The [stateful](stateful) directory contains an example which deploys the data pods as a `StatefulSet`. These use a `volumeClaimTemplates` to provision persistent storage for each pod. +* By default, `PROCESSORS` is set to `1`. This may not be enough for some deployments, especially at startup time. Adjust `resources.limits.cpu` and/or `livenessProbe` accordingly if required. Note that `resources.limits.cpu` must be an integer. + ## Pre-requisites diff --git a/es-client.yaml b/es-client.yaml index 55cbda4..7ef47cb 100644 --- a/es-client.yaml +++ b/es-client.yaml @@ -46,6 +46,13 @@ spec: value: -Xms256m -Xmx256m - name: NETWORK_HOST value: _site_,_lo_ + - name: PROCESSORS + valueFrom: + resourceFieldRef: + resource: limits.cpu + resources: + limits: + cpu: 1 ports: - containerPort: 9200 name: http diff --git a/es-data.yaml b/es-data.yaml index 30a3303..c017cab 100644 --- a/es-data.yaml +++ b/es-data.yaml @@ -44,6 +44,13 @@ spec: value: "false" - name: ES_JAVA_OPTS value: -Xms256m -Xmx256m + - name: PROCESSORS + valueFrom: + resourceFieldRef: + resource: limits.cpu + resources: + limits: + cpu: 1 ports: - containerPort: 9300 name: transport diff --git a/es-master.yaml b/es-master.yaml index 477455b..f0ae35d 100644 --- a/es-master.yaml +++ b/es-master.yaml @@ -48,6 +48,13 @@ spec: value: "false" - name: ES_JAVA_OPTS value: -Xms256m -Xmx256m + - name: PROCESSORS + valueFrom: + resourceFieldRef: + resource: limits.cpu + resources: + limits: + cpu: 1 ports: - containerPort: 9300 name: transport diff --git a/stateful/es-data-stateful.yaml b/stateful/es-data-stateful.yaml index e8be3d1..509a4f8 100644 --- a/stateful/es-data-stateful.yaml +++ b/stateful/es-data-stateful.yaml @@ -45,6 +45,13 @@ spec: value: "false" - name: ES_JAVA_OPTS value: -Xms256m -Xmx256m + - name: PROCESSORS + valueFrom: + resourceFieldRef: + resource: limits.cpu + resources: + limits: + cpu: 1 ports: - containerPort: 9300 name: transport