Restrict visibility of prometheus to enforce usage of k8s.io/component-base/metrics

This commit is contained in:
Marek Siarkowicz
2019-10-24 18:06:26 +02:00
parent 73b2c82b28
commit e7d5659943
12 changed files with 43 additions and 10 deletions

View File

@@ -91,6 +91,13 @@ if [[ $ret != 0 && $ret != 3 ]]; then
exit 1
fi
# restrict ./vendor/github.com/prometheus/* targets visibility
# 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=$?
if [[ $ret != 0 && $ret != 3 ]]; then
exit 1
fi
# we need to set this because gazelle doesn't support pkg-config, which would set this link option
# see comment above re: buildozer exit codes
buildozer -quiet 'set clinkopts select({"@io_bazel_rules_go//go/platform:linux":["-lseccomp",],"//conditions:default":[],})' //vendor/github.com/seccomp/libseccomp-golang:go_default_library && ret=$? || ret=$?