tilt icon indicating copy to clipboard operation
tilt copied to clipboard

support kustomize build --enable_alpha_plugins

Open landism opened this issue 2 years ago • 2 comments

Describe the Feature You Want

The ability to use kustomize plugins with Tilt's kustomize builtin. (alternatively, the ability to invoke kustomize without having to reimplement the builtin's kustomize dependency calculation)

Current Behavior

The kustomize builtin does not really have any parameterization

Additional context

  • A potential workaround is this:
yaml = local('kustomize build --alpha-plugins deployments')
k8s_yaml(yaml)
watch_file('deployments') # reload if anything in this directory changes

This isn't quite the same since it's just assuming the dependencies are the "deployments" directory, which might be both too narrow and too wide.

  • Potential solutions:
    • Break out dependency calculations into a separate builtin / extension, so users can use that to calculate deps and local to invoke kustomize however they want.
    • Add an arg to the kustomize builtin specifically to enable plugins
    • Add an arg to the kustomize builtin to allow users to add arbitrary options to the kustomize call

landism avatar Oct 04 '21 16:10 landism

it would also be useful if Tilt built the plugin image watching files changes.

albaquarto avatar Mar 02 '22 09:03 albaquarto

I'd also love to see this, as I wrote my own Kustomize transformer and can't really use it in my dev environment with Tilt or my prod environment with ArgoCD.

I know it's categorized as "alpha" but there's really no reason NOT to pass the flag by default.

The flag wont negatively impact anyone, and I find the security concerns a bit overblown, considering we're either

  • writing these deployments ourselves and therefore can trust what we're running
  • we're deploying code we didn't write and it's already not fully trusted and therefore may as well run it all

tedtramonte avatar May 04 '22 20:05 tedtramonte

we just released a new version of tilt that allows you to add flags to kustomize(), see: https://docs.tilt.dev/api.html#api.kustomize

nicks avatar Oct 25 '22 14:10 nicks