rules_k8s
rules_k8s copied to clipboard
`build` docs claim a yaml file will be generated but none is
Reading through the "build" docs it says
Build builds all of the constituent elements, and makes the template available as {name}.yaml
But no such yaml file is created when running bazel build //path/to:k8s_object_thing. Instead, some shell files are created.
Is there a way to see what yaml will be used when written back to the k8s without accessing container registries?
Ah, docs bug. I got rid of this because it led to conflicts when folks wanted to write:
k8s_object(
name = "foo",
template = "foo.yaml", # Same as output!
)
On "build" nothing was changed in the yaml. If you "run" it, the resolved template is sent to stdout, and this is exactly how the .create (and friends) actions get the yaml to use with kubectl.
Okay, cool. I see it printed out on run, but I'm also getting an error message that seems to be rules_k8s trying to do network IO when I didn't expect that. I'm getting:
CRITICAL:root:Error publishing provided image: Bad status during token exchange: 401
{"errors":[{"code":"UNAUTHORIZED","message":"You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"}]}
I'll make another ticket about that.
Oops, the docs are still busted. Reopening.