Consider increasing the requested resources for nginx-ingress

Summary

By looking at the memory usage of the nginx-ingress-controller pods in our Review Apps, it seems the requested memory of 100MB is way under the actual memory used, which is around 440MB:

  1. https://console.cloud.google.com/kubernetes/pod/us-central1-b/review-apps-ee/review-apps-ee/review-jivl-valid-xhvidn-nginx-ingress-controller-6d6d8ccfn8h6f?project=gitlab-review-apps&authuser=1&container_summary_list_tablesize=10&tab=details&duration=P1D: Screen_Shot_2019-01-24_at_11.08.48
  2. https://console.cloud.google.com/kubernetes/pod/us-central1-b/review-apps-ee/review-apps-ee/review-ee-53966-r-7a46en-nginx-ingress-controller-7b7cc4fd5qc5p?project=gitlab-review-apps&authuser=1&container_summary_list_tablesize=10&tab=details&duration=P1D: Screen_Shot_2019-01-24_at_11.08.58
  3. https://console.cloud.google.com/kubernetes/pod/us-central1-b/review-apps-ee/review-apps-ee/review-8681-api-e-d7nuke-nginx-ingress-controller-57777669lkrjv?project=gitlab-review-apps&authuser=1&container_summary_list_tablesize=10&tab=details&duration=P1D: Screen_Shot_2019-01-24_at_11.09.15

These pods are from 3 distinct Review Apps, which are mostly idle.

This is a problem when using GKE's autoscaling functionality because scaling is solely based on the requested resources, not the actually used resources.

Steps to reproduce

Look at the usage graph of any nginx-ingress-controller pod on a Review App cluster node, e.g. https://console.cloud.google.com/kubernetes/clusters/details/us-central1-b/review-apps-ee?project=gitlab-review-apps&authuser=1&tab=nodes&persistent_volumes_tablesize=50&storage_class_tablesize=50&nodes_tablesize=50&nodes_tablesort=-resource_summary_map%252Fmemory%252Frequested%252Fnumber%252Cmetadata%252Fname.

Configuration used

Review Apps are using the latest default chart: https://gitlab.com/gitlab-org/gitlab-ce/blob/490eeb5159945107576c756b22c08f99b45a8463/scripts/review_apps/review-apps.sh#L137-171

Current behavior

Memory requested by the nginx-ingress-controller pods is 100MB while their actual usage is around 440MB.

Expected behavior

Memory requested by the nginx-ingress-controller pods is 440MB.

Versions

  • Chart: latest
  • Platform:
    • Cloud: GKE
  • Kubernetes: (kubectl version)
    • Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.7", GitCommit:"0c38c362511b20a098d7cd855f1314dad92c2780", GitTreeState:"clean", BuildDate:"2018-08-20T10:09:03Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
    • Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.11-gke.1", GitCommit:"5c4fddf874319c9825581cc9ab1d0f0cf51e1dc9", GitTreeState:"clean", BuildDate:"2018-11-30T16:18:58Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}
  • Helm: (helm version)
    • Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
    • Server: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}
Edited by Rémy Coutable