Skip to content

handle k8s service updates properly

Safwan Ahmed requested to merge saf-fix-service-update-handler into main

Issue: Respect the host-template annotation - do not s... (#2 - closed)

How to test locally

I could not get the setup to work out locally using the readme instructions. I had a quick idea that allowed me to test my CODE changes locally:

Setup remote dev on GDK

Build and push image

In the root of the directory of this project, build an image from current MR branch:

  • docker build -t registry.gitlab.com/${A_TEMP_IMAGE_REPO} .
  • docker push registry.gitlab.com/${A_TEMP_IMAGE_REPO}

Patch workspace-proxy YAML manifest to use new image.

  • kubectl get pods -n gitlab-workspaces. # run to get proxy podname
  • kubectl edit pod ${POD_NAME} -n gitlab-workspaces # run this to edit live manifest
  • replace the image in the image section from the workspace-proxy image with the image you built as this image contains the changes on the branch (the reason I pushed this to a remote was that k8s could not find the local version of the image for some weird reason)

After carrying out the above steps, your workspaces should be reachable as usual, create or access an existing workspace to confirm this.

To verify the service annotation updates are now respected, try to reproduce the bug described in the issue.

Merge request reports

Loading