buildx icon indicating copy to clipboard operation
buildx copied to clipboard

fixes #617: change delimeter for nodeselector

Open MichalAugustyn opened this issue 4 years ago • 2 comments

As described in #617, there is a conflict between the comma splitting labels and driver opts

MichalAugustyn avatar May 29 '21 12:05 MichalAugustyn

Can we fix the parser to support "," properly?

AkihiroSuda avatar May 30 '21 06:05 AkihiroSuda

That would be possible if the quotation marks were kept inside the driverOpt parameter value. As far as I know, buildx is not even aware of the quotation marks as these are removed in bash before buildx runs.

bin/buildx create --driver kubernetes --name buildx --driver-opt "replicas=3,nodeselector='label1=value1,label2=value2,namespace=5'"

would do the job, but I feel like using ; is more convenient.

MichalAugustyn avatar May 30 '21 13:05 MichalAugustyn

@MichalAugustyn since this PR was opened, we've updated the kubernetes driver docs https://docs.docker.com/build/drivers/kubernetes/#node-assignment:

Due to quoting rules for shell commands, you must wrap the nodeselector and tolerations parameters in single quotes. You can even wrap all of --driver-opt in single quotes, ...

Does that help resolve the issue? If not, we should probably try and work out what to do with this PR.

jedevc avatar Apr 14 '23 13:04 jedevc