Disable Ingress AutoDevops HELM_UPGRADE_EXTRA_ARGS

Configures HELM_UPGRADE_EXTRA_ARGS to --values my-values.yaml
with

ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"

It dosent seem to disable ingress as I can still access from public URL any idea what I am a doing wrong,

Based on https://gitlab.com/gitlab-org/charts/auto-deploy-app/blob/master/templates/ingress.yaml, I think you would need to disable service instead. So:

service:
  enabled: false

BTW, from GitLab 12.6 onwards, you can use .gitlab/auto-deploy-values.yaml file instead of using HELM_UPGRADE_EXTRA_ARGS. See https://docs.gitlab.com/ee/topics/autodevops/#build-and-deployment

2 Likes

@tkuah Yes I tried

service:
enabled: false

With no luck I am using 2.5.5, it still pushes it to the ingress and assigns dns

@robertom

With no luck I am using 2.5.5, it still pushes it to the ingress and assigns dns

With service.enabled set to false, there should be no Ingress resource rendered by helm. Is that the case ? You should be able to verify this with kubectl get ingress -n <your project namespace>.

BTW What project/software does 2.5.5 refer to ?

@tkuah [GitLab] 12.5.5.

Should the format not be

service:
enabled: false

Ah the whitespace is significant (it’s YAML), so you need:

service:
  enabled: false

Yes I have it correct with no luck

I was able to get it working by adding the Environment to .gitlab-ci.yml instead of using the HELM_UPGRADE_EXTRA_ARGS variables file.

.gitlab-ci.yml
production:
variables:
HELM_UPGRADE_EXTRA_ARGS: --set service.enabled=false --set ingress.enable=false

1 Like