Skip to content

import nginx from gitlab kubernetes chart

I think it's OK to be integrated, but I wouldn't mind a second pair of eyes.

There are a few changes compared to previously:

  • now the chart is using the base directory, so we need to namespace the configs (see freedesktop/helm-gitlab-config!5)
  • now we need to call helm dependency update before running the upgrade, to ensure we pull the latest version of the dependent charts
  • instead of kube-lego, we now use cert-manager, a future proof one

This MR backports files from https://gitlab.com/gitlab-org/charts/gitlab in the hope that we will be able to upgrade more easily.

Also, this change still keeps the olg nginx, and add a new one. The idea is that we do the helm upgrade, block the new IP of the new nginx, change the DNS, wait a little for the caches to be pruned, and then we can remove the charts/gitlab-omnibus/templates/load-balancer directory entirely.

To ensure there are no issues, one can:

# fetch the current config deployed on the server
helm get manifest gitlab-prod > /tmp/current.config

# generate the new one
helm template -f ../helm-gitlab-config/config.yaml -f ../helm-gitlab-secrets/secrets.yaml --name gitlab-prod . > /tmp/new.config

# a little sed on the current config to 'match' the files on the new one:
sed -i 's|Source: gitlab-omnibus|Source: helm-gitlab-omnibus/charts/gitlab-omnibus|' /tmp/current.config

And now, one can stare at the files for a long time to spot any mistake.

Cc: @daniels

Edited by Benjamin Tissoires

Merge request reports