Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Latest commit

 

History

History
131 lines (71 loc) · 5.71 KB

ginkgo_upgrade.md

File metadata and controls

131 lines (71 loc) · 5.71 KB

GINKGO UPGRADE

Bumping ginkgo in the project requires four PRs.

1. Dependabot PR

  • Dependabot automatically updates ginkgo version but only in go.mod and go.sum files.
  • This is an automatically generated PR by Dependabot but it needs approval from maintainers to get merged.

2. Edit-hardcoded-version PR

a. Make changes to appropriate files in required directories

b. Create PR

  • Open pull request(s) accordingly, to fire cloudbuild for building the component's image (if applicable).

c. Merge

d. Make sure cloudbuild is a success

  • Wait for cloud build. If you don't have access to cloudbuild, you can also have a look at this, to see the progress of the build.

  • Proceed only after cloud-build is successful in building a new Ingress-Nginx-Controller image.

3. PROMOTE the new-testrunner-image PR:

Promoting the images basically means that images, that were pushed to staging container registry in the steps above, now are also pushed to the public container registry. Thus are publicly available. Follow these steps to promote images:

  • When you make changes to the Dockerfile or other core content under images directory , it generates a new image in google cloudbuild. This is because kubernetes projects need to use the infra provided for the kubernetes projects. The new image is always only pushed to the staging repository of K8S. From the staging repo, the new image needs to be promoted to the production repo. And once promoted, its possible to use the sha of the new image in the code.

a. Get the sha

  • Get the sha of the new image(s) of the controller, from the cloudbuild, from steps above

    • The sha is available in output from cloud build

    • The sha is also visible here

    • The sha is also visible here, after cloud build is finished. Click on the respective job, go to Artifacts section in the UI, then again artifacts in the directory browser. In the build.log at the very bottom you see something like this:

    ...
    pushing manifest for gcr.io/k8s-staging-ingress-nginx/controller:v1.0.2@sha256:e15fac6e8474d77e1f017edc33d804ce72a184e3c0a30963b2a0d7f0b89f6b16
    ...
    

b. Add the new image to k8s.io

  • The sha(s) from the step before (and the tag(s) for the new image(s) have to be added, as a new line, in a file, of the k8s.io project of Kubernetes organization.

  • Fork that other project (if you don't have a fork already).

  • Other project to fork Github repo kubernetes/k8s.io

  • Fetch --all and rebase to upstream if already forked.

  • Create a branch in your fork, named as the issue number for this release

  • In the related branch, of your fork, edit the file k8s.gcr.io/images/k8s-staging-ingress-nginx/images.yaml.

  • For making it easier, you can edit your branch directly in the browser. But be careful about making any mistake.

  • Insert the sha(s) & the tag(s), in a new line, in this file Project kubernetes/k8s.io Ingress-Nginx-Controller Images Look at this example PR and the diff to see how it was done before

  • Save and commit

c. Create PR

  • Open pull request to promote the new e2e-test-runner image.

d. Merge

  • Merge success is required.

  • Proceed only after cloud-build is successful in building a new e2e-test-runner image.

4. Change testrunner-image-sha PR

a. Get the sha

  • Make sure to get the tag and sha of the promoted image from the step before, either from cloudbuild or from here.

a. Make sure your git workspace is ready

  • Get your git workspace ready

    • If not using a pre-existing fork, then Fork the repo kubernetes/ingress-nginx

    • Clone (to laptop or wherever)

    • Add upstream

    • Set upstream url to no_push

    • Checkout & switch to branch, named as per related new-release-issue-number

    • If already forked, and upstream already added, then git fetch --all and git rebase upstream/main (not origin)

    • Checkout a branch in your fork's clone

    • Perform any other diligence as needed

  • Prefer to edit only and only in your branch, in your Fork

b. Change testrunner-image-sha

c. Create PR

  • Look at this PR for how it was done before example PR
  • Create a PR

d. Merge

  • Finally merge the PR.

END