diff --git a/Dockerfile b/Dockerfile index 388cb4c..95d421d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ COPY go.sum go.sum RUN go mod download # Copy the go source -COPY main.go main.go -COPY apis/ apis/ -COPY controllers/ controllers/ +COPY cmd/ cmd/ +COPY api/ api/ +COPY internal/ internal/ COPY pkg/ pkg/ # Build @@ -23,7 +23,7 @@ COPY pkg/ pkg/ # was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO # the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore, # by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. -RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o kaoto main.go +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o kaoto cmd/main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 5725e1c..3fd9fdd 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ vet: ## Run go vet against code. .PHONY: test test: manifests generate fmt vet ## Run tests. - go test ./pkg/... ./controllers/... + go test ./pkg/... ./internal/... .PHONY: test/e2e test/e2e: manifests generate fmt vet ## Run e2e tests. @@ -126,11 +126,11 @@ test/e2e: manifests generate fmt vet ## Run e2e tests. .PHONY: build build: manifests generate fmt vet ## Build manager binary. - go build -ldflags="$(GOLDFLAGS)" -o bin/kaoto main.go + go build -ldflags="$(GOLDFLAGS)" -o bin/kaoto cmd/main.go .PHONY: run run: manifests generate fmt vet ## Run a controller from your host. - go run -ldflags="$(GOLDFLAGS)" main.go run --leader-election=false --zap-devel + go run -ldflags="$(GOLDFLAGS)" cmd/main.go run --leader-election=false --zap-devel .PHONY: run/local @@ -233,8 +233,8 @@ YQ ?= $(LOCALBIN)/yq ## Tool Versions KUSTOMIZE_VERSION ?= v5.3.0 -CONTROLLER_TOOLS_VERSION ?= v0.13.0 -CODEGEN_VERSION ?= v0.29.0 +CONTROLLER_TOOLS_VERSION ?= v0.14.0 +CODEGEN_VERSION ?= v0.29.1 GOLANG_LINT_VERSION ?= v1.55.2 OPERATOR_SDK_VERSION ?= v1.33.0 diff --git a/PROJECT b/PROJECT index 9e626b6..e3e241e 100644 --- a/PROJECT +++ b/PROJECT @@ -4,7 +4,7 @@ # More info: https://book.kubebuilder.io/reference/project-config.html domain: kaoto.io layout: -- go.kubebuilder.io/v3 +- go.kubebuilder.io/v4 multigroup: true plugins: manifests.sdk.operatorframework.io/v2: {} diff --git a/apis/designer/v1alpha1/groupversion_info.go b/api/designer/v1alpha1/groupversion_info.go similarity index 100% rename from apis/designer/v1alpha1/groupversion_info.go rename to api/designer/v1alpha1/groupversion_info.go diff --git a/apis/designer/v1alpha1/kaoto_types.go b/api/designer/v1alpha1/kaoto_types.go similarity index 100% rename from apis/designer/v1alpha1/kaoto_types.go rename to api/designer/v1alpha1/kaoto_types.go diff --git a/apis/designer/v1alpha1/zz_generated.deepcopy.go b/api/designer/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from apis/designer/v1alpha1/zz_generated.deepcopy.go rename to api/designer/v1alpha1/zz_generated.deepcopy.go diff --git a/bundle.Dockerfile b/bundle.Dockerfile index e00f0bb..d44c713 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,9 +6,9 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=kaoto-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.30.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 +LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 # Labels for testing. LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 diff --git a/main.go b/cmd/main.go similarity index 100% rename from main.go rename to cmd/main.go diff --git a/config/crd/bases/designer.kaoto.io_kaotoes.yaml b/config/crd/bases/designer.kaoto.io_kaotoes.yaml index 4b2e2f5..b573891 100644 --- a/config/crd/bases/designer.kaoto.io_kaotoes.yaml +++ b/config/crd/bases/designer.kaoto.io_kaotoes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: kaotoes.designer.kaoto.io spec: group: designer.kaoto.io @@ -34,14 +34,19 @@ spec: description: Kaoto is the Schema for the kaotoes API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object @@ -64,42 +69,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -113,11 +118,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index fb2d6ef..cad45de 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -9,4 +9,4 @@ kind: Kustomization images: - name: controller newName: quay.io/kaotoio/kaoto-operator - newTag: 0.0.9 + newTag: latest diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 9aa1dd4..5a1dd57 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -2,7 +2,6 @@ # used to generate the 'manifests/' directory in a bundle. resources: - bases/kaoto-operator.clusterserviceversion.yaml -- ../rbac/backend - ../default - ../samples - ../scorecard diff --git a/hack/scripts/gen_client.sh b/hack/scripts/gen_client.sh index 23be13d..28d3061 100755 --- a/hack/scripts/gen_client.sh +++ b/hack/scripts/gen_client.sh @@ -13,7 +13,7 @@ mkdir -p "${PROJECT_ROOT}/pkg/client/kaoto" "${PROJECT_ROOT}"/bin/applyconfiguration-gen \ --go-header-file="${PROJECT_ROOT}/hack/boilerplate.go.txt" \ --output-base="${TMP_DIR}/client" \ - --input-dirs=github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1 \ + --input-dirs=github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1 \ --output-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/applyconfiguration "${PROJECT_ROOT}"/bin/client-gen \ @@ -22,7 +22,7 @@ mkdir -p "${PROJECT_ROOT}/pkg/client/kaoto" --plural-exceptions="Kaoto:Kaotoes" \ --input=designer/v1alpha1 \ --clientset-name "versioned" \ - --input-base=github.com/kaotoIO/kaoto-operator/apis \ + --input-base=github.com/kaotoIO/kaoto-operator/api \ --apply-configuration-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/applyconfiguration \ --output-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset @@ -30,14 +30,14 @@ mkdir -p "${PROJECT_ROOT}/pkg/client/kaoto" --go-header-file="${PROJECT_ROOT}/hack/boilerplate.go.txt" \ --output-base="${TMP_DIR}/client" \ --plural-exceptions="Kaoto:Kaotoes" \ - --input-dirs=github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1 \ + --input-dirs=github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1 \ --output-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/listers "${PROJECT_ROOT}"/bin/informer-gen \ --go-header-file="${PROJECT_ROOT}/hack/boilerplate.go.txt" \ --output-base="${TMP_DIR}/client" \ --plural-exceptions="Kaoto:Kaotoes" \ - --input-dirs=github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1 \ + --input-dirs=github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1 \ --versioned-clientset-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned \ --listers-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/listers \ --output-package=github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/informers diff --git a/controllers/designer/kaoto_controller.go b/internal/controller/designer/kaoto_controller.go similarity index 98% rename from controllers/designer/kaoto_controller.go rename to internal/controller/designer/kaoto_controller.go index e587852..9a76f16 100644 --- a/controllers/designer/kaoto_controller.go +++ b/internal/controller/designer/kaoto_controller.go @@ -37,7 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" - kaotoApi "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + kaotoApi "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" "github.com/kaotoIO/kaoto-operator/pkg/defaults" k8serrors "k8s.io/apimachinery/pkg/api/errors" ) diff --git a/controllers/designer/kaoto_controller_action_deploy.go b/internal/controller/designer/kaoto_controller_action_deploy.go similarity index 100% rename from controllers/designer/kaoto_controller_action_deploy.go rename to internal/controller/designer/kaoto_controller_action_deploy.go diff --git a/controllers/designer/kaoto_controller_action_expose_ingress.go b/internal/controller/designer/kaoto_controller_action_expose_ingress.go similarity index 100% rename from controllers/designer/kaoto_controller_action_expose_ingress.go rename to internal/controller/designer/kaoto_controller_action_expose_ingress.go diff --git a/controllers/designer/kaoto_controller_action_expose_route.go b/internal/controller/designer/kaoto_controller_action_expose_route.go similarity index 100% rename from controllers/designer/kaoto_controller_action_expose_route.go rename to internal/controller/designer/kaoto_controller_action_expose_route.go diff --git a/controllers/designer/kaoto_controller_action_expose_service.go b/internal/controller/designer/kaoto_controller_action_expose_service.go similarity index 100% rename from controllers/designer/kaoto_controller_action_expose_service.go rename to internal/controller/designer/kaoto_controller_action_expose_service.go diff --git a/controllers/designer/kaoto_controller_support.go b/internal/controller/designer/kaoto_controller_support.go similarity index 100% rename from controllers/designer/kaoto_controller_support.go rename to internal/controller/designer/kaoto_controller_support.go diff --git a/controllers/designer/types.go b/internal/controller/designer/types.go similarity index 95% rename from controllers/designer/types.go rename to internal/controller/designer/types.go index d198d09..ce3979a 100644 --- a/controllers/designer/types.go +++ b/internal/controller/designer/types.go @@ -12,7 +12,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" - kaotoiov1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + kaotoiov1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" ) type ClusterType string diff --git a/pkg/client/kaoto/applyconfiguration/utils.go b/pkg/client/kaoto/applyconfiguration/utils.go index 24719d9..e3b40df 100644 --- a/pkg/client/kaoto/applyconfiguration/utils.go +++ b/pkg/client/kaoto/applyconfiguration/utils.go @@ -18,7 +18,7 @@ limitations under the License. package applyconfiguration import ( - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" designerv1alpha1 "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/applyconfiguration/designer/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" ) diff --git a/pkg/client/kaoto/clientset/versioned/fake/register.go b/pkg/client/kaoto/clientset/versioned/fake/register.go index c36ab02..9a9569f 100644 --- a/pkg/client/kaoto/clientset/versioned/fake/register.go +++ b/pkg/client/kaoto/clientset/versioned/fake/register.go @@ -18,7 +18,7 @@ limitations under the License. package fake import ( - designerv1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + designerv1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/kaoto/clientset/versioned/scheme/register.go b/pkg/client/kaoto/clientset/versioned/scheme/register.go index 677fde2..592545d 100644 --- a/pkg/client/kaoto/clientset/versioned/scheme/register.go +++ b/pkg/client/kaoto/clientset/versioned/scheme/register.go @@ -18,7 +18,7 @@ limitations under the License. package scheme import ( - designerv1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + designerv1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/designer_client.go b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/designer_client.go index e54e53d..dcd39be 100644 --- a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/designer_client.go +++ b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/designer_client.go @@ -20,7 +20,7 @@ package v1alpha1 import ( "net/http" - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/fake/fake_kaoto.go b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/fake/fake_kaoto.go index 9ac9f1b..9ca7b9c 100644 --- a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/fake/fake_kaoto.go +++ b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/fake/fake_kaoto.go @@ -22,7 +22,7 @@ import ( json "encoding/json" "fmt" - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" designerv1alpha1 "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/applyconfiguration/designer/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/kaoto.go b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/kaoto.go index b4a9f57..c7ce18c 100644 --- a/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/kaoto.go +++ b/pkg/client/kaoto/clientset/versioned/typed/designer/v1alpha1/kaoto.go @@ -23,7 +23,7 @@ import ( "fmt" "time" - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" designerv1alpha1 "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/applyconfiguration/designer/v1alpha1" scheme "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/client/kaoto/informers/externalversions/designer/v1alpha1/kaoto.go b/pkg/client/kaoto/informers/externalversions/designer/v1alpha1/kaoto.go index 8216944..dc6d022 100644 --- a/pkg/client/kaoto/informers/externalversions/designer/v1alpha1/kaoto.go +++ b/pkg/client/kaoto/informers/externalversions/designer/v1alpha1/kaoto.go @@ -21,7 +21,7 @@ import ( "context" time "time" - designerv1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + designerv1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" versioned "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned" internalinterfaces "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/informers/externalversions/internalinterfaces" v1alpha1 "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/listers/designer/v1alpha1" diff --git a/pkg/client/kaoto/informers/externalversions/generic.go b/pkg/client/kaoto/informers/externalversions/generic.go index 9df66aa..5316b07 100644 --- a/pkg/client/kaoto/informers/externalversions/generic.go +++ b/pkg/client/kaoto/informers/externalversions/generic.go @@ -20,7 +20,7 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) diff --git a/pkg/client/kaoto/listers/designer/v1alpha1/kaoto.go b/pkg/client/kaoto/listers/designer/v1alpha1/kaoto.go index ec452e8..fdf934c 100644 --- a/pkg/client/kaoto/listers/designer/v1alpha1/kaoto.go +++ b/pkg/client/kaoto/listers/designer/v1alpha1/kaoto.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + v1alpha1 "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/cmd/run/run.go b/pkg/cmd/run/run.go index 57217b9..73c95ec 100644 --- a/pkg/cmd/run/run.go +++ b/pkg/cmd/run/run.go @@ -1,6 +1,7 @@ package run import ( + "github.com/kaotoIO/kaoto-operator/internal/controller/designer" "github.com/kaotoIO/kaoto-operator/pkg/controller" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -12,8 +13,7 @@ import ( rtclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" - designerApi "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" - designerCtl "github.com/kaotoIO/kaoto-operator/controllers/designer" + designerApi "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" routev1 "github.com/openshift/api/route/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -41,7 +41,7 @@ func NewRunCmd() *cobra.Command { Short: "run", RunE: func(cmd *cobra.Command, args []string) error { return controller.Start(options, func(manager manager.Manager, opts controller.Options) error { - selector, err := designerCtl.AppSelector() + selector, err := designer.AppSelector() if err != nil { return errors.Wrap(err, "unable to compute cache's watch selector") } @@ -55,7 +55,7 @@ func NewRunCmd() *cobra.Command { &corev1.ServiceAccount{}: {Label: selector}, } - rec, err := designerCtl.NewKaotoReconciler(manager) + rec, err := designer.NewKaotoReconciler(manager) if err != nil { return err } diff --git a/test/e2e/designer_deploy_test.go b/test/e2e/designer_deploy_test.go index a32b7cc..35577aa 100644 --- a/test/e2e/designer_deploy_test.go +++ b/test/e2e/designer_deploy_test.go @@ -9,7 +9,7 @@ import ( "github.com/rs/xid" - kaoto "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + kaoto "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" . "github.com/kaotoIO/kaoto-operator/test/support" diff --git a/test/support/client.go b/test/support/client.go index c985118..1a5af4a 100644 --- a/test/support/client.go +++ b/test/support/client.go @@ -7,14 +7,13 @@ import ( "github.com/kaotoIO/kaoto-operator/pkg/controller/client" + kaoto "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned" route "github.com/openshift/client-go/route/clientset/versioned" "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/util/homedir" - - kaoto "github.com/kaotoIO/kaoto-operator/pkg/client/kaoto/clientset/versioned" ) type Client struct { diff --git a/test/support/support_k8s.go b/test/support/support_k8s.go index 89535d9..da4a6fe 100644 --- a/test/support/support_k8s.go +++ b/test/support/support_k8s.go @@ -1,7 +1,7 @@ package support import ( - kaotoApi "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + kaotoApi "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/test/support/support_kaoto.go b/test/support/support_kaoto.go index 27dfd32..d592886 100644 --- a/test/support/support_kaoto.go +++ b/test/support/support_kaoto.go @@ -1,7 +1,7 @@ package support import ( - kaoto "github.com/kaotoIO/kaoto-operator/apis/designer/v1alpha1" + kaoto "github.com/kaotoIO/kaoto-operator/api/designer/v1alpha1" "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"