From 37461d85e7d06704ed3b1ff0f8ad1cffc2240c30 Mon Sep 17 00:00:00 2001 From: Dylan Orzel Date: Wed, 2 Oct 2024 11:41:09 -0600 Subject: [PATCH] Docs for NodeSelectors on Build and BuildRun objects Signed-off-by: Dylan Orzel --- docs/build.md | 34 +++++++++++++++++++++------------- docs/buildrun.md | 42 +++++++++++++++++++++++------------------- 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/docs/build.md b/docs/build.md index 5db3b05278..c0d685584c 100644 --- a/docs/build.md +++ b/docs/build.md @@ -6,19 +6,25 @@ SPDX-License-Identifier: Apache-2.0 # Build -- [Overview](#overview) -- [Build Controller](#build-controller) -- [Build Validations](#build-validations) -- [Configuring a Build](#configuring-a-build) - - [Defining the Source](#defining-the-source) - - [Defining the Strategy](#defining-the-strategy) - - [Defining ParamValues](#defining-paramvalues) - - [Defining the Builder or Dockerfile](#defining-the-builder-or-dockerfile) - - [Defining the Output](#defining-the-output) - - [Defining Retention Parameters](#defining-retention-parameters) - - [Defining Volumes](#defining-volumes) - - [Defining Triggers](#defining-triggers) -- [BuildRun deletion](#buildrun-deletion) +- [Build](#build) + - [Overview](#overview) + - [Build Controller](#build-controller) + - [Build Validations](#build-validations) + - [Configuring a Build](#configuring-a-build) + - [Defining the Source](#defining-the-source) + - [Defining the Strategy](#defining-the-strategy) + - [Defining ParamValues](#defining-paramvalues) + - [Example](#example) + - [Defining the Builder or Dockerfile](#defining-the-builder-or-dockerfile) + - [Defining the Output](#defining-the-output) + - [Defining the vulnerabilityScan](#defining-the-vulnerabilityscan) + - [Defining Retention Parameters](#defining-retention-parameters) + - [Defining Volumes](#defining-volumes) + - [Defining Triggers](#defining-triggers) + - [GitHub](#github) + - [Image](#image) + - [Tekton Pipeline](#tekton-pipeline) + - [BuildRun Deletion](#buildrun-deletion) ## Overview @@ -33,6 +39,7 @@ A `Build` resource allows the user to define: - env - retention - volumes +- nodeSelector A `Build` is available within a namespace. @@ -118,6 +125,7 @@ The `Build` definition supports the following fields: - `spec.retention.ttlAfterSucceeded` - Specifies the duration for which a successful buildrun can exist. - `spec.retention.failedLimit` - Specifies the number of failed buildrun that can exist. - `spec.retention.succeededLimit` - Specifies the number of successful buildrun can exist. + - `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. ### Defining the Source diff --git a/docs/buildrun.md b/docs/buildrun.md index 4a78b80bbe..8b5a83eafa 100644 --- a/docs/buildrun.md +++ b/docs/buildrun.md @@ -6,25 +6,28 @@ SPDX-License-Identifier: Apache-2.0 # BuildRun -- [Overview](#overview) -- [BuildRun Controller](#buildrun-controller) -- [Configuring a BuildRun](#configuring-a-buildrun) - - [Defining the Build Reference](#defining-the-build-reference) - - [Defining the Build Specification](#defining-the-build-specification) - - [Defining ParamValues](#defining-paramvalues) - - [Defining the ServiceAccount](#defining-the-serviceaccount) - - [Defining Retention Parameters](#defining-retention-parameters) - - [Defining Volumes](#defining-volumes) -- [Canceling a `BuildRun`](#canceling-a-buildrun) -- [Automatic `BuildRun` deletion](#automatic-buildrun-deletion) -- [Specifying Environment Variables](#specifying-environment-variables) -- [BuildRun Status](#buildrun-status) - - [Understanding the state of a BuildRun](#understanding-the-state-of-a-buildrun) - - [Understanding failed BuildRuns](#understanding-failed-buildruns) - - [Understanding failed git-source step](#understanding-failed-git-source-step) - - [Step Results in BuildRun Status](#step-results-in-buildrun-status) - - [Build Snapshot](#build-snapshot) -- [Relationship with Tekton Tasks](#relationship-with-tekton-tasks) +- [BuildRun](#buildrun) + - [Overview](#overview) + - [BuildRun Controller](#buildrun-controller) + - [Configuring a BuildRun](#configuring-a-buildrun) + - [Defining the Build Reference](#defining-the-build-reference) + - [Defining the Build Specification](#defining-the-build-specification) + - [Defining the Build Source](#defining-the-build-source) + - [Defining ParamValues](#defining-paramvalues) + - [Defining the ServiceAccount](#defining-the-serviceaccount) + - [Defining Retention Parameters](#defining-retention-parameters) + - [Defining Volumes](#defining-volumes) + - [Canceling a `BuildRun`](#canceling-a-buildrun) + - [Automatic `BuildRun` deletion](#automatic-buildrun-deletion) + - [Specifying Environment Variables](#specifying-environment-variables) + - [BuildRun Status](#buildrun-status) + - [Understanding the state of a BuildRun](#understanding-the-state-of-a-buildrun) + - [Understanding failed BuildRuns](#understanding-failed-buildruns) + - [Understanding failed BuildRuns due to VulnerabilitiesFound](#understanding-failed-buildruns-due-to-vulnerabilitiesfound) + - [Understanding failed git-source step](#understanding-failed-git-source-step) + - [Step Results in BuildRun Status](#step-results-in-buildrun-status) + - [Build Snapshot](#build-snapshot) + - [Relationship with Tekton Tasks](#relationship-with-tekton-tasks) ## Overview @@ -72,6 +75,7 @@ The `BuildRun` definition supports the following fields: - `spec.output.timestamp` - Overrides the output timestamp configuration of the referenced build to instruct the build to change the output image creation timestamp to the specified value. When omitted, the respective build strategy tool defines the output image timestamp. - `spec.output.vulnerabilityScan` - Overrides the output vulnerabilityScan configuration of the referenced build to run the vulnerability scan for the generated image. - `spec.env` - Specifies additional environment variables that should be passed to the build container. Overrides any environment variables that are specified in the `Build` resource. The available variables depend on the tool used by the chosen build strategy. + - `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. **Note**: The `spec.build.name` and `spec.build.spec` are mutually exclusive. Furthermore, the overrides for `timeout`, `paramValues`, `output`, and `env` can only be combined with `spec.build.name`, but **not** with `spec.build.spec`.