Skip to content

Commit eafc9c3

Browse files
authored
Fix cluster override in k8s_test_setup (#129)
1 parent 5118397 commit eafc9c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

skylib/k8s.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def _k8s_test_setup_impl(ctx):
481481
# add files referenced by rule attributes to runfiles
482482
files = [ctx.executable._stamper, ctx.file.kubectl, ctx.file.kubeconfig, ctx.executable._kustomize, ctx.executable._it_sidecar, ctx.executable._it_manifest_filter]
483483
files += ctx.files._set_namespace
484-
files += ctx.files._cluster
484+
files += ctx.files.cluster
485485

486486
push_statements, files, pushes_runfiles = imagePushStatements(ctx, [o for o in ctx.attr.objects if KustomizeInfo in o], files)
487487

@@ -505,7 +505,7 @@ def _k8s_test_setup_impl(ctx):
505505
template = ctx.file._namespace_template,
506506
substitutions = {
507507
"%{it_sidecar}": ctx.executable._it_sidecar.short_path,
508-
"%{cluster}": ctx.file._cluster.path,
508+
"%{cluster}": ctx.file.cluster.path,
509509
"%{kubeconfig}": ctx.file.kubeconfig.path,
510510
"%{kubectl}": ctx.file.kubectl.path,
511511
"%{portforwards}": " ".join(["-portforward=" + p for p in ctx.attr.portforward_services]),
@@ -546,7 +546,7 @@ k8s_test_setup = rule(
546546
"portforward_services": attr.string_list(),
547547
"setup_timeout": attr.string(default = "10m"),
548548
"wait_for_apps": attr.string_list(),
549-
"_cluster": attr.label(
549+
"cluster": attr.label(
550550
default = Label("@k8s_test//:cluster"),
551551
allow_single_file = True,
552552
),

0 commit comments

Comments
 (0)