Hey all! I'm developing a plugin for working with ...
# plugins
g
Hey all! I'm developing a plugin for working with kustomize + kubectl. I'm trying to figure out how to do substitutions w/ outputs from other targets - let's say converting the dependency
:target
to the equivalent (relative!) output artifact. I.e.
if current target depends on target
../foo:server
, what file path(s) do I substitute for
../foo:server
in the input manifests?
I noticed that some Docker manifests seem to depend on
../foo:server
but actually refer to
../server.pex
in the case of a Python target. I'd want to automate this translation. I've got something "ish" workable with
BuiltPackage
but that is root (or src-root?) relative, requiring quite a bit of wrangling with paths/labels.
s
Hey Tom - Did you ever make any progress on your Kustomize plugin?
g
I have some stuff here; https://github.com/tgolsson/pants-backends/tree/main/pants-plugins/kustomize -- but I never ended up using it beyond some toying with my home cluster unfortunately.
There's three somewhat related plugins I was hacking on back then; kustomize + kubectl + secrets. Secrets provides plumbing for fetching secrets from while trying to prevent them from being stored unencrypted at rest by making them (+derived) uncacheable. Currently I only have a Bitwarden backer for that but plan was something like KMS if I would start replacing our bazel with it
(The secrets + Bitwarden ones I do use regularly however, so they'll be a bit more tested.)