From 028e45dd414b2038bfcbf7e0b74628c1825816f9 Mon Sep 17 00:00:00 2001 From: Dylan Orzel Date: Mon, 2 Dec 2024 11:56:49 -0700 Subject: [PATCH] Docs for Tolerations on Build and BuildRun objects Signed-off-by: Dylan Orzel --- docs/build.md | 6 +++++- docs/buildrun.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/build.md b/docs/build.md index c0d685584..3bab038d7 100644 --- a/docs/build.md +++ b/docs/build.md @@ -40,6 +40,7 @@ A `Build` resource allows the user to define: - retention - volumes - nodeSelector +- tolerations A `Build` is available within a namespace. @@ -94,6 +95,8 @@ To prevent users from triggering `BuildRun`s (_execution of a Build_) that will | TriggerInvalidPipeline | Trigger type Pipeline is invalid. | | OutputTimestampNotSupported | An unsupported output timestamp setting was used. | | OutputTimestampNotValid | The output timestamp value is not valid. | +| NodeSelectorNotValid | The specified nodeSelector is not valid. | +| TolerationNotValid | The specified tolerations are not valid. | ## Configuring a Build @@ -125,7 +128,8 @@ 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. + - `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. If nodeSelectors are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence. + - `spec.tolerations` - Specifies the tolerations for the build pod. Only `key`, `value`, and `operator` are supported. Only `NoSchedule` taint `effect` is supported. If tolerations are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence. ### Defining the Source diff --git a/docs/buildrun.md b/docs/buildrun.md index 8b5a83eaf..35866480a 100644 --- a/docs/buildrun.md +++ b/docs/buildrun.md @@ -75,7 +75,8 @@ 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. + - `spec.nodeSelector` - Specifies a selector which must match a node's labels for the build pod to be scheduled on that node. If nodeSelectors are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence. + - `spec.tolerations` - Specifies the tolerations for the build pod. Only `key`, `value`, and `operator` are supported. Only `NoSchedule` taint `effect` is supported. If tolerations are specified in both a `Build` and `BuildRun`, `BuildRun` values take precedence. **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`.