summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-06-29 08:52:38 -0400
committerGitHub <noreply@github.com>2017-06-29 08:52:38 -0400
commit28760baa0a2047f6dada818acebb84d43a6a4679 (patch)
tree23052c0d7791841863b9d11b5453516a4f9066d9 /roles
parentea678ad4ee999abd71c5a175810925cf6c3e42dd (diff)
parent806c9ae04f52016e3498930df9a781fef42078c4 (diff)
downloadopenshift-28760baa0a2047f6dada818acebb84d43a6a4679.tar.gz
openshift-28760baa0a2047f6dada818acebb84d43a6a4679.tar.bz2
openshift-28760baa0a2047f6dada818acebb84d43a6a4679.tar.xz
openshift-28760baa0a2047f6dada818acebb84d43a6a4679.zip
Merge pull request #4618 from nhosoi/resource_limits
Sync environment variables FLUENTD/MUX_CPU_LIMIT FLUENTD/MUX_MEMORY_L…
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_logging_fluentd/templates/fluentd.j210
-rw-r--r--roles/openshift_logging_mux/templates/mux.j210
2 files changed, 16 insertions, 4 deletions
diff --git a/roles/openshift_logging_fluentd/templates/fluentd.j2 b/roles/openshift_logging_fluentd/templates/fluentd.j2
index a5695ee26..d9814370f 100644
--- a/roles/openshift_logging_fluentd/templates/fluentd.j2
+++ b/roles/openshift_logging_fluentd/templates/fluentd.j2
@@ -98,9 +98,15 @@ spec:
- name: "BUFFER_SIZE_LIMIT"
value: "{{ openshift_logging_fluentd_buffer_size_limit }}"
- name: "FLUENTD_CPU_LIMIT"
- value: "{{ openshift_logging_fluentd_cpu_limit }}"
+ valueFrom:
+ resourceFieldRef:
+ containerName: "{{ daemonset_container_name }}"
+ resource: limits.cpu
- name: "FLUENTD_MEMORY_LIMIT"
- value: "{{ openshift_logging_fluentd_memory_limit }}"
+ valueFrom:
+ resourceFieldRef:
+ containerName: "{{ daemonset_container_name }}"
+ resource: limits.memory
volumes:
- name: runlogjournal
hostPath:
diff --git a/roles/openshift_logging_mux/templates/mux.j2 b/roles/openshift_logging_mux/templates/mux.j2
index bd392c194..c3f9b3433 100644
--- a/roles/openshift_logging_mux/templates/mux.j2
+++ b/roles/openshift_logging_mux/templates/mux.j2
@@ -108,9 +108,15 @@ spec:
- name: "BUFFER_SIZE_LIMIT"
value: "{{ openshift_logging_mux_buffer_size_limit }}"
- name: "MUX_CPU_LIMIT"
- value: "{{ openshift_logging_mux_cpu_limit }}"
+ valueFrom:
+ resourceFieldRef:
+ containerName: "mux"
+ resource: limits.cpu
- name: "MUX_MEMORY_LIMIT"
- value: "{{ openshift_logging_mux_memory_limit }}"
+ valueFrom:
+ resourceFieldRef:
+ containerName: "mux"
+ resource: limits.memory
volumes:
- name: config
configMap: