-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build gardener/gardener dev images (#181)
* Build gardener/gardener dev images * Nits, add gardener-build-dev-images-release * Drop overengineered antiaffinity for build pods * Remove concourse-ci/publish from branch protection Co-authored-by: Tim Ebert <[email protected]>
- Loading branch information
1 parent
306bc17
commit a235426
Showing
6 changed files
with
202 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
presubmits: | ||
gardener/gardener: | ||
- name: pull-gardener-verify-image-build | ||
cluster: gardener-prow-build | ||
always_run: true | ||
skip_branches: | ||
- release-v\d+.\d+ # don't run on release branches for now (add a job per branch later) | ||
annotations: | ||
description: Verify gardener image build on pull requests to master branch | ||
decorate: true | ||
spec: | ||
containers: | ||
- name: kaniko | ||
image: gcr.io/kaniko-project/executor:v1.8.1 | ||
command: | ||
- /kaniko/executor | ||
args: | ||
- --context=/home/prow/go/src/github.com/gardener/gardener | ||
- --dockerfile=Dockerfile | ||
- --no-push | ||
resources: | ||
requests: | ||
cpu: 6 | ||
memory: 9Gi | ||
- name: pull-gardener-publish-test-images | ||
cluster: gardener-prow-trusted | ||
skip_branches: | ||
- release-v\d+.\d+ # don't run on release branches for now (add a job per branch later) | ||
annotations: | ||
description: Publish gardener development images on pull requests | ||
decorate: true | ||
optional: true | ||
spec: | ||
serviceAccountName: image-builder | ||
containers: | ||
- name: image-builder | ||
image: eu.gcr.io/gardener-project/ci-infra/image-builder:v20220407-1704ddf | ||
command: | ||
- /image-builder | ||
args: | ||
- --log-level=info | ||
- --docker-config-secret=gardener-prow-gcr-docker-config | ||
- --registry=eu.gcr.io/gardener-project/gardener | ||
- --cache-registry=eu.gcr.io/gardener-project/ci-infra/kaniko-cache | ||
- --target=apiserver | ||
- --target=controller-manager | ||
- --target=scheduler | ||
- --target=gardenlet | ||
- --target=admission-controller | ||
- --target=seed-admission-controller | ||
- --target=resource-manager | ||
- --target=gardener-extension-provider-local | ||
- --add-version-sha-tag=true | ||
# image-builder is the pod which is "scheduled" to a node. The pods created by image-builder have an affinity rule | ||
# which schedules them to the same node as their parent image-builder. This needs to be done, that PVCs could be mounted | ||
# to multiple build pods in parallel. | ||
# For a proper scheduling the combined resource requests of all build pods are assigned to this pod, even though it does not | ||
# use them. The resource requests of build pods themselves are "0" | ||
resources: | ||
requests: | ||
cpu: 6 | ||
memory: 9Gi | ||
# Node selector is copied to build pods | ||
nodeSelector: | ||
dedicated: high-cpu | ||
# Tolerations are copied to build pods | ||
tolerations: | ||
- key: "dedicated" | ||
operator: "Equal" | ||
value: "high-cpu" | ||
effect: "NoSchedule" |
51 changes: 51 additions & 0 deletions
51
config/jobs/gardener/release/gardener-build-dev-images-release.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
postsubmits: | ||
gardener/gardener: | ||
- name: post-gardener-build-dev-images-release | ||
cluster: gardener-prow-trusted | ||
skip_if_only_changed: '^VERSION$' | ||
branches: | ||
- release-v\d+.\d+ | ||
annotations: | ||
description: Gardener development image build on release branch | ||
decorate: true | ||
max_concurrency: 1 | ||
spec: | ||
serviceAccountName: image-builder | ||
containers: | ||
- name: image-builder | ||
image: eu.gcr.io/gardener-project/ci-infra/image-builder:v20220407-1704ddf | ||
command: | ||
- /image-builder | ||
args: | ||
- --log-level=info | ||
- --docker-config-secret=gardener-prow-gcr-docker-config | ||
- --registry=eu.gcr.io/gardener-project/gardener | ||
- --cache-registry=eu.gcr.io/gardener-project/ci-infra/kaniko-cache | ||
- --target=apiserver | ||
- --target=controller-manager | ||
- --target=scheduler | ||
- --target=gardenlet | ||
- --target=admission-controller | ||
- --target=seed-admission-controller | ||
- --target=resource-manager | ||
- --target=gardener-extension-provider-local | ||
- --add-version-tag=true | ||
- --add-version-sha-tag=true | ||
# image-builder is the pod which is "scheduled" to a node. The pods created by image-builder have an affinity rule | ||
# which schedules them to the same node as their parent image-builder. This needs to be done, that PVCs could be mounted | ||
# to multiple build pods in parallel. | ||
# For a proper scheduling the combined resource requests of all build pods are assigned to this pod, even though it does not | ||
# use them. The resource requests of build pods themselves are "0" | ||
resources: | ||
requests: | ||
cpu: 6 | ||
memory: 9Gi | ||
# Node selector is copied to build pods | ||
nodeSelector: | ||
dedicated: high-cpu | ||
# Tolerations are copied to build pods | ||
tolerations: | ||
- key: "dedicated" | ||
operator: "Equal" | ||
value: "high-cpu" | ||
effect: "NoSchedule" |
73 changes: 73 additions & 0 deletions
73
config/jobs/gardener/release/gardener-test-builds-release.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
presubmits: | ||
gardener/gardener: | ||
- name: pull-gardener-verify-image-build-release | ||
cluster: gardener-prow-build | ||
always_run: true | ||
# Run on release branches / adapt this setting and create a new job in case of incompatible changes in tests or go version between the releases | ||
branches: | ||
- release-v\d+.\d+ | ||
annotations: | ||
description: Verify gardener image build on pull requests to release branch | ||
decorate: true | ||
spec: | ||
containers: | ||
- name: kaniko | ||
image: gcr.io/kaniko-project/executor:v1.8.1 | ||
command: | ||
- /kaniko/executor | ||
args: | ||
- --context=/home/prow/go/src/github.com/gardener/gardener | ||
- --dockerfile=Dockerfile | ||
- --no-push | ||
resources: | ||
requests: | ||
cpu: 6 | ||
memory: 9Gi | ||
- name: pull-gardener-publish-test-images-release | ||
cluster: gardener-prow-trusted | ||
# Run on release branches / adapt this setting and create a new job in case of incompatible changes in tests or go version between the releases | ||
branches: | ||
- release-v\d+.\d+ | ||
annotations: | ||
description: Publish gardener development images on pull requests | ||
decorate: true | ||
optional: true | ||
spec: | ||
serviceAccountName: image-builder | ||
containers: | ||
- name: image-builder | ||
image: eu.gcr.io/gardener-project/ci-infra/image-builder:v20220407-1704ddf | ||
command: | ||
- /image-builder | ||
args: | ||
- --log-level=info | ||
- --docker-config-secret=gardener-prow-gcr-docker-config | ||
- --registry=eu.gcr.io/gardener-project/gardener | ||
- --cache-registry=eu.gcr.io/gardener-project/ci-infra/kaniko-cache | ||
- --target=apiserver | ||
- --target=controller-manager | ||
- --target=scheduler | ||
- --target=gardenlet | ||
- --target=admission-controller | ||
- --target=seed-admission-controller | ||
- --target=resource-manager | ||
- --target=gardener-extension-provider-local | ||
- --add-version-sha-tag=true | ||
# image-builder is the pod which is "scheduled" to a node. The pods created by image-builder have an affinity rule | ||
# which schedules them to the same node as their parent image-builder. This needs to be done, that PVCs could be mounted | ||
# to multiple build pods in parallel. | ||
# For a proper scheduling the combined resource requests of all build pods are assigned to this pod, even though it does not | ||
# use them. The resource requests of build pods themselves are "0" | ||
resources: | ||
requests: | ||
cpu: 6 | ||
memory: 9Gi | ||
# Node selector is copied to build pods | ||
nodeSelector: | ||
dedicated: high-cpu | ||
# Tolerations are copied to build pods | ||
tolerations: | ||
- key: "dedicated" | ||
operator: "Equal" | ||
value: "high-cpu" | ||
effect: "NoSchedule" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters