Skip to content

Draft: [CI] Test against Kubernetes 1.26 with vcluster

Mitchell Nielsen requested to merge ci-implement-vcluster into master

What does this MR do?

Uses vcluster to create virtual clusters for testing review apps/environments.

This has some benefits:

  • We can easily add new versions of Kubernetes to test against.
  • The Kubernetes version of the host is irrelevant, so we can allow it to automatically update.
  • We get much better isolation between review environments.
  • We have the ability to deploy different versions of CRDs.

Notes

Currently this is working, except:

  • Without certmanager, there's no TLS certificate for the Ingresses. We currently use a DNS-01 Certificate which takes some setting up, so we can either go that route for each vcluster, or look into using self-signed certificates 🤔
  • Without External DNS, the Ingresses don't automatically get DNS records that link to the NGINX External IP.

At the moment, this MR takes the approach of using these vcluster review environments as simple tests against a specific Kubernetes version.

It does the following:

  1. Installs a vcluster instance at the specified Kubernetes version
  2. Installs the Helm Charts with a couple modifications
  • cert-manager is disabled
  • nginx-ingress Service is set to type NodePort to avoid creating a costly LoadBalancer
  • gitlab-runner is disabled since the domain is not configured
  1. Ensures that the Webservice Deployment is rolled out successfully.
  2. Destroys the environment automatically after 1 hour.

Related issues

Related to gitlab-org/distribution/team-tasks#1307 (closed)

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
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

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
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Mitchell Nielsen

Merge request reports