Too many redirects with an existing nginx ingress controller

Summary

Installed gitlab via helm, all pods created, but when trying to access website getting "Too many redirects".

Steps to reproduce

Installed via helm using mostly default values, except we already have an nginx-ingress-controller running so using that instead. We also have SSL termination on the AWS ELB, so I have disabled the cert manager.

Configuration used

Relevant portion of the config where I'm setting it to use the existing nginx ingress controller.

# Default values for gitlab-chart.
# This is a YAML-formatted file.

global:
  operator:
    enabled: false
  # gitlabVersion: master
  application:
    create: false
    links: []
  hosts:
    domain: domain.com
    https: false
    gitlab:
      https: false
    externalIP:
    ssh: ~
  ingress:
    configureCertmanager: false
    annotations:
      kubernetes.io/ingress.class: nginx-ingress-internal
      #nginx.ingress.kubernetes.io/ssl-redirect: "false"
    enabled: true

Current behavior

Requesting "http://gitlab.domain.com" does redirect to "https//gitlab.domain.com" but then it just continues a redirect loop to "https://gitlab.domain.com". If I port forward to the gitlab unicorn pod, everything works fine.

If I uncomment the #nginx.ingress.kubernetes.io/ssl-redirect: "false" line, then I don't get the redirect loop and everything works fine as well, but it also doesn't redirect http to https, which is what I need.

Expected behavior

Was expecting to be able to pull up http://gitlab.domain.com and have it redirect me to https://gitlab.domain.com and present the login page.

Versions

  • Chart: latest version of chart.
  • Platform:
    • Cloud: EKS
  • Kubernetes: (kubectl version)
    • Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-08T16:31:10Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
    • Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.3-eks", GitCommit:"58c199a59046dbf0a13a387d3491a39213be53df", GitTreeState:"clean", BuildDate:"2018-09-21T21:00:04Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
  • Helm: (helm version)
    • Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
    • Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

Relevant logs

I can provide any logs necessary to help out.

Edited by Rick Baker