Move prometheus visibility rules to build/visible_to

This commit is contained in:
Marek Siarkowicz 2020-04-09 20:18:26 +02:00
parent 0c9245a29f
commit 62d010d6ac
13 changed files with 26 additions and 12 deletions

View File

@ -425,6 +425,20 @@ package_group(
], ],
) )
package_group(
name = "vendor_githubcom_prometheus_CONSUMERS",
packages = [
"//cluster/images/etcd-version-monitor",
"//pkg/scheduler/framework/v1alpha1",
"//pkg/volume/util/operationexecutor",
"//staging/src/k8s.io/apiserver/pkg/admission/metrics",
"//staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics",
"//staging/src/k8s.io/component-base/metrics/...",
"//test/e2e_node",
"//vendor/...",
],
)
# Added by ./hack/verify-bazel.sh; should be excluded from # Added by ./hack/verify-bazel.sh; should be excluded from
# that script since it makes no sense here. # that script since it makes no sense here.
filegroup( filegroup(

View File

@ -93,7 +93,7 @@ fi
# restrict ./vendor/github.com/prometheus/* targets visibility # restrict ./vendor/github.com/prometheus/* targets visibility
# see comment above re: buildozer exit codes # see comment above re: buildozer exit codes
buildozer -quiet 'set visibility //staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list' '//vendor/github.com/prometheus/...:go_default_library' && ret=$? || ret=$? buildozer -quiet 'set visibility //build/visible_to:vendor_githubcom_prometheus_CONSUMERS' '//vendor/github.com/prometheus/...:go_default_library' && ret=$? || ret=$?
if [[ $ret != 0 && $ret != 3 ]]; then if [[ $ret != 0 && $ret != 3 ]]; then
exit 1 exit 1
fi fi

View File

@ -30,7 +30,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus",
importpath = "github.com/prometheus/client_golang/prometheus", importpath = "github.com/prometheus/client_golang/prometheus",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/beorn7/perks/quantile:go_default_library", "//vendor/github.com/beorn7/perks/quantile:go_default_library",
"//vendor/github.com/golang/protobuf/proto:go_default_library", "//vendor/github.com/golang/protobuf/proto:go_default_library",

View File

@ -5,7 +5,7 @@ go_library(
srcs = ["metric.go"], srcs = ["metric.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/internal", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/internal",
importpath = "github.com/prometheus/client_golang/prometheus/internal", importpath = "github.com/prometheus/client_golang/prometheus/internal",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = ["//vendor/github.com/prometheus/client_model/go:go_default_library"], deps = ["//vendor/github.com/prometheus/client_model/go:go_default_library"],
) )

View File

@ -10,7 +10,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/promhttp", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/promhttp",
importpath = "github.com/prometheus/client_golang/prometheus/promhttp", importpath = "github.com/prometheus/client_golang/prometheus/promhttp",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
"//vendor/github.com/prometheus/client_model/go:go_default_library", "//vendor/github.com/prometheus/client_model/go:go_default_library",

View File

@ -5,7 +5,7 @@ go_library(
srcs = ["testutil.go"], srcs = ["testutil.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/testutil", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_golang/prometheus/testutil",
importpath = "github.com/prometheus/client_golang/prometheus/testutil", importpath = "github.com/prometheus/client_golang/prometheus/testutil",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
"//vendor/github.com/prometheus/client_golang/prometheus/internal:go_default_library", "//vendor/github.com/prometheus/client_golang/prometheus/internal:go_default_library",

View File

@ -5,7 +5,7 @@ go_library(
srcs = ["metrics.pb.go"], srcs = ["metrics.pb.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_model/go", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/client_model/go",
importpath = "github.com/prometheus/client_model/go", importpath = "github.com/prometheus/client_model/go",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/golang/protobuf/proto:go_default_library", "//vendor/github.com/golang/protobuf/proto:go_default_library",
"//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library", "//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library",

View File

@ -11,7 +11,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/expfmt", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/expfmt",
importpath = "github.com/prometheus/common/expfmt", importpath = "github.com/prometheus/common/expfmt",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/golang/protobuf/proto:go_default_library", "//vendor/github.com/golang/protobuf/proto:go_default_library",
"//vendor/github.com/matttproud/golang_protobuf_extensions/pbutil:go_default_library", "//vendor/github.com/matttproud/golang_protobuf_extensions/pbutil:go_default_library",

View File

@ -5,7 +5,7 @@ go_library(
srcs = ["autoneg.go"], srcs = ["autoneg.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
importpath = "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg", importpath = "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
) )
filegroup( filegroup(

View File

@ -17,7 +17,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/model", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/common/model",
importpath = "github.com/prometheus/common/model", importpath = "github.com/prometheus/common/model",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
) )
filegroup( filegroup(

View File

@ -33,7 +33,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs",
importpath = "github.com/prometheus/procfs", importpath = "github.com/prometheus/procfs",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
deps = [ deps = [
"//vendor/github.com/prometheus/procfs/internal/fs:go_default_library", "//vendor/github.com/prometheus/procfs/internal/fs:go_default_library",
"//vendor/github.com/prometheus/procfs/internal/util:go_default_library", "//vendor/github.com/prometheus/procfs/internal/util:go_default_library",

View File

@ -5,7 +5,7 @@ go_library(
srcs = ["fs.go"], srcs = ["fs.go"],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs/internal/fs", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs/internal/fs",
importpath = "github.com/prometheus/procfs/internal/fs", importpath = "github.com/prometheus/procfs/internal/fs",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
) )
filegroup( filegroup(

View File

@ -10,7 +10,7 @@ go_library(
], ],
importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs/internal/util", importmap = "k8s.io/kubernetes/vendor/github.com/prometheus/procfs/internal/util",
importpath = "github.com/prometheus/procfs/internal/util", importpath = "github.com/prometheus/procfs/internal/util",
visibility = ["//staging/src/k8s.io/component-base/metrics:prometheus_import_allow_list"], visibility = ["//build/visible_to:vendor_githubcom_prometheus_CONSUMERS"],
) )
filegroup( filegroup(