Skip to content

Commit

Permalink
Fix cluster override in k8s_test_setup (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
harjsing7 authored Mar 15, 2023
1 parent 5118397 commit eafc9c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions skylib/k8s.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def _k8s_test_setup_impl(ctx):
# add files referenced by rule attributes to runfiles
files = [ctx.executable._stamper, ctx.file.kubectl, ctx.file.kubeconfig, ctx.executable._kustomize, ctx.executable._it_sidecar, ctx.executable._it_manifest_filter]
files += ctx.files._set_namespace
files += ctx.files._cluster
files += ctx.files.cluster

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

Expand All @@ -505,7 +505,7 @@ def _k8s_test_setup_impl(ctx):
template = ctx.file._namespace_template,
substitutions = {
"%{it_sidecar}": ctx.executable._it_sidecar.short_path,
"%{cluster}": ctx.file._cluster.path,
"%{cluster}": ctx.file.cluster.path,
"%{kubeconfig}": ctx.file.kubeconfig.path,
"%{kubectl}": ctx.file.kubectl.path,
"%{portforwards}": " ".join(["-portforward=" + p for p in ctx.attr.portforward_services]),
Expand Down Expand Up @@ -546,7 +546,7 @@ k8s_test_setup = rule(
"portforward_services": attr.string_list(),
"setup_timeout": attr.string(default = "10m"),
"wait_for_apps": attr.string_list(),
"_cluster": attr.label(
"cluster": attr.label(
default = Label("@k8s_test//:cluster"),
allow_single_file = True,
),
Expand Down

0 comments on commit eafc9c3

Please sign in to comment.