set node name for k8s driver when appending nodes

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-03-10 19:33:52 +01:00
parent 95cefc3c57
commit fc1a41d2e5
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -78,6 +78,8 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
const args: Array<string> = ['create', '--name', inputs.name, '--append'];
if (node.name) {
args.push('--node', node.name);
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
args.push('--node', `node-${uuid.v4()}`);
}
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
await Util.asyncForEach(node['driver-opts'], async driverOpt => {