1load("@io_bazel_rules_go//go:def.bzl", "go_library")
2load("//hack/tools/controller-gen:controller-gen.bzl", "gen_crds")
3
4go_library(
5 name = "test",
6 srcs = ["test.go"],
7 importpath = "edge-infra.dev/test",
8 visibility = ["//visibility:public"],
9)
10
11# create a filegroup to wrap the our test config file, which may or may not exist.
12# consumers that would use test/config.json irectly as a data dep should reference
13# this target instead. this target is added as automatically by
14# `just register-integration-test`
15filegroup(
16 name = "config_json",
17 # buildifier: disable=constant-glob
18 srcs = glob(["config.json"]),
19 visibility = ["//visibility:public"],
20)
21
22# TODO: generate all CRDs once https://github.com/GoogleCloudPlatform/k8s-config-connector/issues/536
23# is resolved
24
25gen_crds(
26 name = "gen_gcp_crds_rman",
27 crd_out_path = "test/fixtures/crds/gcp",
28 outpath_relative_to_repo_root = True,
29 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/resourcemanager/...",
30)
31
32gen_crds(
33 name = "gen_gcp_crds_serviceusage",
34 crd_out_path = "test/fixtures/crds/gcp",
35 outpath_relative_to_repo_root = True,
36 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/serviceusage/...",
37)
38
39gen_crds(
40 name = "gen_gcp_crds_iam",
41 crd_out_path = "test/fixtures/crds/gcp",
42 outpath_relative_to_repo_root = True,
43 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/iam/...",
44)
45
46gen_crds(
47 name = "gen_gcp_crds_storage",
48 crd_out_path = "test/fixtures/crds/gcp",
49 outpath_relative_to_repo_root = True,
50 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/storage/...",
51)
52
53gen_crds(
54 name = "gen_gcp_crds_pubsub",
55 crd_out_path = "test/fixtures/crds/gcp",
56 outpath_relative_to_repo_root = True,
57 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/pubsub/...",
58)
59
60gen_crds(
61 name = "gen_gcp_crds_compute",
62 crd_out_path = "test/fixtures/crds/gcp",
63 outpath_relative_to_repo_root = True,
64 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/compute/...",
65)
66
67gen_crds(
68 name = "gen_gcp_crds_dns",
69 crd_out_path = "test/fixtures/crds/gcp",
70 outpath_relative_to_repo_root = True,
71 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/dns/...",
72)
73
74gen_crds(
75 name = "gen_gcp_crds_logging",
76 crd_out_path = "test/fixtures/crds/gcp",
77 outpath_relative_to_repo_root = True,
78 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/logging/...",
79)
80
81gen_crds(
82 name = "gen_gcp_crds_container",
83 crd_out_path = "test/fixtures/crds/gcp",
84 outpath_relative_to_repo_root = True,
85 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/container/...",
86)
87
88gen_crds(
89 name = "gen_gcp_crds_bigquery",
90 crd_out_path = "test/fixtures/crds/gcp",
91 outpath_relative_to_repo_root = True,
92 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/bigquery/...",
93)
94
95gen_crds(
96 name = "gen_gcp_crds_secretmanager",
97 crd_out_path = "test/fixtures/crds/gcp",
98 outpath_relative_to_repo_root = True,
99 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/secretmanager/...",
100)
101
102gen_crds(
103 name = "gen_gcp_crds_artifactregistry",
104 crd_out_path = "test/fixtures/crds/gcp",
105 outpath_relative_to_repo_root = True,
106 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/artifactregistry/...",
107)
108
109gen_crds(
110 name = "gen_gcp_crds_cloudsql",
111 crd_out_path = "test/fixtures/crds/gcp",
112 outpath_relative_to_repo_root = True,
113 paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/sql/...",
114)
115
116# CertManager CRD YAMLs
117gen_crds(
118 name = "gen_cert_manager_crds",
119 crd_out_path = "test/fixtures/crds/cert-manager",
120 outpath_relative_to_repo_root = True,
121 paths = "github.com/jetstack/cert-manager/pkg/apis/...",
122)
123
124# Edge CRD YAMLs
125gen_crds(
126 name = "gen_edge_crds",
127 crd_out_path = "test/fixtures/crds/edge",
128 outpath_relative_to_repo_root = True,
129 pkg = "pkg/edge/apis",
130)
131
132gen_crds(
133 name = "gen_pxe_crds",
134 crd_out_path = "test/fixtures/crds/sds",
135 outpath_relative_to_repo_root = True,
136 pkg = "pkg/sds/ien/k8s/controllers/pxe/apis",
137)
138
139gen_crds(
140 name = "gen_dnsmasq_crds",
141 crd_out_path = "test/fixtures/crds/sds",
142 outpath_relative_to_repo_root = True,
143 paths = "github.com/kvaps/dnsmasq-controller/api/...",
144)
145
146gen_crds(
147 name = "gen_l5d_ctrl_crds",
148 crd_out_path = "test/fixtures/crds/edge",
149 outpath_relative_to_repo_root = True,
150 pkg = "pkg/edge/linkerd/k8s/apis",
151)
152
153# FluxCD
154gen_crds(
155 name = "gen_flux_source_controller_crds",
156 crd_out_path = "test/fixtures/crds/fluxcd",
157 outpath_relative_to_repo_root = True,
158 paths = "github.com/fluxcd/source-controller/api/...",
159)
160
161gen_crds(
162 name = "gen_flux_helm_controller_crds",
163 crd_out_path = "test/fixtures/crds/fluxcd",
164 outpath_relative_to_repo_root = True,
165 paths = "github.com/fluxcd/helm-controller/api/...",
166)
167
168gen_crds(
169 name = "gen_datasync_crds",
170 crd_out_path = "test/fixtures/crds/datasync",
171 outpath_relative_to_repo_root = True,
172 pkg = "pkg/edge/datasync/apis",
173)
174
175gen_crds(
176 name = "gen_warehouse_crds",
177 crd_out_path = "test/fixtures/crds/warehouse",
178 outpath_relative_to_repo_root = True,
179 pkg = "pkg/f8n/warehouse/k8s/apis",
180)
181
182gen_crds(
183 name = "gen_dsds_crds",
184 crd_out_path = "test/fixtures/crds/edge",
185 outpath_relative_to_repo_root = True,
186 pkg = "pkg/sds/ien/k8s/apis/",
187)
188
189gen_crds(
190 name = "gen_display_crds",
191 crd_out_path = "test/fixtures/crds/edge",
192 outpath_relative_to_repo_root = True,
193 pkg = "pkg/sds/display/k8s/apis",
194)
195
196gen_crds(
197 name = "gen_prometheus_operator_crds",
198 crd_out_path = "test/fixtures/crds/prometheus-operator",
199 outpath_relative_to_repo_root = True,
200 paths = "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/...",
201)
202
203gen_crds(
204 name = "gen_vmctl_crds",
205 crd_out_path = "test/fixtures/crds/edge",
206 outpath_relative_to_repo_root = True,
207 pkg = "pkg/sds/vms/k8s/controllers/vmctl/apis",
208)
209
210gen_crds(
211 name = "gen_external_secrets",
212 crd_out_path = "test/fixtures/crds/external-secrets",
213 outpath_relative_to_repo_root = True,
214 paths = "github.com/external-secrets/external-secrets/apis/...",
215)
View as plain text