fasterci / rules_gitops

Apache License 2.0
26 stars 10 forks source link

Add `tags` kwarg to `k8s_deploy` #35

Closed scasagrande closed 5 months ago

scasagrande commented 5 months ago

As a build systems developer, I would like the ability to add specific Bazel tags to the targets generated by the k8s_deploy macro.

In my current use case I have an oci_image target that is a dependency of a k8s_deploy target. I have to support several different developer platforms and so I apply an automatic platform transition to the image (eg: https://github.com/aspect-build/bazel-examples/blob/main/oci_python_image/hello_world/BUILD.bazel#L60)

However, since I don't want developers using Macbooks to constantly cross compile this image, I have added a "manual" tag to the oci_image target and all other targets that depends on it. This way when a developer is just trying to run bazel build //... they don't have to worry about cross compilation. If they need to build the image, or run a container test, they can enter that specific bazel target label.

michaelschiff commented 5 months ago

makes sense to me