diff --git a/common/go.mod b/common/go.mod index a97cdb1b6..60a43770b 100644 --- a/common/go.mod +++ b/common/go.mod @@ -6,8 +6,10 @@ module github.com/d2iq-labs/capi-runtime-extensions/common go 1.21 require ( + github.com/go-logr/logr v1.2.4 github.com/onsi/gomega v1.27.10 github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.8.2 gomodules.xyz/jsonpatch/v2 v2.4.0 k8s.io/apiextensions-apiserver v0.28.1 k8s.io/apimachinery v0.28.1 @@ -30,7 +32,6 @@ require ( github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -52,11 +53,13 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/valyala/fastjson v1.6.4 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect diff --git a/common/go.sum b/common/go.sum index cde717d9b..0d8aef852 100644 --- a/common/go.sum +++ b/common/go.sum @@ -85,6 +85,8 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -275,6 +277,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/common/pkg/handlers/interfaces.go b/common/pkg/capi/clustertopology/handlers/interfaces.go similarity index 100% rename from common/pkg/handlers/interfaces.go rename to common/pkg/capi/clustertopology/handlers/interfaces.go diff --git a/common/pkg/handlers/lifecycle/interfaces.go b/common/pkg/capi/clustertopology/handlers/lifecycle/interfaces.go similarity index 100% rename from common/pkg/handlers/lifecycle/interfaces.go rename to common/pkg/capi/clustertopology/handlers/lifecycle/interfaces.go diff --git a/common/pkg/handlers/mutation/interfaces.go b/common/pkg/capi/clustertopology/handlers/mutation/interfaces.go similarity index 100% rename from common/pkg/handlers/mutation/interfaces.go rename to common/pkg/capi/clustertopology/handlers/mutation/interfaces.go diff --git a/pkg/capi/clustertopology/patches/generator.go b/common/pkg/capi/clustertopology/patches/generator.go similarity index 91% rename from pkg/capi/clustertopology/patches/generator.go rename to common/pkg/capi/clustertopology/patches/generator.go index a4a09d4f6..d1671a147 100644 --- a/pkg/capi/clustertopology/patches/generator.go +++ b/common/pkg/capi/clustertopology/patches/generator.go @@ -12,7 +12,7 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches/matchers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches/matchers" ) func Generate[T runtime.Object]( diff --git a/pkg/capi/clustertopology/patches/matchers/match.go b/common/pkg/capi/clustertopology/patches/matchers/match.go similarity index 100% rename from pkg/capi/clustertopology/patches/matchers/match.go rename to common/pkg/capi/clustertopology/patches/matchers/match.go diff --git a/pkg/capi/clustertopology/patches/matchers/match_test.go b/common/pkg/capi/clustertopology/patches/matchers/match_test.go similarity index 99% rename from pkg/capi/clustertopology/patches/matchers/match_test.go rename to common/pkg/capi/clustertopology/patches/matchers/match_test.go index edbb48d62..f58340918 100644 --- a/pkg/capi/clustertopology/patches/matchers/match_test.go +++ b/common/pkg/capi/clustertopology/patches/matchers/match_test.go @@ -13,7 +13,7 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches/matchers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches/matchers" ) func TestMatchesSelector(t *testing.T) { diff --git a/pkg/capi/clustertopology/patches/selectors/selectors.go b/common/pkg/capi/clustertopology/patches/selectors/selectors.go similarity index 100% rename from pkg/capi/clustertopology/patches/selectors/selectors.go rename to common/pkg/capi/clustertopology/patches/selectors/selectors.go diff --git a/pkg/capi/clustertopology/variables/variable.go b/common/pkg/capi/clustertopology/variables/variable.go similarity index 100% rename from pkg/capi/clustertopology/variables/variable.go rename to common/pkg/capi/clustertopology/variables/variable.go diff --git a/pkg/capi/clustertopology/variables/variables_test.go b/common/pkg/capi/clustertopology/variables/variables_test.go similarity index 94% rename from pkg/capi/clustertopology/variables/variables_test.go rename to common/pkg/capi/clustertopology/variables/variables_test.go index 073e06d69..655314e2a 100644 --- a/pkg/capi/clustertopology/variables/variables_test.go +++ b/common/pkg/capi/clustertopology/variables/variables_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/gomega" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/variables" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/variables" ) func TestGet(t *testing.T) { @@ -70,7 +70,7 @@ func TestGet_ValidNestedFieldAsStruct(t *testing.T) { })) } -func TestGet_ValidNestedFieldAsScalar(t *testing.T) { +func TestGet_ValidNestedFieldAsPrimitive(t *testing.T) { g := NewWithT(t) sampleValue := []byte(`{"foo": {"bar": "baz"}}`) diff --git a/pkg/k8s/annotations/annotations.go b/common/pkg/k8s/annotations/annotations.go similarity index 100% rename from pkg/k8s/annotations/annotations.go rename to common/pkg/k8s/annotations/annotations.go diff --git a/pkg/k8s/client/apply.go b/common/pkg/k8s/client/apply.go similarity index 100% rename from pkg/k8s/client/apply.go rename to common/pkg/k8s/client/apply.go diff --git a/pkg/k8s/parser/parser.go b/common/pkg/k8s/parser/parser.go similarity index 100% rename from pkg/k8s/parser/parser.go rename to common/pkg/k8s/parser/parser.go diff --git a/pkg/k8s/parser/parser_test.go b/common/pkg/k8s/parser/parser_test.go similarity index 81% rename from pkg/k8s/parser/parser_test.go rename to common/pkg/k8s/parser/parser_test.go index 93b9ae21c..d50c05eec 100644 --- a/pkg/k8s/parser/parser_test.go +++ b/common/pkg/k8s/parser/parser_test.go @@ -13,10 +13,10 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/k8s/parser" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/k8s/parser" ) -func dummyUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured { +func placeholderUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured { u := &unstructured.Unstructured{} u.SetAPIVersion(apiVersion) u.SetKind(kind) @@ -63,7 +63,7 @@ metadata: namespace: a name: b `}, - want: []client.Object{dummyUnstructured("some.api/v1", "Something", "a", "b")}, + want: []client.Object{placeholderUnstructured("some.api/v1", "Something", "a", "b")}, }, { name: "valid multiple k8s object YAML", inputs: []string{`apiVersion: some.api/v1 @@ -79,8 +79,8 @@ metadata: name: d `}, want: []client.Object{ - dummyUnstructured("some.api/v1", "Something", "a", "b"), - dummyUnstructured("another.api/v1", "SomethingElse", "c", "d"), + placeholderUnstructured("some.api/v1", "Something", "a", "b"), + placeholderUnstructured("another.api/v1", "SomethingElse", "c", "d"), }, }, { name: "valid multiple k8s object YAML including empty docs", @@ -99,8 +99,8 @@ metadata: --- `}, want: []client.Object{ - dummyUnstructured("some.api/v1", "Something", "a", "b"), - dummyUnstructured("another.api/v1", "SomethingElse", "c", "d"), + placeholderUnstructured("some.api/v1", "Something", "a", "b"), + placeholderUnstructured("another.api/v1", "SomethingElse", "c", "d"), }, }, { name: "valid multiple k8s object YAML across multiple inputs", @@ -129,10 +129,10 @@ metadata: name: h`, }, want: []client.Object{ - dummyUnstructured("some.api/v1", "Something", "a", "b"), - dummyUnstructured("another.api/v1", "SomethingElse", "c", "d"), - dummyUnstructured("some.api/v2", "Something2", "e", "f"), - dummyUnstructured("another.api/v2", "SomethingElse2", "g", "h"), + placeholderUnstructured("some.api/v1", "Something", "a", "b"), + placeholderUnstructured("another.api/v1", "SomethingElse", "c", "d"), + placeholderUnstructured("some.api/v2", "Something2", "e", "f"), + placeholderUnstructured("another.api/v2", "SomethingElse2", "g", "h"), }, }} diff --git a/common/pkg/server/server.go b/common/pkg/server/server.go index fad4378d2..2ec20c763 100644 --- a/common/pkg/server/server.go +++ b/common/pkg/server/server.go @@ -13,9 +13,9 @@ import ( "sigs.k8s.io/cluster-api/exp/runtime/server" ctrl "sigs.k8s.io/controller-runtime" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/lifecycle" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/lifecycle" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" ) type Server struct { diff --git a/common/pkg/testutils/capitest/patches.go b/common/pkg/testutils/capitest/patches.go index c00ec5eb7..57da4d1ec 100644 --- a/common/pkg/testutils/capitest/patches.go +++ b/common/pkg/testutils/capitest/patches.go @@ -21,7 +21,7 @@ import ( controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" ) type PatchTestDef struct { diff --git a/common/pkg/testutils/capitest/variables.go b/common/pkg/testutils/capitest/variables.go index 69b21f048..e19ed8c1a 100644 --- a/common/pkg/testutils/capitest/variables.go +++ b/common/pkg/testutils/capitest/variables.go @@ -15,7 +15,7 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/testutils/openapi" ) diff --git a/make/go.mk b/make/go.mk index 7cfc11eb9..0623f1c69 100644 --- a/make/go.mk +++ b/make/go.mk @@ -40,8 +40,8 @@ test: ## Runs go tests for all modules in repository ifneq ($(wildcard $(REPO_ROOT)/go.mod),) test: test.root endif -ifneq ($(words $(GO_SUBMODULES_NO_TOOLS)),0) -test: $(addprefix test.,$(GO_SUBMODULES_NO_TOOLS:/go.mod=)) +ifneq ($(words $(GO_SUBMODULES_NO_DOCS)),0) +test: $(addprefix test.,$(GO_SUBMODULES_NO_DOCS:/go.mod=)) endif .PHONY: test.% @@ -64,8 +64,8 @@ bench: ## Runs go benchmarks for all modules in repository ifneq ($(wildcard $(REPO_ROOT)/go.mod),) bench: bench.root endif -ifneq ($(words $(GO_SUBMODULES_NO_TOOLS)),0) -bench: $(addprefix bench.,$(GO_SUBMODULES_NO_TOOLS:/go.mod=)) +ifneq ($(words $(GO_SUBMODULES_NO_DOCS)),0) +bench: $(addprefix bench.,$(GO_SUBMODULES_NO_DOCS:/go.mod=)) endif .PHONY: bench.% @@ -164,8 +164,8 @@ go-fix: ## Runs go fix for all modules in repository ifneq ($(wildcard $(REPO_ROOT)/go.mod),) go-fix: go-fix.root endif -ifneq ($(words $(GO_SUBMODULES_NO_TOOLS)),0) -go-fix: $(addprefix go-fix.,$(GO_SUBMODULES_NO_TOOLS:/go.mod=)) +ifneq ($(words $(GO_SUBMODULES_NO_DOCS)),0) +go-fix: $(addprefix go-fix.,$(GO_SUBMODULES_NO_DOCS:/go.mod=)) endif .PHONY: go-fix.% diff --git a/make/tag.mk b/make/tag.mk index 4a7474e93..01a8c8143 100644 --- a/make/tag.mk +++ b/make/tag.mk @@ -7,7 +7,7 @@ ifndef NEW_GIT_TAG $(error Please specify git tag to create via NEW_GIT_TAG env var or make variable) endif $(foreach module,\ - $(dir $(GO_SUBMODULES_NO_TOOLS)),\ + $(dir $(GO_SUBMODULES_NO_DOCS)),\ git tag -s "$(module)$(NEW_GIT_TAG)" -a -m "$(module)$(NEW_GIT_TAG)";\ ) git tag -s "$(NEW_GIT_TAG)" -a -m "$(NEW_GIT_TAG)" diff --git a/pkg/handlers/auditpolicy/inject.go b/pkg/handlers/auditpolicy/inject.go index 1618d86c5..3a3099e77 100644 --- a/pkg/handlers/auditpolicy/inject.go +++ b/pkg/handlers/auditpolicy/inject.go @@ -17,10 +17,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches/selectors" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches/selectors" ) const ( diff --git a/pkg/handlers/cni/calico/handler.go b/pkg/handlers/cni/calico/handler.go index 269605f1c..4d5e3c518 100644 --- a/pkg/handlers/cni/calico/handler.go +++ b/pkg/handlers/cni/calico/handler.go @@ -23,11 +23,11 @@ import ( ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/lifecycle" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/lifecycle" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/k8s/client" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/k8s/parser" "github.com/d2iq-labs/capi-runtime-extensions/pkg/handlers/cni" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/k8s/client" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/k8s/parser" ) const ( diff --git a/pkg/handlers/extraapiservercertsans/inject.go b/pkg/handlers/extraapiservercertsans/inject.go index 84fba2548..3817a0a74 100644 --- a/pkg/handlers/extraapiservercertsans/inject.go +++ b/pkg/handlers/extraapiservercertsans/inject.go @@ -17,11 +17,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches/selectors" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/variables" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches/selectors" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/variables" ) const ( diff --git a/pkg/handlers/extraapiservercertsans/variables.go b/pkg/handlers/extraapiservercertsans/variables.go index c5cf8fe45..41ca5aaed 100644 --- a/pkg/handlers/extraapiservercertsans/variables.go +++ b/pkg/handlers/extraapiservercertsans/variables.go @@ -9,8 +9,8 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/openapi/patterns" ) diff --git a/pkg/handlers/httpproxy/inject.go b/pkg/handlers/httpproxy/inject.go index 5a85b3564..3946b508e 100644 --- a/pkg/handlers/httpproxy/inject.go +++ b/pkg/handlers/httpproxy/inject.go @@ -21,11 +21,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/patches/selectors" - "github.com/d2iq-labs/capi-runtime-extensions/pkg/capi/clustertopology/variables" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/patches/selectors" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/variables" ) const ( diff --git a/pkg/handlers/httpproxy/variables.go b/pkg/handlers/httpproxy/variables.go index f9acac74f..fdf7c46d6 100644 --- a/pkg/handlers/httpproxy/variables.go +++ b/pkg/handlers/httpproxy/variables.go @@ -9,8 +9,8 @@ import ( clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" runtimehooksv1 "sigs.k8s.io/cluster-api/exp/runtime/hooks/api/v1alpha1" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/mutation" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/mutation" ) var ( diff --git a/pkg/handlers/servicelbgc/handler.go b/pkg/handlers/servicelbgc/handler.go index c4dbc81db..68a2c1e91 100644 --- a/pkg/handlers/servicelbgc/handler.go +++ b/pkg/handlers/servicelbgc/handler.go @@ -13,8 +13,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers" - "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/handlers/lifecycle" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers" + "github.com/d2iq-labs/capi-runtime-extensions/common/pkg/capi/clustertopology/handlers/lifecycle" ) type ServiceLoadBalancerGC struct {