Open milas opened 2 years ago
@nicks wdyt about this proposal? I both want to make sure I didn't miss any subtlety around image_deps
wrt custom_build
and sanity check that this is a reasonable approach for custom build extensions
fwiw, I did this as two lists in helm_resource for a few reasons
image_keys
lateri definitely could make the case either way, but would feel weird if half the apis used the list approach and half used dicts
That makes sense! Having image_keys
be build arg key names is straightforward enough
Kristinn asked in Slack:
We do support
image_deps
in the underlyingcustom_build
now, but it hasn't been wired up for this extension.Unfortunately, it's not as simple as passing through the argument, as the actual build command needs to understand how to consume the references that Tilt passes as
TILT_IMAGE_i
environment variables (wherei
is the index inimage_deps
arg).Proposal
In practice, I can't see any way you'd use an image dependency (with the
kubectl_build
extension specifically) other than in anARG
.I think a new parameter to
kubectl_build
could handle this ->image_deps_to_build_args: Dict[str, str] = None
Then in
kubectl_build
:I'm slightly conflicted about using a
dict
given the ordering importance, but it's much more ergonomic than a list of tuples, and from Starlarkdict
reference: