Skip to content

Add gitlab-kas builds

Hordur Freyr Yngvason requested to merge add-gitlab-kas-builds into master

What does this MR do?

Adds a plain image build and UBI image build for GitLab KAS to CNG. Until now, the images have been built in the upstream project, but this lacked integration with GitLab's release tooling, had no UBI images, and no ARM64 support.

Related issues

gitlab-org/cluster-integration/gitlab-agent#155 (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

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • [-] Integration tests added to GitLab QA
    • Skipped because they would not use these new images
  • The impact any change in container size has should be evaluated
    • These are tiny containers, including only KAS binary on top of the base image.

Test plan

Smoke test

Plain image :

$ docker run --rm -it registry.gitlab.com/gitlab-org/build/cng/gitlab-kas:add-gitlab-kas-builds --version
kas version latest, commit: b880590, built: 20220118.220547

UBI image :

$ docker run --rm -it registry.gitlab.com/gitlab-org/build/cng/gitlab-kas:add-gitlab-kas-builds-ubi8 --version
kas version latest, commit: 3d527a2, built: 20220119.225755

Manual integration test

Goal: Configure an agent against the Docker Compose dev environment using the newly introduced images. The agent should become "Connected" in the UI, indicating that KAS was able to talk to GitLab, and GitLab was able to talk to KAS.

Steps:

  1. Changed IMAGE_TAG in .env to add-gitlab-kas-builds
  2. docker-compose up
  3. Created a local kind cluster
  4. Configured an agent in the local GitLab and ran it locally against the cluster (this is easier than docker networking)

I then repeated for IMAGE_TAG=add-gitlab-kas-builds-ubi8. Demo screenshot (gdk.test is my loopback alias).

Outcome: In both cases, everything worked:

Screenshot_2022-01-20_at_08.39.03

Edited by Hordur Freyr Yngvason

Merge request reports