rules_k8s
rules_k8s copied to clipboard
k8s_objects is not usable without defining cluster
The intent is to just render a manifest using k8s_objects
:
k8s_objects(
name = "stable",
objects = [
":serviceaccount",
":deployment",
":role",
":rolebinding",
],
)
k8s_object(
name = "role",
kind = "role",
template = ":role.yaml",
)
...
However this leads to an error as cluster was not defined and hence k8s_objects is missing some targets it thinks it depends on (targets that I'm not interested in using):
no such target '//:role.create': target 'role.create' not declared in package '...' defined by ...BUILD.bazel and referenced by '//:stable.create'
Is it possible to conditionally add the create, apply, etc targets for k8s_objects
if the collection of k8s_object
did not define those targets?
I think this is the same as issue #270