core/internal/kubernetes: refactor reconciler, move to subpackage
This makes the reconciler a bit more generic, and thus allows for
writing some basic tests (of the reconciler logic and of the declared
resources).
We also start the cleanup of //core/internal/kubernetes by moving the
reconciler into a separate subpackage. This creates two sketchy
cross-package references that we'll need to fix in the future once we
continue the cleanup and modularization of the Kubernetes package.
Test Plan: the reconciler is now tested with unit tests!
X-Origin-Diff: phab/D552
GitOrigin-RevId: b43643065c8174402922c62e80cd9c87fdce2f13
diff --git a/core/internal/kubernetes/BUILD.bazel b/core/internal/kubernetes/BUILD.bazel
index 36866e7..6778845 100644
--- a/core/internal/kubernetes/BUILD.bazel
+++ b/core/internal/kubernetes/BUILD.bazel
@@ -9,7 +9,6 @@
"csi.go",
"kubelet.go",
"provisioner.go",
- "reconcile.go",
"scheduler.go",
"service.go",
],
@@ -19,6 +18,7 @@
"//core/api/api:go_default_library",
"//core/internal/common/supervisor:go_default_library",
"//core/internal/consensus:go_default_library",
+ "//core/internal/kubernetes/reconciler:go_default_library",
"//core/internal/storage:go_default_library",
"//core/pkg/fileargs:go_default_library",
"//core/pkg/fsquota:go_default_library",
@@ -27,8 +27,6 @@
"@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
"@io_etcd_go_etcd//clientv3:go_default_library",
"@io_k8s_api//core/v1:go_default_library",
- "@io_k8s_api//policy/v1beta1:go_default_library",
- "@io_k8s_api//rbac/v1:go_default_library",
"@io_k8s_api//storage/v1:go_default_library",
"@io_k8s_apimachinery//pkg/api/errors:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",