Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ For example, let's look at the [example's k8s_deploy](./e2e/helloworld/BUILD). W
cd e2e
bazel run //helloworld:mynamespace.show
```
We can run `bazel run ///helloworld:mynamespace.diff` to see a difference from source to what is stored in kubernetes.

When you run `bazel run ///helloworld:mynamespace.apply`, it applies this file into your personal (`{BUILD_USER}`) namespace. Viewing the rendered files with `.show` can be useful for debugging issues with invalid or misconfigured manifests.

| Parameter | Default | Description
Expand Down
11 changes: 11 additions & 0 deletions skylib/k8s.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ def k8s_deploy(
tags = tags,
visibility = visibility,
)
kubectl(
name = name + ".diff",
srcs = [name],
command = "diff",
cluster = cluster,
push = False,
user = user,
namespace = namespace,
tags = tags,
visibility = visibility,
)
show(
name = name + ".show",
namespace = namespace,
Expand Down