Merge pull request #19726 from Moleus/feat-ephemeral-storage-opts

buildx: kubernetes: add ephemeral-storage options to kuberentes-driver
This commit is contained in:
David Karlsson 2024-04-22 11:02:23 +02:00 committed by GitHub
commit 8ce218fbf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 22 additions and 20 deletions

View File

@ -29,25 +29,27 @@ $ docker buildx create \
The following table describes the available driver-specific options that you The following table describes the available driver-specific options that you
can pass to `--driver-opt`: can pass to `--driver-opt`:
| Parameter | Type | Default | Description | | Parameter | Type | Default | Description |
| ----------------- | ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | ---------------------------- | ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `image` | String | | Sets the image to use for running BuildKit. | | `image` | String | | Sets the image to use for running BuildKit. |
| `namespace` | String | Namespace in current Kubernetes context | Sets the Kubernetes namespace. | | `namespace` | String | Namespace in current Kubernetes context | Sets the Kubernetes namespace. |
| `replicas` | Integer | 1 | Sets the number of Pod replicas to create. See [scaling BuildKit][1] | | `default-load` | Boolean | `false` | Automatically load images to the Docker Engine image store. |
| `requests.cpu` | CPU units | | Sets the request CPU value specified in units of Kubernetes CPU. For example `requests.cpu=100m` or `requests.cpu=2` | | `replicas` | Integer | 1 | Sets the number of Pod replicas to create. See [scaling BuildKit][1] |
| `requests.memory` | Memory size | | Sets the request memory value specified in bytes or with a valid suffix. For example `requests.memory=500Mi` or `requests.memory=4G` | | `requests.cpu` | CPU units | | Sets the request CPU value specified in units of Kubernetes CPU. For example `requests.cpu=100m` or `requests.cpu=2` |
| `limits.cpu` | CPU units | | Sets the limit CPU value specified in units of Kubernetes CPU. For example `requests.cpu=100m` or `requests.cpu=2` | | `requests.memory` | Memory size | | Sets the request memory value specified in bytes or with a valid suffix. For example `requests.memory=500Mi` or `requests.memory=4G` |
| `limits.memory` | Memory size | | Sets the limit memory value specified in bytes or with a valid suffix. For example `requests.memory=500Mi` or `requests.memory=4G` | | `requests.ephemeral-storage` | Storage size | | Sets the request ephemeral-storage value specified in bytes or with a valid suffix. For example `requests.ephemeral-storage=2Gi` |
| `default-load` | Boolean | `false` | Automatically load images to the Docker Engine image store. | | `limits.cpu` | CPU units | | Sets the limit CPU value specified in units of Kubernetes CPU. For example `requests.cpu=100m` or `requests.cpu=2` |
| `nodeselector` | CSV string | | Sets the pod's `nodeSelector` label(s). See [node assignment][2]. | | `limits.memory` | Memory size | | Sets the limit memory value specified in bytes or with a valid suffix. For example `requests.memory=500Mi` or `requests.memory=4G` |
| `annotation` | CSV string | | Sets additional annotations on the deployments and pods. | | `limits.ephemeral-storage` | Storage size | | Sets the limit ephemeral-storage value specified in bytes or with a valid suffix. For example `requests.ephemeral-storage=100M` |
| `labels` | CSV string | | Sets additional labels on the deployments and pods. | | `nodeselector` | CSV string | | Sets the pod's `nodeSelector` label(s). See [node assignment][2]. |
| `tolerations` | CSV string | | Configures the pod's taint toleration. See [node assignment][2]. | | `annotation` | CSV string | | Sets additional annotations on the deployments and pods. |
| `serviceaccount` | String | | Sets the pod's `serviceAccountName`. | | `labels` | CSV string | | Sets additional labels on the deployments and pods. |
| `rootless` | `true`,`false` | `false` | Run the container as a non-root user. See [rootless mode][3]. | | `tolerations` | CSV string | | Configures the pod's taint toleration. See [node assignment][2]. |
| `loadbalance` | `sticky`,`random` | `sticky` | Load-balancing strategy. If set to `sticky`, the pod is chosen using the hash of the context path. | | `serviceaccount` | String | | Sets the pod's `serviceAccountName`. |
| `qemu.install` | `true`,`false` | | Install QEMU emulation for multi platforms support. See [QEMU][4]. | | `rootless` | `true`,`false` | `false` | Run the container as a non-root user. See [rootless mode][3]. |
| `qemu.image` | String | `tonistiigi/binfmt:latest` | Sets the QEMU emulation image. See [QEMU][4]. | | `loadbalance` | `sticky`,`random` | `sticky` | Load-balancing strategy. If set to `sticky`, the pod is chosen using the hash of the context path. |
| `qemu.install` | `true`,`false` | | Install QEMU emulation for multi platforms support. See [QEMU][4]. |
| `qemu.image` | String | `tonistiigi/binfmt:latest` | Sets the QEMU emulation image. See [QEMU][4]. |
[1]: #scaling-buildkit [1]: #scaling-buildkit
[2]: #node-assignment [2]: #node-assignment
@ -66,7 +68,7 @@ is configurable using the following driver options:
only creates a single pod. Increasing the number of replicas lets you take only creates a single pod. Increasing the number of replicas lets you take
advantage of multiple nodes in your cluster. advantage of multiple nodes in your cluster.
- `requests.cpu`, `requests.memory`, `limits.cpu`, `limits.memory` - `requests.cpu`, `requests.memory`, `requests.ephemeral-storage`, `limits.cpu`, `limits.memory`, `limits.ephemeral-storage`
These options allow requesting and limiting the resources available to each These options allow requesting and limiting the resources available to each
BuildKit pod according to the official Kubernetes documentation BuildKit pod according to the official Kubernetes documentation