-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] Improve documentation for concurrency settings. #3491
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,24 +28,37 @@ see [skaffold.yaml References]({{< relref "/docs/references/yaml" >}}). | |
|
||
## Local Build | ||
Local build execution is the default execution context. | ||
Skaffold will use the build tools locally installed on your machine to execute the build. | ||
Skaffold will use your locally-installed build tools (such as Docker, Bazel, Maven or Gradle) to execute the build. | ||
|
||
**Configuration** | ||
|
||
To configure the local execution explicitly, add build type `local` to the build section of `skaffold.yaml` | ||
|
||
```yaml | ||
build: | ||
local: | ||
... | ||
local: {} | ||
``` | ||
|
||
The following options can optionally be configured: | ||
|
||
{{< schema root="LocalBuild" >}} | ||
|
||
If you are deploying to [local cluster]({{<relref "/docs/environment/local-cluster" >}}), you can additional set `push` to `false` to speed up builds. | ||
**Faster builds** | ||
|
||
When deploying to a [local cluster]({{<relref "/docs/environment/local-cluster" >}}), | ||
Skaffold will default `push` to `false` to speed up builds. | ||
|
||
Skaffold can build artifacts in parallel by setting `concurrency` to a value other than `1`, and `0` means there are no limits. | ||
For local builds, this is however disabled by default since local builds could have side effects that are | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think we should mention specific builders that are believed to be safe (docker, Bazel) or that aren't safe (and the circumstances)? |
||
not compatible with parallel builds. Feel free to increase the `concurrency` if you know that your builds | ||
can run in parallel. | ||
|
||
{{<alert title="Note">}} | ||
When artifacts are built in parallel, the build logs are still printed in sequence to make them easier to read. | ||
{{</alert>}} | ||
|
||
## In Cluster Build | ||
|
||
Skaffold supports building in cluster via [Kaniko]({{< relref "/docs/pipeline-stages/builders/docker#dockerfile-in-cluster-with-kaniko" >}}) | ||
or [Custom Build Script]({{<relref "/docs/pipeline-stages/builders/custom#custom-build-script-in-cluster" >}}). | ||
|
||
|
@@ -55,14 +68,23 @@ To configure in-cluster Build, add build type `cluster` to the build section of | |
|
||
```yaml | ||
build: | ||
cluster: | ||
... | ||
cluster: {} | ||
``` | ||
|
||
The following options can optionally be configured: | ||
|
||
{{< schema root="ClusterDetails" >}} | ||
|
||
**Faster builds** | ||
|
||
Skaffold can build multiple artifacts in parallel, by settings a value higher than `1` to `concurrency`. | ||
For in-cluster builds, the default is to build all the artifacts in parallel. If your cluster is too | ||
small, you might want to reduce the `concurrency`. Setting `concurrency` to `1` will cause artifacts to be built sequentially. | ||
|
||
{{<alert title="Note">}} | ||
When artifacts are built in parallel, the build logs are still printed in sequence to make them easier to read. | ||
{{</alert>}} | ||
|
||
## Remotely on Google Cloud Build | ||
|
||
Skaffold supports building remotely with Google Cloud Build. | ||
|
@@ -91,10 +113,25 @@ section of `skaffold.yaml`. | |
|
||
```yaml | ||
build: | ||
googleCloudBuild: | ||
... | ||
googleCloudBuild: {} | ||
``` | ||
|
||
The following options can optionally be configured: | ||
|
||
{{< schema root="GoogleCloudBuild" >}} | ||
|
||
**Faster builds** | ||
|
||
Skaffold can build multiple artifacts in parallel, by settings a value higher than `1` to `concurrency`. | ||
For Google Cloud Build, the default is to build all the artifacts in parallel. If you hit a quota restriction, | ||
you might want to reduce the `concurrency`. | ||
|
||
{{<alert title="Note">}} | ||
When artifacts are built in parallel, the build logs are still printed in sequence to make them easier to read. | ||
{{</alert>}} | ||
|
||
**Restrictions** | ||
|
||
Skaffold currently supports [Docker]({{<relref "/docs/pipeline-stages/builders/docker#dockerfile-remotely-with-google-cloud-build">}}), | ||
[Jib]({{<relref "/docs/pipeline-stages/builders/jib#remotely-with-google-cloud-build">}}) | ||
on Google Cloud Build. |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should expand on this paragraph because there are a few implications.
false
to avoid pushing the image to the remote repositoryAnd maybe Faster builds isn't the right section heading either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to add some more documentation when most of this is merged :-)