summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging_elasticsearch/templates/es.j2
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-10-20 16:57:58 -0400
committerGitHub <noreply@github.com>2017-10-20 16:57:58 -0400
commitac2af73540c957aedd74e523646645cd36e8c130 (patch)
treef6ebe672125033d50e329eb88bd46e7ae82b51c8 /roles/openshift_logging_elasticsearch/templates/es.j2
parente758bbe9739596f5e50b5a861198e5060d830d9b (diff)
parent578ac5b348fa3e9c7d0d05e3a0f579839ecd79dd (diff)
downloadopenshift-ac2af73540c957aedd74e523646645cd36e8c130.tar.gz
openshift-ac2af73540c957aedd74e523646645cd36e8c130.tar.bz2
openshift-ac2af73540c957aedd74e523646645cd36e8c130.tar.xz
openshift-ac2af73540c957aedd74e523646645cd36e8c130.zip
Merge pull request #5748 from portante/fix-cpu-limits
Use "requests" for CPU resources instead of limits
Diffstat (limited to 'roles/openshift_logging_elasticsearch/templates/es.j2')
-rw-r--r--roles/openshift_logging_elasticsearch/templates/es.j27
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/openshift_logging_elasticsearch/templates/es.j2 b/roles/openshift_logging_elasticsearch/templates/es.j2
index ce3b2eb83..7966d219e 100644
--- a/roles/openshift_logging_elasticsearch/templates/es.j2
+++ b/roles/openshift_logging_elasticsearch/templates/es.j2
@@ -69,9 +69,9 @@ spec:
readOnly: true
resources:
limits:
- cpu: "{{openshift_logging_elasticsearch_proxy_cpu_limit }}"
memory: "{{openshift_logging_elasticsearch_proxy_memory_limit }}"
requests:
+ cpu: "{{openshift_logging_elasticsearch_proxy_cpu_request }}"
memory: "{{openshift_logging_elasticsearch_proxy_memory_limit }}"
-
name: "elasticsearch"
@@ -79,11 +79,12 @@ spec:
imagePullPolicy: Always
resources:
limits:
- memory: "{{es_memory_limit}}"
-{% if es_cpu_limit is defined and es_cpu_limit is not none %}
+{% if es_cpu_limit is defined and es_cpu_limit is not none and es_cpu_limit != '' %}
cpu: "{{es_cpu_limit}}"
{% endif %}
+ memory: "{{es_memory_limit}}"
requests:
+ cpu: "{{es_cpu_request}}"
memory: "{{es_memory_limit}}"
{% if es_container_security_context %}
securityContext: {{ es_container_security_context | to_yaml }}