| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 1 | go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") |
| Tim Windelschmidt | 515f1f3 | 2025-02-24 18:51:31 +0100 | [diff] [blame] | 2 | go_sdk.download(version = "1.24.0") |
| Tim Windelschmidt | a068440 | 2025-02-25 11:32:40 +0100 | [diff] [blame] | 3 | go_sdk.nogo( |
| 4 | includes = ["all"], |
| 5 | nogo = "//build/analysis:nogo", |
| 6 | ) |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 7 | |
| Tim Windelschmidt | ed9a583 | 2025-02-04 03:02:45 +0100 | [diff] [blame] | 8 | go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 9 | go_deps.from_file(go_mod = "//:go.mod") |
| 10 | |
| 11 | # All *direct* Go dependencies of the module have to be listed explicitly. |
| 12 | # This list can be automatically updated by running "bazel mod tidy". |
| 13 | use_repo( |
| 14 | go_deps, |
| 15 | "co_honnef_go_tools", |
| 16 | "com_4d63_gocheckcompilerdirectives", |
| 17 | "com_github_adrg_xdg", |
| 18 | "com_github_cavaliergopher_cpio", |
| 19 | "com_github_cenkalti_backoff_v4", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 20 | "com_github_container_storage_interface_spec", |
| Lorenz Brun | 0ec0c53 | 2024-08-29 12:39:47 +0000 | [diff] [blame] | 21 | "com_github_containerd_containerd_v2", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 22 | "com_github_containernetworking_plugins", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 23 | "com_github_coreos_go_semver", |
| 24 | "com_github_corverroos_commentwrap", |
| 25 | "com_github_diskfs_go_diskfs", |
| Serge Bazanski | 0d9e125 | 2024-09-03 12:16:47 +0200 | [diff] [blame] | 26 | "com_github_gdamore_tcell_v2", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 27 | "com_github_go_delve_delve", |
| Tim Windelschmidt | 7c0bd0b | 2025-01-10 04:15:37 +0100 | [diff] [blame] | 28 | "com_github_golangci_gofmt", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 29 | "com_github_google_cel_go", |
| 30 | "com_github_google_certificate_transparency_go", |
| 31 | "com_github_google_go_cmp", |
| 32 | "com_github_google_go_tpm", |
| 33 | "com_github_google_go_tpm_tools", |
| 34 | "com_github_google_gopacket", |
| 35 | "com_github_google_nftables", |
| 36 | "com_github_google_uuid", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 37 | "com_github_insomniacslk_dhcp", |
| 38 | "com_github_joho_godotenv", |
| 39 | "com_github_kballard_go_shellquote", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 40 | "com_github_klauspost_compress", |
| Jan Schär | 17ad63f | 2025-02-27 14:43:56 +0100 | [diff] [blame] | 41 | "com_github_mattfenwick_cyclonus", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 42 | "com_github_mattn_go_shellwords", |
| 43 | "com_github_mdlayher_arp", |
| 44 | "com_github_mdlayher_ethernet", |
| 45 | "com_github_mdlayher_ethtool", |
| 46 | "com_github_mdlayher_genetlink", |
| 47 | "com_github_mdlayher_kobject", |
| Lorenz Brun | e08c160 | 2025-06-17 19:19:33 +0200 | [diff] [blame^] | 48 | "com_github_mdlayher_lldp", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 49 | "com_github_mdlayher_netlink", |
| 50 | "com_github_mdlayher_packet", |
| Jan Schär | 4a18022 | 2024-07-29 16:32:54 +0200 | [diff] [blame] | 51 | "com_github_miekg_dns", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 52 | "com_github_mitchellh_go_wordwrap", |
| 53 | "com_github_opencontainers_go_digest", |
| Jan Schär | b48174d | 2025-04-14 10:13:02 +0000 | [diff] [blame] | 54 | "com_github_opencontainers_image_spec", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 55 | "com_github_opencontainers_runc", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 56 | "com_github_pkg_errors", |
| 57 | "com_github_pkg_sftp", |
| 58 | "com_github_prometheus_client_golang", |
| 59 | "com_github_prometheus_node_exporter", |
| Serge Bazanski | 0d9e125 | 2024-09-03 12:16:47 +0200 | [diff] [blame] | 60 | "com_github_rivo_uniseg", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 61 | "com_github_rmohr_bazeldnf", |
| 62 | "com_github_sbezverk_nfproxy", |
| Tim Windelschmidt | 7a1b27d | 2024-02-22 23:54:58 +0100 | [diff] [blame] | 63 | "com_github_schollz_progressbar_v3", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 64 | "com_github_spf13_cobra", |
| 65 | "com_github_spf13_pflag", |
| 66 | "com_github_sqlc_dev_sqlc", |
| 67 | "com_github_stretchr_testify", |
| 68 | "com_github_vishvananda_netlink", |
| 69 | "com_github_yalue_native_endian", |
| 70 | "com_google_cloud_go_storage", |
| 71 | "com_zx2c4_golang_wireguard_wgctrl", |
| 72 | "dev_gvisor_gvisor", |
| 73 | "io_etcd_go_etcd_api_v3", |
| 74 | "io_etcd_go_etcd_client_pkg_v3", |
| 75 | "io_etcd_go_etcd_client_v3", |
| 76 | "io_etcd_go_etcd_server_v3", |
| 77 | "io_etcd_go_etcd_tests_v3", |
| 78 | "io_k8s_api", |
| 79 | "io_k8s_apimachinery", |
| 80 | "io_k8s_apiserver", |
| 81 | "io_k8s_cli_runtime", |
| 82 | "io_k8s_client_go", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 83 | "io_k8s_component_base", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 84 | "io_k8s_kubectl", |
| 85 | "io_k8s_kubelet", |
| 86 | "io_k8s_kubernetes", |
| 87 | "io_k8s_pod_security_admission", |
| Jan Schär | a48bd3c | 2024-07-29 17:22:18 +0200 | [diff] [blame] | 88 | "io_k8s_utils", |
| Lorenz Brun | 52700ae | 2025-01-28 15:07:08 +0100 | [diff] [blame] | 89 | "org_dolansoft_git_dolansoft_k8s_nft_npc", |
| Lorenz Brun | 227c5cb | 2025-01-09 21:39:55 +0100 | [diff] [blame] | 90 | "org_go4_netipx", |
| Tim Windelschmidt | 5178dd7 | 2024-12-04 04:38:45 +0100 | [diff] [blame] | 91 | "org_golang_google_api", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 92 | "org_golang_google_genproto_googleapis_api", |
| 93 | "org_golang_google_grpc", |
| 94 | "org_golang_google_protobuf", |
| 95 | "org_golang_x_crypto", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 96 | "org_golang_x_net", |
| 97 | "org_golang_x_sync", |
| 98 | "org_golang_x_sys", |
| Tim Windelschmidt | 7a1b27d | 2024-02-22 23:54:58 +0100 | [diff] [blame] | 99 | "org_golang_x_term", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 100 | "org_golang_x_text", |
| 101 | "org_golang_x_time", |
| 102 | "org_golang_x_tools", |
| 103 | "org_uber_go_multierr", |
| 104 | "org_uber_go_zap", |
| 105 | ) |
| 106 | |
| 107 | # Instead of defining a gazelle/module override for every dependency, we have a |
| 108 | # big dict containing all of them. |
| 109 | OVERRIDES = { |
| Lorenz Brun | 0ec0c53 | 2024-08-29 12:39:47 +0000 | [diff] [blame] | 110 | "github.com/containerd/containerd/v2": { |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 111 | "directives": [ |
| 112 | "gazelle:proto disable", |
| Tim Windelschmidt | 25e0d8f | 2024-12-02 23:46:24 +0100 | [diff] [blame] | 113 | "gazelle:build_tags no_aufs,no_btrfs,no_devmapper,no_zfs", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 114 | ], |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 115 | }, |
| 116 | "github.com/containerd/cgroups/v3": { |
| 117 | "directives": [ |
| 118 | "gazelle:proto disable", |
| 119 | ], |
| 120 | }, |
| 121 | "github.com/containerd/nri": { |
| 122 | "directives": [ |
| 123 | "gazelle:proto disable", |
| 124 | ], |
| 125 | }, |
| 126 | "github.com/gogo/protobuf": { |
| 127 | "directives": [ |
| 128 | "gazelle:proto disable", |
| 129 | ], |
| 130 | }, |
| 131 | "github.com/google/cel-go": { |
| 132 | "build_file_generation": "on", |
| 133 | "directives": [ |
| 134 | "gazelle:go_naming_convention go_default_library", |
| 135 | ], |
| 136 | }, |
| 137 | "github.com/google/go-tpm-tools": { |
| 138 | "directives": [ |
| 139 | "gazelle:proto file", |
| 140 | ], |
| 141 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 142 | "//third_party/com_github_google_go_tpm_tools:go-tpm-tools-fix-proto-paths.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 143 | ], |
| 144 | }, |
| 145 | "github.com/googleapis/gax-go/v2": { |
| 146 | "directives": [ |
| 147 | "gazelle:proto disable", |
| 148 | ], |
| 149 | }, |
| 150 | "github.com/Microsoft/hcsshim": { |
| 151 | "directives": [ |
| 152 | "gazelle:proto disable", |
| 153 | ], |
| 154 | }, |
| 155 | "github.com/opencontainers/runc": { |
| 156 | "directives": [ |
| 157 | "gazelle:build_tags seccomp", |
| Jan Schär | 7c38e78 | 2025-04-29 09:23:37 +0000 | [diff] [blame] | 158 | # Make @com_github_opencontainers_runc//:runc_lib visible |
| 159 | "gazelle:go_visibility //visibility:public", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 160 | ], |
| 161 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 162 | "//third_party/com_github_opencontainers_runc:runc-add-cdeps.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 163 | ], |
| 164 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 165 | "github.com/google/cadvisor": { |
| 166 | "directives": [ |
| 167 | "gazelle:proto disable_global", |
| 168 | ], |
| Lorenz Brun | 837cb8e | 2024-12-23 13:52:56 +0100 | [diff] [blame] | 169 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 170 | "//third_party/com_github_google_cadvisor:cadvisor-errdefs1.patch", |
| Lorenz Brun | 837cb8e | 2024-12-23 13:52:56 +0100 | [diff] [blame] | 171 | ], |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 172 | }, |
| 173 | "github.com/sqlc-dev/sqlc": { |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 174 | "directives": [ |
| 175 | "gazelle:proto disable", |
| Tim Windelschmidt | 25e0d8f | 2024-12-02 23:46:24 +0100 | [diff] [blame] | 176 | "gazelle:build_tags nowasm", |
| Jan Schär | 7c38e78 | 2025-04-29 09:23:37 +0000 | [diff] [blame] | 177 | # Make @com_github_sqlc_dev_sqlc//cmd/sqlc:sqlc_lib visible |
| 178 | "gazelle:go_visibility //visibility:public", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 179 | ], |
| 180 | }, |
| Tim Windelschmidt | d481749 | 2025-06-16 15:03:12 +0200 | [diff] [blame] | 181 | "github.com/bytecodealliance/wasmtime-go/v14": { |
| 182 | "directives": [ |
| 183 | "gazelle:go_naming_convention go_default_library", |
| 184 | ], |
| 185 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 186 | "github.com/containerd/ttrpc": { |
| 187 | "directives": [ |
| 188 | "gazelle:proto disable", |
| 189 | ], |
| 190 | }, |
| 191 | "go.etcd.io/etcd/api/v3": { |
| 192 | "directives": [ |
| 193 | "gazelle:proto disable", |
| 194 | ], |
| 195 | }, |
| 196 | "go.etcd.io/etcd/raft/v3": { |
| 197 | "directives": [ |
| 198 | "gazelle:proto disable", |
| 199 | ], |
| 200 | }, |
| 201 | "go.etcd.io/etcd/server/v3": { |
| 202 | "directives": [ |
| 203 | "gazelle:proto disable", |
| 204 | ], |
| 205 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 206 | "//third_party/com_go_etcd_io_etcd_server_v3:etcd-fix-embed-close.patch", |
| 207 | "//third_party/com_go_etcd_io_etcd_server_v3:etcd-fix-islearner-panic.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 208 | ], |
| 209 | }, |
| 210 | "github.com/grpc-ecosystem/grpc-gateway": { |
| 211 | # Force generation of new build files for this package, required due to changes in how gazelle handles @go_googleapis. |
| 212 | "build_file_generation": "on", |
| 213 | "directives": [ |
| 214 | "gazelle:exclude **/**_test.go", |
| 215 | "gazelle:exclude examples", |
| 216 | "gazelle:resolve go github.com/grpc-ecosystem/grpc-gateway/internal //internal", |
| 217 | "gazelle:resolve go github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options //protoc-gen-swagger/options", |
| 218 | "gazelle:proto disable_global", |
| 219 | ], |
| 220 | }, |
| 221 | "k8s.io/api": { |
| 222 | "directives": [ |
| 223 | "gazelle:proto disable", |
| 224 | ], |
| 225 | }, |
| Tim Windelschmidt | d481749 | 2025-06-16 15:03:12 +0200 | [diff] [blame] | 226 | "k8s.io/kms": { |
| 227 | "directives": [ |
| 228 | "gazelle:proto disable", |
| 229 | ], |
| 230 | }, |
| 231 | "k8s.io/externaljwt": { |
| 232 | "directives": [ |
| 233 | "gazelle:proto disable", |
| 234 | ], |
| 235 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 236 | "k8s.io/apiextensions-apiserver": { |
| 237 | "directives": [ |
| 238 | "gazelle:proto disable", |
| 239 | ], |
| 240 | }, |
| 241 | "k8s.io/apiserver": { |
| 242 | "directives": [ |
| 243 | "gazelle:proto disable", |
| 244 | ], |
| 245 | }, |
| Lorenz Brun | 95190ce | 2025-01-28 13:07:00 +0000 | [diff] [blame] | 246 | "k8s.io/client-go": { |
| Jan Schär | 36f3b6d | 2025-05-20 09:05:12 +0000 | [diff] [blame] | 247 | "patches": [ |
| 248 | "//third_party/com_k8s_io_client_go:version-stamp.patch", |
| 249 | ], |
| Lorenz Brun | 95190ce | 2025-01-28 13:07:00 +0000 | [diff] [blame] | 250 | "pre_patches": [ |
| Tim Windelschmidt | 71718ba | 2025-02-07 00:04:28 +0100 | [diff] [blame] | 251 | "//third_party/com_k8s_io_client_go:k8s-fix-websocket-custom-dialer.patch", |
| Lorenz Brun | 95190ce | 2025-01-28 13:07:00 +0000 | [diff] [blame] | 252 | ], |
| 253 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 254 | "k8s.io/cri-api": { |
| 255 | "directives": [ |
| 256 | "gazelle:proto disable", |
| 257 | ], |
| 258 | }, |
| 259 | "k8s.io/kube-aggregator": { |
| 260 | "directives": [ |
| 261 | "gazelle:proto disable", |
| 262 | ], |
| 263 | }, |
| 264 | "k8s.io/kubelet": { |
| 265 | "directives": [ |
| 266 | "gazelle:proto disable", |
| 267 | ], |
| 268 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 269 | "//third_party/com_k8s_io_kubelet:kubelet-fix-path.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 270 | ], |
| 271 | }, |
| 272 | "k8s.io/kubernetes": { |
| 273 | "directives": [ |
| 274 | "gazelle:proto disable", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 275 | ], |
| 276 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 277 | "//third_party/com_k8s_io_kubernetes:k8s-native-metrics.patch", |
| 278 | "//third_party/com_k8s_io_kubernetes:k8s-removed-block-device-pseudo-locks.patch", |
| 279 | "//third_party/com_k8s_io_kubernetes:k8s-add-pause-build-file.patch", |
| 280 | "//third_party/com_k8s_io_kubernetes:k8s-reserve-metropolis-ports-import.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 281 | ], |
| 282 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 283 | "//third_party/com_k8s_io_kubernetes:k8s-drop-legacy-log-path.patch", |
| 284 | "//third_party/com_k8s_io_kubernetes:k8s-reserve-metropolis-ports.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 285 | ], |
| 286 | }, |
| 287 | "k8s.io/metrics": { |
| 288 | "directives": [ |
| 289 | "gazelle:proto disable", |
| 290 | ], |
| 291 | }, |
| 292 | "google.golang.org/genproto/googleapis/api": { |
| 293 | "directives": [ |
| 294 | "gazelle:proto disable_global", |
| 295 | ], |
| 296 | }, |
| 297 | "google.golang.org/genproto/googleapis/rpc": { |
| 298 | "directives": [ |
| 299 | "gazelle:proto disable_global", |
| 300 | ], |
| 301 | }, |
| 302 | "google.golang.org/grpc": { |
| 303 | "directives": [ |
| 304 | "gazelle:proto disable", |
| 305 | ], |
| 306 | }, |
| Tim Windelschmidt | d481749 | 2025-06-16 15:03:12 +0200 | [diff] [blame] | 307 | "github.com/containers/ocicrypt": { |
| 308 | "directives": [ |
| 309 | "gazelle:proto disable", |
| 310 | ], |
| 311 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 312 | "github.com/pingcap/tidb/parser": { |
| 313 | "build_file_generation": "on", |
| 314 | }, |
| 315 | "golang.org/x/mod": { |
| 316 | "build_extra_args": [ |
| 317 | "-go_naming_convention=import_alias", |
| 318 | "-go_naming_convention_external=import_alias", |
| 319 | ], |
| 320 | }, |
| 321 | "golang.org/x/sync": { |
| 322 | "build_extra_args": [ |
| 323 | "-go_naming_convention=import_alias", |
| 324 | "-go_naming_convention_external=import_alias", |
| 325 | ], |
| 326 | }, |
| 327 | "github.com/containernetworking/cni": { |
| 328 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 329 | "//third_party/com_github_containernetworking_cni:cni-fix-cachepath.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 330 | ], |
| 331 | }, |
| Lorenz Brun | 0dca6c9 | 2025-01-28 15:04:13 +0100 | [diff] [blame] | 332 | "github.com/containernetworking/plugins": { |
| 333 | "patches": [ |
| Tim Windelschmidt | 71718ba | 2025-02-07 00:04:28 +0100 | [diff] [blame] | 334 | "//third_party/com_github_containernetworking_plugins:cniplugins-add-linkgroup.patch", |
| Lorenz Brun | 0dca6c9 | 2025-01-28 15:04:13 +0100 | [diff] [blame] | 335 | ], |
| 336 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 337 | "github.com/corverroos/commentwrap": { |
| 338 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 339 | "//third_party/com_github_corverroos_commentwrap:commentwrap-uri.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 340 | ], |
| 341 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 342 | "github.com/pganalyze/pg_query_go/v4": { |
| 343 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 344 | "//third_party/com_github_pganalyze_pg_query_go_v4:pganalyze-add-cdeps.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 345 | ], |
| 346 | }, |
| 347 | "github.com/sbezverk/nfproxy": { |
| 348 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 349 | "//third_party/com_github_sbezverk_nfproxy:nfproxy-adapt-to-k8s-1.28.patch", |
| 350 | "//third_party/com_github_sbezverk_nfproxy:nfproxy-adapt-to-nftables-0.2.patch", |
| Lorenz Brun | 11bf3d3 | 2025-01-07 17:49:27 +0100 | [diff] [blame] | 351 | ], |
| 352 | }, |
| 353 | "github.com/google/nftables": { |
| 354 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 355 | "//third_party/com_github_google_nftables:nftables-dynamic-exprs.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 356 | ], |
| 357 | }, |
| 358 | "k8s.io/kubectl": { |
| 359 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 360 | "//third_party/com_k8s_io_kubectl:kubectl-fix-embed.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 361 | ], |
| 362 | }, |
| Tim Windelschmidt | d481749 | 2025-06-16 15:03:12 +0200 | [diff] [blame] | 363 | "sigs.k8s.io/apiserver-network-proxy/konnectivity-client": { |
| 364 | "directives": [ |
| 365 | "gazelle:proto disable", |
| 366 | ], |
| 367 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 368 | "github.com/seccomp/libseccomp-golang": { |
| 369 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 370 | "//third_party/com_github_seccomp_libseccomp_golang:libseccomp.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 371 | ], |
| 372 | }, |
| 373 | "github.com/vishvananda/netlink": { |
| 374 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 375 | "//third_party/com_github_vishvananda_netlink:netlink-psample.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 376 | ], |
| 377 | }, |
| 378 | "gvisor.dev/gvisor": { |
| 379 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 380 | "//third_party/com_gvisor_dev_gvisor:gvisor-fix-syslog.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 381 | ], |
| 382 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 383 | "//third_party/com_gvisor_dev_gvisor:gvisor-containerd-compat.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 384 | ], |
| 385 | }, |
| 386 | "go.etcd.io/etcd/tests/v3": { |
| 387 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 388 | "//third_party/com_go_etcd_io_etcd_tests_v3:etcd-integration-logging.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 389 | ], |
| 390 | }, |
| Lorenz Brun | 5c52062 | 2025-01-14 14:14:52 +0100 | [diff] [blame] | 391 | "k8s.io/component-base": { |
| 392 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 393 | "//third_party/com_k8s_io_component_base:k8s-fix-metrics-data-race.patch", |
| Jan Schär | 36f3b6d | 2025-05-20 09:05:12 +0000 | [diff] [blame] | 394 | "//third_party/com_k8s_io_component_base:version-stamp.patch", |
| Lorenz Brun | 5c52062 | 2025-01-14 14:14:52 +0100 | [diff] [blame] | 395 | ], |
| 396 | }, |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 397 | "k8s.io/mount-utils": { |
| 398 | "pre_patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 399 | "//third_party/com_k8s_io_mount_utils:k8s-native-mounter.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 400 | ], |
| 401 | }, |
| 402 | "golang.org/x/tools": { |
| 403 | "patches": [ |
| Tim Windelschmidt | 7887f75 | 2025-02-04 03:06:56 +0100 | [diff] [blame] | 404 | "//third_party/com_golang_org_x_tools:goimports-group-merging.patch", |
| Tim Windelschmidt | e5e90a8 | 2024-07-17 23:46:22 +0200 | [diff] [blame] | 405 | ], |
| 406 | }, |
| 407 | } |
| 408 | |
| 409 | # MODULE.bazel doesn't support loops, but since we have lots of overrides, |
| 410 | # this is the more readable approach. |
| 411 | [ |
| 412 | [ |
| 413 | go_deps.gazelle_override( |
| 414 | build_extra_args = overrides.get("build_extra_args") or [], |
| 415 | build_file_generation = overrides.get("build_file_generation") or "auto", |
| 416 | directives = overrides.get("directives") or [], |
| 417 | path = path, |
| 418 | ), |
| 419 | go_deps.module_override( |
| 420 | patch_strip = 1, |
| 421 | patches = overrides.get("patches") or [], |
| 422 | path = path, |
| 423 | pre_patches = overrides.get("pre_patches") or [], |
| 424 | ), |
| 425 | ] |
| 426 | for path, overrides in OVERRIDES.items() |
| 427 | ] |