Skip to content

Ensure ingresses creation are disabled when `global.ingress.enabled` is set to false

Silvester Wainaina requested to merge resolve-global-ingress-enabled-option into master

What does this MR do?

This is a fix for this issue #2577 (closed) where the global.ingress.enabled option does not disable GitLab ingresses creation when set to false. This MR seeks to ensure that all ingresses are disabled when this option is set to false

Related issues

Closes #2577 (closed)

Test case

Setting global.ingress.enabled=false, no Ingress resource should be created

$ kubectl get ingress
No resources found in gitlab namespace.

Setting global.ingress.enabled=true, all the Ingress resources minio, webservice and registry should be created

% kubectl get ingress
NAME                        CLASS    HOSTS                           ADDRESS   PORTS     AGE
gitlab-minio                <none>   minio.example.com               x.x.x.x   80, 443   35s
gitlab-registry             <none>   registry.example.com            x.x.x.x   80, 443   35s
gitlab-webservice-default   <none>   gitlab.example.com              x.x.x.x   80, 443   35s

Setting both local ingress.enabled=false and global.ingress.enable=false for any of the resource while the global global.ingress.enabled=true should disable the specific Ingress e.g.

Updating the minio/values.yaml as below should disable minio and create the registry and web-service. Reseting the values should recreate the Ingress resource

ingress:
  enabled: false
  proxyReadTimeout: 900
  proxyBodySize: "0"
  proxyBuffering: "off"
  tls: {}
    # secretName:
    # enabled: true
  annotations: {}
  path: # /

## Support for tolerations for pod scheduling
tolerations: []

global:
  ingress:
    enabled: false
    annotations: {}
    tls: {}
      # secretName:
      # enabled: true
  hosts:
    domain: example.com
    hostSuffix:
    https: true
    tls: {}
      # secretName:
    minio: {}
      #name: minio.example.com
      #https: false
  minio:
    enabled: true
% kubectl get ingress
NAME                        CLASS    HOSTS                           ADDRESS         PORTS     AGE
gitlab-registry             <none>   registry.example.com            x.x.x.x        80, 443   11m
gitlab-webservice-default   <none>   gitlab.example.com              x.x.x.x        80, 443   11m

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Mitchell Nielsen

Merge request reports