Add gitlab-kas builds
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.
- Plain pipeline: https://gitlab.com/gitlab-org/build/CNG/-/pipelines/452019324
- UBI pipeline: https://gitlab.com/gitlab-org/build/CNG/-/pipelines/452019577
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:
- Changed
IMAGE_TAG
in.env
toadd-gitlab-kas-builds
docker-compose up
- Created a local
kind
cluster - 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: