load("@io_bazel_rules_go//go:def.bzl", "go_library") load("//hack/tools/controller-gen:controller-gen.bzl", "gen_crds") go_library( name = "test", srcs = ["test.go"], importpath = "edge-infra.dev/test", visibility = ["//visibility:public"], ) # create a filegroup to wrap the our test config file, which may or may not exist. # consumers that would use test/config.json irectly as a data dep should reference # this target instead. this target is added as automatically by # `just register-integration-test` filegroup( name = "config_json", # buildifier: disable=constant-glob srcs = glob(["config.json"]), visibility = ["//visibility:public"], ) # TODO: generate all CRDs once https://github.com/GoogleCloudPlatform/k8s-config-connector/issues/536 # is resolved gen_crds( name = "gen_gcp_crds_rman", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/resourcemanager/...", ) gen_crds( name = "gen_gcp_crds_serviceusage", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/serviceusage/...", ) gen_crds( name = "gen_gcp_crds_iam", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/iam/...", ) gen_crds( name = "gen_gcp_crds_storage", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/storage/...", ) gen_crds( name = "gen_gcp_crds_pubsub", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/pubsub/...", ) gen_crds( name = "gen_gcp_crds_compute", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/compute/...", ) gen_crds( name = "gen_gcp_crds_dns", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/dns/...", ) gen_crds( name = "gen_gcp_crds_logging", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/logging/...", ) gen_crds( name = "gen_gcp_crds_container", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/container/...", ) gen_crds( name = "gen_gcp_crds_bigquery", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/bigquery/...", ) gen_crds( name = "gen_gcp_crds_secretmanager", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/secretmanager/...", ) gen_crds( name = "gen_gcp_crds_artifactregistry", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/artifactregistry/...", ) gen_crds( name = "gen_gcp_crds_cloudsql", crd_out_path = "test/fixtures/crds/gcp", outpath_relative_to_repo_root = True, paths = "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/sql/...", ) # CertManager CRD YAMLs gen_crds( name = "gen_cert_manager_crds", crd_out_path = "test/fixtures/crds/cert-manager", outpath_relative_to_repo_root = True, paths = "github.com/jetstack/cert-manager/pkg/apis/...", ) # Edge CRD YAMLs gen_crds( name = "gen_edge_crds", crd_out_path = "test/fixtures/crds/edge", outpath_relative_to_repo_root = True, pkg = "pkg/edge/apis", ) gen_crds( name = "gen_pxe_crds", crd_out_path = "test/fixtures/crds/sds", outpath_relative_to_repo_root = True, pkg = "pkg/sds/ien/k8s/controllers/pxe/apis", ) gen_crds( name = "gen_dnsmasq_crds", crd_out_path = "test/fixtures/crds/sds", outpath_relative_to_repo_root = True, paths = "github.com/kvaps/dnsmasq-controller/api/...", ) gen_crds( name = "gen_l5d_ctrl_crds", crd_out_path = "test/fixtures/crds/edge", outpath_relative_to_repo_root = True, pkg = "pkg/edge/linkerd/k8s/apis", ) # FluxCD gen_crds( name = "gen_flux_source_controller_crds", crd_out_path = "test/fixtures/crds/fluxcd", outpath_relative_to_repo_root = True, paths = "github.com/fluxcd/source-controller/api/...", ) gen_crds( name = "gen_flux_helm_controller_crds", crd_out_path = "test/fixtures/crds/fluxcd", outpath_relative_to_repo_root = True, paths = "github.com/fluxcd/helm-controller/api/...", ) gen_crds( name = "gen_datasync_crds", crd_out_path = "test/fixtures/crds/datasync", outpath_relative_to_repo_root = True, pkg = "pkg/edge/datasync/apis", ) gen_crds( name = "gen_warehouse_crds", crd_out_path = "test/fixtures/crds/warehouse", outpath_relative_to_repo_root = True, pkg = "pkg/f8n/warehouse/k8s/apis", ) gen_crds( name = "gen_dsds_crds", crd_out_path = "test/fixtures/crds/edge", outpath_relative_to_repo_root = True, pkg = "pkg/sds/ien/k8s/apis/", ) gen_crds( name = "gen_display_crds", crd_out_path = "test/fixtures/crds/edge", outpath_relative_to_repo_root = True, pkg = "pkg/sds/display/k8s/apis", ) gen_crds( name = "gen_prometheus_operator_crds", crd_out_path = "test/fixtures/crds/prometheus-operator", outpath_relative_to_repo_root = True, paths = "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/...", ) gen_crds( name = "gen_vmctl_crds", crd_out_path = "test/fixtures/crds/edge", outpath_relative_to_repo_root = True, pkg = "pkg/sds/vms/k8s/controllers/vmctl/apis", ) gen_crds( name = "gen_external_secrets", crd_out_path = "test/fixtures/crds/external-secrets", outpath_relative_to_repo_root = True, paths = "github.com/external-secrets/external-secrets/apis/...", )