Skip to content

Conversation

AndiDog
Copy link

@AndiDog AndiDog commented Oct 14, 2025

I wanted to use lima-based development instructions (from the Kubernetes CAPI project docs):

limactl start template://docker-rootful --name "docker" --tty=false \
  --set '.provision += {"mode":"system","script":"#!/bin/bash\nset -eux -o pipefail\ncat << EOF > \"/etc/sysctl.d/99-capi.conf\"\nfs.inotify.max_user_watches = 1048576\nfs.inotify.max_user_instances = 8192\nEOF\nsysctl -p \"/etc/sysctl.d/99-capi.conf\""}' \
  --set '.mounts[0] = {"location": "~", "writable": true}' \
  --memory 12 --cpus 10 --disk 64 \
  --vm-type vz --rosetta=true

and it turned out that the sysctl settings that are supposed to be applied in the first --set argument are totally ignored without warning because that's how command line parsers usually work. Users should definitely be able to specify this multiple times, so I added support for that.

… the first such parameter

Signed-off-by: Andreas Sommer <[email protected]>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing this! I had assumed that this already worked, but indeed it didn't.

There are already several other options that can be specified multiple times: --dns, --mount, --mount-only, --network. They all build a single expression in their exprFunc.

So I would like to either --set do the same, or to modify all the existing implementations to return a []string as well, for consistency.

You should only change the existing implementation if it simplifies the code. Otherwise --set should just join the individual values together itself and return a single string.

@jandubois jandubois added this to the v2.0.0 milestone Oct 14, 2025
@AkihiroSuda
Copy link
Member

I thought we had a similar PR in the past but can't find it

@AkihiroSuda AkihiroSuda linked an issue Oct 15, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

limactl create: --set cannot be specified multiple times

3 participants