BUILD 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. # Package groups defined for use in kubernetes visibility rules.
  2. #
  3. # See associated README.md for explanation.
  4. #
  5. # Style suggestions:
  6. #
  7. # - Sort package group definitions by name.
  8. #
  9. # - Prefer obvious package group names.
  10. #
  11. # E.g "pkg_kubectl_cmd_util_CONSUMERS" names a group
  12. # of packages allowed to depend on (consume) the
  13. # //pkg/kubectl/cmd/util package.
  14. #
  15. #
  16. # - A group name ending in _BAD wants to be deleted.
  17. #
  18. # Such a group wants to contract, rather than expand.
  19. # It likely exists to permit a legacy unintentional
  20. # dependency that requires more work to remove.
  21. #
  22. # - Prefer defining new groups to expanding groups.
  23. #
  24. # The former permits tight targeting, the latter can
  25. # allow unnecessary visibility and thus bad deps.
  26. #
  27. package_group(
  28. name = "COMMON_generators",
  29. packages = [
  30. "//cmd/gendocs",
  31. "//cmd/genman",
  32. "//cmd/genyaml",
  33. ],
  34. )
  35. package_group(
  36. name = "COMMON_testing",
  37. packages = [
  38. "//hack",
  39. "//hack/lib",
  40. "//hack/make-rules",
  41. "//test/e2e",
  42. "//test/e2e/framework",
  43. "//test/e2e/kubectl",
  44. "//test/e2e/workload",
  45. "//test/integration/etcd",
  46. "//test/integration/framework",
  47. "//test/integration/kubectl",
  48. ],
  49. )
  50. package_group(
  51. name = "cluster",
  52. packages = [
  53. "//cluster/...",
  54. ],
  55. )
  56. package_group(
  57. name = "KUBEADM_BAD",
  58. packages = [
  59. "//cmd/kubeadm/app/cmd",
  60. ],
  61. )
  62. package_group(
  63. name = "cmd_kubectl_CONSUMERS",
  64. packages = [
  65. "//cmd",
  66. ],
  67. )
  68. package_group(
  69. name = "cmd_kubectl_app_CONSUMERS",
  70. packages = [
  71. "//cmd/kubectl",
  72. ],
  73. )
  74. package_group(
  75. name = "pkg_kubectl_CONSUMERS_BAD",
  76. includes = [
  77. ":KUBEADM_BAD",
  78. ],
  79. packages = [
  80. "//cmd/clicheck",
  81. "//cmd/hyperkube",
  82. "//pkg",
  83. ],
  84. )
  85. package_group(
  86. name = "pkg_kubectl_CONSUMERS",
  87. includes = [
  88. ":COMMON_generators",
  89. ":pkg_kubectl_CONSUMERS_BAD",
  90. ],
  91. packages = [
  92. "//cmd/kubectl",
  93. "//cmd/kubectl/app",
  94. "//pkg/kubectl/cmd",
  95. "//pkg/kubectl/cmd/auth",
  96. "//pkg/kubectl/cmd/config",
  97. "//pkg/kubectl/cmd/rollout",
  98. "//pkg/kubectl/cmd/set",
  99. "//pkg/kubectl/cmd/testing",
  100. "//pkg/kubectl/cmd/util",
  101. "//pkg/kubectl/cmd/util/editor",
  102. ],
  103. )
  104. package_group(
  105. name = "pkg_kubectl_cmd_CONSUMERS_BAD",
  106. packages = [
  107. "//cmd/clicheck",
  108. "//cmd/hyperkube",
  109. ],
  110. )
  111. package_group(
  112. name = "pkg_kubectl_cmd_CONSUMERS",
  113. includes = [
  114. ":COMMON_generators",
  115. ":pkg_kubectl_cmd_CONSUMERS_BAD",
  116. ],
  117. packages = [
  118. "//cmd/kubectl",
  119. "//cmd/kubectl/app",
  120. "//pkg/kubectl",
  121. "//pkg/kubectl/cmd",
  122. ],
  123. )
  124. package_group(
  125. name = "pkg_kubectl_cmd_auth_CONSUMERS",
  126. packages = [
  127. "//pkg/kubectl/cmd",
  128. "//pkg/kubectl/cmd/rollout",
  129. ],
  130. )
  131. package_group(
  132. name = "pkg_kubectl_cmd_config_CONSUMERS",
  133. packages = [
  134. "//pkg/kubectl/cmd",
  135. ],
  136. )
  137. package_group(
  138. name = "pkg_kubectl_cmd_rollout_CONSUMERS",
  139. packages = [
  140. "//pkg/kubectl/cmd",
  141. ],
  142. )
  143. package_group(
  144. name = "pkg_kubectl_cmd_set_CONSUMERS",
  145. packages = [
  146. "//pkg/kubectl/cmd",
  147. "//pkg/kubectl/cmd/rollout",
  148. ],
  149. )
  150. package_group(
  151. name = "pkg_kubectl_cmd_templates_CONSUMERS",
  152. includes = [
  153. ":COMMON_generators",
  154. ":COMMON_testing",
  155. ],
  156. packages = [
  157. "//cmd/kubectl",
  158. "//cmd/kubectl/app",
  159. "//pkg/kubectl/cmd",
  160. "//pkg/kubectl/cmd/auth",
  161. "//pkg/kubectl/cmd/config",
  162. "//pkg/kubectl/cmd/resource",
  163. "//pkg/kubectl/cmd/rollout",
  164. "//pkg/kubectl/cmd/set",
  165. "//pkg/kubectl/cmd/templates",
  166. "//pkg/kubectl/cmd/util",
  167. "//pkg/kubectl/cmd/util/sanity",
  168. ],
  169. )
  170. package_group(
  171. name = "pkg_kubectl_cmd_testdata_edit_CONSUMERS",
  172. packages = [
  173. "//pkg/kubectl/cmd",
  174. ],
  175. )
  176. package_group(
  177. name = "pkg_kubectl_cmd_testing_CONSUMERS",
  178. packages = [
  179. "//pkg/kubectl/cmd",
  180. "//pkg/kubectl/cmd/auth",
  181. "//pkg/kubectl/cmd/resource",
  182. "//pkg/kubectl/cmd/set",
  183. "//pkg/kubectl/explain",
  184. ],
  185. )
  186. package_group(
  187. name = "pkg_kubectl_cmd_util_CONSUMERS_BAD",
  188. includes = [
  189. ":KUBEADM_BAD",
  190. ],
  191. packages = [
  192. "//cmd/clicheck",
  193. "//cmd/hyperkube",
  194. "//cmd/kube-proxy/app",
  195. "//cmd/kube-scheduler/app",
  196. ],
  197. )
  198. package_group(
  199. name = "pkg_kubectl_cmd_util_CONSUMERS",
  200. includes = [
  201. ":COMMON_generators",
  202. ":COMMON_testing",
  203. ":pkg_kubectl_cmd_util_CONSUMERS_BAD",
  204. ],
  205. packages = [
  206. "//cmd/kubectl",
  207. "//cmd/kubectl/app",
  208. "//pkg/kubectl/cmd",
  209. "//pkg/kubectl/cmd/auth",
  210. "//pkg/kubectl/cmd/config",
  211. "//pkg/kubectl/cmd/resource",
  212. "//pkg/kubectl/cmd/rollout",
  213. "//pkg/kubectl/cmd/set",
  214. "//pkg/kubectl/cmd/testing",
  215. "//pkg/kubectl/cmd/util",
  216. "//pkg/kubectl/cmd/util/editor",
  217. ],
  218. )
  219. package_group(
  220. name = "pkg_kubectl_cmd_util_editor_CONSUMERS",
  221. packages = [
  222. "//pkg/kubectl/cmd",
  223. "//pkg/kubectl/cmd/util",
  224. ],
  225. )
  226. package_group(
  227. name = "pkg_kubectl_cmd_util_jsonmerge_CONSUMERS",
  228. packages = [
  229. "//pkg/kubectl/cmd",
  230. "//pkg/kubectl/cmd/util",
  231. ],
  232. )
  233. package_group(
  234. name = "pkg_kubectl_cmd_util_sanity_CONSUMERS",
  235. packages = [
  236. "//cmd/clicheck",
  237. "//pkg/kubectl/cmd/util",
  238. ],
  239. )
  240. package_group(
  241. name = "pkg_kubectl_metricsutil_CONSUMERS_BAD",
  242. packages = [
  243. "//cmd/clicheck",
  244. "//cmd/hyperkube",
  245. ],
  246. )
  247. package_group(
  248. name = "pkg_kubectl_metricsutil_CONSUMERS",
  249. includes = [
  250. ":COMMON_generators",
  251. ":pkg_kubectl_metricsutil_CONSUMERS_BAD",
  252. ],
  253. packages = [
  254. "//cmd/kubectl",
  255. "//cmd/kubectl/app",
  256. "//pkg/kubectl",
  257. "//pkg/kubectl/cmd",
  258. ],
  259. )
  260. package_group(
  261. name = "pkg_kubectl_resource_CONSUMERS",
  262. includes = [
  263. ":COMMON_generators",
  264. ":COMMON_testing",
  265. ],
  266. packages = [
  267. "//cmd/kubectl",
  268. "//cmd/kubectl/app",
  269. "//pkg/kubectl",
  270. "//pkg/kubectl/cmd",
  271. "//pkg/kubectl/cmd/auth",
  272. "//pkg/kubectl/cmd/config",
  273. "//pkg/kubectl/cmd/resource",
  274. "//pkg/kubectl/cmd/rollout",
  275. "//pkg/kubectl/cmd/set",
  276. "//pkg/kubectl/cmd/testing",
  277. "//pkg/kubectl/cmd/util",
  278. "//pkg/kubectl/cmd/util/editor",
  279. ],
  280. )
  281. package_group(
  282. name = "pkg_kubectl_testing_CONSUMERS",
  283. packages = [
  284. "//pkg/kubectl",
  285. "//pkg/printers/internalversion",
  286. ],
  287. )
  288. package_group(
  289. name = "pkg_kubectl_util_CONSUMERS",
  290. packages = [
  291. "//pkg/kubectl",
  292. "//pkg/kubectl/cmd",
  293. "//pkg/kubectl/proxy",
  294. ],
  295. )
  296. package_group(
  297. name = "pkg_kubectl_validation_CONSUMERS",
  298. packages = [
  299. "//pkg/kubectl",
  300. "//pkg/kubectl/cmd/testing",
  301. "//pkg/kubectl/cmd/util",
  302. "//pkg/kubectl/resource",
  303. ],
  304. )
  305. # Added by ./hack/verify-bazel.sh; should be excluded from
  306. # that script since it makes no sense here.
  307. filegroup(
  308. name = "package-srcs",
  309. srcs = glob(["**"]),
  310. tags = ["automanaged"],
  311. )
  312. # Added by ./hack/verify-bazel.sh; should be excluded from
  313. # that script since it makes no sense here.
  314. filegroup(
  315. name = "all-srcs",
  316. srcs = [":package-srcs"],
  317. tags = ["automanaged"],
  318. visibility = ["//visibility:public"],
  319. )