Skip to content

Build gardener/gardener images with prow/kaniko #180

@oliver-goetz

Description

@oliver-goetz

/kind enhancement

What would you like to be added:
Now that the prow image-builder app is completed and is building ci-infra apps productively and gardener apps in a test environment, we could think about the next steps to build gardener/gardener images in prow.

We could proceed in two steps:

  1. Use prow for test builds replacing concourse-ci/publish job
  2. Include prow image build into release pipeline

Step 1: test builds

When investigating the I noticed that the images built by concourse-ci/publish PR test are pushed to eu.gcr.io/gardener-project/gardener which is the same location where we are pushing our release images too.
This does not look ideal from my point of view, because

  • we cannot guarantee that those image come from a trusted origin
  • I question, that we really need to push those images anywhere. From my perspective these are primary tests if the PR could be built at all.

I would like to propose a slightly different setup for prow

  • deactivate concourse-ci/publish PR test
  • create a new presubmit job for gardener/gardener which runs a plain kaniko pod without any target but with the --no-push flag
    • the pod will build the entire Dockerfile
    • it neither uses cache nor pushes the resulting images anywhere, so it can run in safely the prow-work cluster without any credentials for gcr.io
    • the goal of this job is to find out, if we are able to build the PR
  • Change the destination of post-gardener-build-images job to eu.gcr.io/gardener-project/gardener
    • we will build the current state of master branch
    • exclude commits which are changing the VERSION file only, that we do not build release images

Those are the gains from my point of view:

  • we do not push images from "untrusted" origins to eu.gcr.io/gardener-project/gardener anymore
  • we are able to validate if the prow images are working more easily
  • we already reduce the load of our concourse systems

Step 2: release builds

After we verified that our builds are working as expected we can start building our release images in prow.

  • create a build prow job similar to post-gardener-build-images for the release branches which is triggered by changes to VERSIONS file
  • deactivate build in concourse pipeline but keep the rest
  • gardener-robot-ci-* would initiate the release build by pushing a new VERSION file to the release branches

Step 2 is still a draft. I cannot see the entire concourse release pipeline yet.

Why is this needed:
Reduce load on concourse pipelines.
Improve development experience.
Build images of a trusted origin only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementEnhancement, improvement, extensionlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions