From 9098cb2e0a1ae535adbb9dcf955bdc3eeba9eb06 Mon Sep 17 00:00:00 2001 From: Rizwana777 Date: Tue, 30 Jul 2024 11:08:30 +0530 Subject: [PATCH 1/2] chore:update operator-sdk and kubebuilder Signed-off-by: Rizwana777 --- Dockerfile | 6 +++--- Makefile | 6 +++--- PROJECT | 2 +- README.md | 2 +- bundle.Dockerfile | 4 ++-- .../argo-rollouts-manager.clusterserviceversion.yaml | 6 +++--- bundle/metadata/annotations.yaml | 4 ++-- main.go => cmd/main.go | 2 +- docs/index.md | 2 +- hack/run-upstream-argo-rollouts-e2e-tests.sh | 2 +- hack/start-rollouts-manager-for-e2e-tests.sh | 4 ++-- hack/upgrade-rollouts-script/README.md | 2 +- hack/upgrade-rollouts-script/main.go | 2 +- .../controller}/argorollouts_controller.go | 0 .../controller}/argorollouts_controller_test.go | 0 {controllers => internal/controller}/configmap.go | 0 {controllers => internal/controller}/configmap_test.go | 0 {controllers => internal/controller}/default.go | 0 {controllers => internal/controller}/deployment.go | 0 {controllers => internal/controller}/deployment_test.go | 0 {controllers => internal/controller}/reconcile.go | 0 {controllers => internal/controller}/resources.go | 0 {controllers => internal/controller}/resources_test.go | 0 {controllers => internal/controller}/status.go | 0 {controllers => internal/controller}/status_test.go | 0 {controllers => internal/controller}/suite_test.go | 0 {controllers => internal/controller}/utils.go | 0 {controllers => internal/controller}/utils_test.go | 0 tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go | 2 +- .../e2e/namespace-scoped/namespace_scoped_rollouts_test.go | 2 +- tests/e2e/rollout_tests_all.go | 2 +- tests/e2e/test_utils.go | 2 +- 32 files changed, 26 insertions(+), 26 deletions(-) rename main.go => cmd/main.go (98%) rename {controllers => internal/controller}/argorollouts_controller.go (100%) rename {controllers => internal/controller}/argorollouts_controller_test.go (100%) rename {controllers => internal/controller}/configmap.go (100%) rename {controllers => internal/controller}/configmap_test.go (100%) rename {controllers => internal/controller}/default.go (100%) rename {controllers => internal/controller}/deployment.go (100%) rename {controllers => internal/controller}/deployment_test.go (100%) rename {controllers => internal/controller}/reconcile.go (100%) rename {controllers => internal/controller}/resources.go (100%) rename {controllers => internal/controller}/resources_test.go (100%) rename {controllers => internal/controller}/status.go (100%) rename {controllers => internal/controller}/status_test.go (100%) rename {controllers => internal/controller}/suite_test.go (100%) rename {controllers => internal/controller}/utils.go (100%) rename {controllers => internal/controller}/utils_test.go (100%) diff --git a/Dockerfile b/Dockerfile index 8f9cca1..ef4cfaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,16 +12,16 @@ COPY go.sum go.sum RUN go mod download # Copy the go source -COPY main.go main.go +COPY cmd/main.go cmd/main.go COPY api/ api/ -COPY controllers/ controllers/ +COPY internal/controller/ internal/controller/ # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command # 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 manager main.go +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager 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 eb7c3ed..c4e5cf3 100644 --- a/Makefile +++ b/Makefile @@ -155,11 +155,11 @@ start-test-e2e-all: start-e2e-namespace-scoped-bg test-e2e-namespace-scoped star .PHONY: build build: manifests generate fmt vet ## Build manager binary. - go build -o bin/manager main.go + go build -o bin/manager cmd/main.go .PHONY: run run: manifests generate fmt vet ## Run a controller from your host. - NAMESPACE_SCOPED_ARGO_ROLLOUTS=$(NAMESPACE_SCOPED_ARGO_ROLLOUTS) go run ./main.go + NAMESPACE_SCOPED_ARGO_ROLLOUTS=$(NAMESPACE_SCOPED_ARGO_ROLLOUTS) go run ./cmd/main.go # If you wish built the manager image targeting other platforms you can use the --platform flag. # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. @@ -227,7 +227,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 CONTROLLER_TOOLS_VERSION ?= v0.14.0 -OPERATOR_SDK_VERSION ?= v1.28.0 +OPERATOR_SDK_VERSION ?= v1.35.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/PROJECT b/PROJECT index feec6ab..4d6b833 100644 --- a/PROJECT +++ b/PROJECT @@ -3,7 +3,7 @@ # and allow the plugins properly work. # More info: https://book.kubebuilder.io/reference/project-config.html layout: -- go.kubebuilder.io/v3 +- go.kubebuilder.io/v4 plugins: manifests.sdk.operatorframework.io/v2: {} scorecard.sdk.operatorframework.io/v2: {} diff --git a/README.md b/README.md index b13875f..b65f62c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Not all planned features are completed. The API, spec, status and other user fac A Kubernetes operator for managing [Argo Rollouts](https://github.com/argoproj/argo-rollouts/). This operator provides an easy way to install, upgrade and manage the lifecycle of Argo Rollouts. -This operator is built using `operator-sdk`, version - `v1.28.0`. +This operator is built using `operator-sdk`, version - `v1.35.0`. ## Documentation diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 504e60e..eaf2dd5 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=argo-rollouts-manager LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.35.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/bundle/manifests/argo-rollouts-manager.clusterserviceversion.yaml b/bundle/manifests/argo-rollouts-manager.clusterserviceversion.yaml index e7e5d84..d57e811 100644 --- a/bundle/manifests/argo-rollouts-manager.clusterserviceversion.yaml +++ b/bundle/manifests/argo-rollouts-manager.clusterserviceversion.yaml @@ -21,9 +21,9 @@ metadata: } ] capabilities: Basic Install - createdAt: "2024-06-14T22:33:48Z" - operators.operatorframework.io/builder: operator-sdk-v1.28.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 + createdAt: "2024-07-29T13:09:50Z" + operators.operatorframework.io/builder: operator-sdk-v1.35.0 + operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 name: argo-rollouts-manager.v0.0.1 namespace: placeholder spec: diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index dac8b12..438b846 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,9 +5,9 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: argo-rollouts-manager operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.35.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 + operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4 # Annotations for testing. operators.operatorframework.io.test.mediatype.v1: scorecard+v1 diff --git a/main.go b/cmd/main.go similarity index 98% rename from main.go rename to cmd/main.go index 81329e1..a03fc5e 100644 --- a/main.go +++ b/cmd/main.go @@ -36,7 +36,7 @@ import ( rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" + controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" //+kubebuilder:scaffold:imports diff --git a/docs/index.md b/docs/index.md index 67ffc4d..795706a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ Not all planned features are completed. The API, spec, status and other user fac A Kubernetes operator for managing [Argo Rollouts](https://github.com/argoproj/argo-rollouts/). This operator provides an easy way to install, upgrade and manage the lifecycle of Argo Rollouts. -This operator is built using `operator-sdk`, version - `v1.28.0`. +This operator is built using ``, version - `v1.35.0`. ## What exactly the operator does ? diff --git a/hack/run-upstream-argo-rollouts-e2e-tests.sh b/hack/run-upstream-argo-rollouts-e2e-tests.sh index f724808..ae87efe 100755 --- a/hack/run-upstream-argo-rollouts-e2e-tests.sh +++ b/hack/run-upstream-argo-rollouts-e2e-tests.sh @@ -47,7 +47,7 @@ if [ -z "$SKIP_RUN_STEP" ]; then set +e rm -f /tmp/e2e-operator-run.log || true - go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log & + go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log & set -e fi diff --git a/hack/start-rollouts-manager-for-e2e-tests.sh b/hack/start-rollouts-manager-for-e2e-tests.sh index 5dcdd0f..8b2a89a 100755 --- a/hack/start-rollouts-manager-for-e2e-tests.sh +++ b/hack/start-rollouts-manager-for-e2e-tests.sh @@ -19,7 +19,7 @@ set -ex make install generate fmt vet if [ "$RUN_IN_BACKGROUND" == "true" ]; then - go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log & + go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log & else - go run ./main.go 2>&1 | tee /tmp/e2e-operator-run.log + go run ./cmd/main.go 2>&1 | tee /tmp/e2e-operator-run.log fi diff --git a/hack/upgrade-rollouts-script/README.md b/hack/upgrade-rollouts-script/README.md index 16cc5f5..2a11456 100644 --- a/hack/upgrade-rollouts-script/README.md +++ b/hack/upgrade-rollouts-script/README.md @@ -12,7 +12,7 @@ The Go code and script this in this directory will automatically open a pull req ### Prerequisites - GitHub CLI (_gh_) installed and on PATH - Go installed an on PATH -- [Operator-sdk v1.28.0](https://github.com/operator-framework/operator-sdk/releases/tag/v1.28.0) installed (as of January 2024), and on PATH +- [Operator-sdk v1.35.0](https://github.com/operator-framework/operator-sdk/releases/tag/v1.35.0) installed (as of January 2024), and on PATH - You must have your own fork of the [argo-rollouts-manager](https://github.com/argoproj-labs/argo-rollouts-manager) repository (example: `jgwest/argo-rollouts-manager`) - Your local SSH key registered (e.g. `~/.ssh/id_rsa.pub`) with GitHub to allow git clone via SSH diff --git a/hack/upgrade-rollouts-script/main.go b/hack/upgrade-rollouts-script/main.go index 051e553..7e86e4d 100644 --- a/hack/upgrade-rollouts-script/main.go +++ b/hack/upgrade-rollouts-script/main.go @@ -36,7 +36,7 @@ const ( argoprojlabsRepoOrg = "argoproj-labs" argoRolloutsManagerRepoName = "argo-rollouts-manager" - controllersDefaultGo = "controllers/default.go" + controllersDefaultGo = "internal/controller/default.go" ) func main() { diff --git a/controllers/argorollouts_controller.go b/internal/controller/argorollouts_controller.go similarity index 100% rename from controllers/argorollouts_controller.go rename to internal/controller/argorollouts_controller.go diff --git a/controllers/argorollouts_controller_test.go b/internal/controller/argorollouts_controller_test.go similarity index 100% rename from controllers/argorollouts_controller_test.go rename to internal/controller/argorollouts_controller_test.go diff --git a/controllers/configmap.go b/internal/controller/configmap.go similarity index 100% rename from controllers/configmap.go rename to internal/controller/configmap.go diff --git a/controllers/configmap_test.go b/internal/controller/configmap_test.go similarity index 100% rename from controllers/configmap_test.go rename to internal/controller/configmap_test.go diff --git a/controllers/default.go b/internal/controller/default.go similarity index 100% rename from controllers/default.go rename to internal/controller/default.go diff --git a/controllers/deployment.go b/internal/controller/deployment.go similarity index 100% rename from controllers/deployment.go rename to internal/controller/deployment.go diff --git a/controllers/deployment_test.go b/internal/controller/deployment_test.go similarity index 100% rename from controllers/deployment_test.go rename to internal/controller/deployment_test.go diff --git a/controllers/reconcile.go b/internal/controller/reconcile.go similarity index 100% rename from controllers/reconcile.go rename to internal/controller/reconcile.go diff --git a/controllers/resources.go b/internal/controller/resources.go similarity index 100% rename from controllers/resources.go rename to internal/controller/resources.go diff --git a/controllers/resources_test.go b/internal/controller/resources_test.go similarity index 100% rename from controllers/resources_test.go rename to internal/controller/resources_test.go diff --git a/controllers/status.go b/internal/controller/status.go similarity index 100% rename from controllers/status.go rename to internal/controller/status.go diff --git a/controllers/status_test.go b/internal/controller/status_test.go similarity index 100% rename from controllers/status_test.go rename to internal/controller/status_test.go diff --git a/controllers/suite_test.go b/internal/controller/suite_test.go similarity index 100% rename from controllers/suite_test.go rename to internal/controller/suite_test.go diff --git a/controllers/utils.go b/internal/controller/utils.go similarity index 100% rename from controllers/utils.go rename to internal/controller/utils.go diff --git a/controllers/utils_test.go b/internal/controller/utils_test.go similarity index 100% rename from controllers/utils_test.go rename to internal/controller/utils_test.go diff --git a/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go b/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go index 77f5624..d62c676 100644 --- a/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go +++ b/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go @@ -15,7 +15,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" + controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go b/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go index 4a90857..feb45b8 100644 --- a/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go +++ b/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go @@ -17,7 +17,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" + controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/tests/e2e/rollout_tests_all.go b/tests/e2e/rollout_tests_all.go index 8b985db..4cf7240 100644 --- a/tests/e2e/rollout_tests_all.go +++ b/tests/e2e/rollout_tests_all.go @@ -17,7 +17,7 @@ import ( rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" + controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/tests/e2e/test_utils.go b/tests/e2e/test_utils.go index 5e533f7..5d0c20a 100644 --- a/tests/e2e/test_utils.go +++ b/tests/e2e/test_utils.go @@ -16,7 +16,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" + controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" From 912c6c016bc06528b3f0d7e1bf8d95bbc1b0036c Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Mon, 5 Aug 2024 16:08:52 -0400 Subject: [PATCH 2/2] Move controllers back to controllers/ due to gitops-operator Signed-off-by: Jonathan West --- Dockerfile | 4 +- .../argoproj.io_rolloutmanagers.yaml | 59 +++++++++++++++++++ cmd/main.go | 2 +- .../argorollouts_controller.go | 0 .../argorollouts_controller_test.go | 0 .../controller => controllers}/configmap.go | 0 .../configmap_test.go | 0 .../controller => controllers}/default.go | 0 .../controller => controllers}/deployment.go | 0 .../deployment_test.go | 0 .../controller => controllers}/reconcile.go | 0 .../controller => controllers}/resources.go | 0 .../resources_test.go | 0 .../controller => controllers}/status.go | 0 .../controller => controllers}/status_test.go | 0 .../controller => controllers}/suite_test.go | 0 {internal/controller => controllers}/utils.go | 0 .../controller => controllers}/utils_test.go | 0 hack/upgrade-rollouts-script/main.go | 2 +- .../cluster_scoped_rollouts_test.go | 2 +- .../namespace_scoped_rollouts_test.go | 2 +- tests/e2e/rollout_tests_all.go | 2 +- tests/e2e/test_utils.go | 2 +- 23 files changed, 67 insertions(+), 8 deletions(-) rename {internal/controller => controllers}/argorollouts_controller.go (100%) rename {internal/controller => controllers}/argorollouts_controller_test.go (100%) rename {internal/controller => controllers}/configmap.go (100%) rename {internal/controller => controllers}/configmap_test.go (100%) rename {internal/controller => controllers}/default.go (100%) rename {internal/controller => controllers}/deployment.go (100%) rename {internal/controller => controllers}/deployment_test.go (100%) rename {internal/controller => controllers}/reconcile.go (100%) rename {internal/controller => controllers}/resources.go (100%) rename {internal/controller => controllers}/resources_test.go (100%) rename {internal/controller => controllers}/status.go (100%) rename {internal/controller => controllers}/status_test.go (100%) rename {internal/controller => controllers}/suite_test.go (100%) rename {internal/controller => controllers}/utils.go (100%) rename {internal/controller => controllers}/utils_test.go (100%) diff --git a/Dockerfile b/Dockerfile index ef4cfaf..1d67265 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.21 AS builder ARG TARGETOS ARG TARGETARCH @@ -14,7 +14,7 @@ RUN go mod download # Copy the go source COPY cmd/main.go cmd/main.go COPY api/ api/ -COPY internal/controller/ internal/controller/ +COPY controllers/ controllers/ # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command diff --git a/bundle/manifests/argoproj.io_rolloutmanagers.yaml b/bundle/manifests/argoproj.io_rolloutmanagers.yaml index 7f54fe9..d399754 100644 --- a/bundle/manifests/argoproj.io_rolloutmanagers.yaml +++ b/bundle/manifests/argoproj.io_rolloutmanagers.yaml @@ -53,6 +53,61 @@ spec: description: Labels to add to the resources during its creation. type: object type: object + controllerResources: + description: Resources requests/limits for Argo Rollout controller + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object env: description: Env lets you specify environment for Rollouts pods items: @@ -231,6 +286,10 @@ spec: type: object type: array type: object + skipNotificationSecretDeployment: + description: SkipNotificationSecretDeployment lets you specify if + the argo notification secret should be deployed + type: boolean version: description: Version defines Argo Rollouts controller tag (optional) type: string diff --git a/cmd/main.go b/cmd/main.go index a03fc5e..81329e1 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -36,7 +36,7 @@ import ( rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" + controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" //+kubebuilder:scaffold:imports diff --git a/internal/controller/argorollouts_controller.go b/controllers/argorollouts_controller.go similarity index 100% rename from internal/controller/argorollouts_controller.go rename to controllers/argorollouts_controller.go diff --git a/internal/controller/argorollouts_controller_test.go b/controllers/argorollouts_controller_test.go similarity index 100% rename from internal/controller/argorollouts_controller_test.go rename to controllers/argorollouts_controller_test.go diff --git a/internal/controller/configmap.go b/controllers/configmap.go similarity index 100% rename from internal/controller/configmap.go rename to controllers/configmap.go diff --git a/internal/controller/configmap_test.go b/controllers/configmap_test.go similarity index 100% rename from internal/controller/configmap_test.go rename to controllers/configmap_test.go diff --git a/internal/controller/default.go b/controllers/default.go similarity index 100% rename from internal/controller/default.go rename to controllers/default.go diff --git a/internal/controller/deployment.go b/controllers/deployment.go similarity index 100% rename from internal/controller/deployment.go rename to controllers/deployment.go diff --git a/internal/controller/deployment_test.go b/controllers/deployment_test.go similarity index 100% rename from internal/controller/deployment_test.go rename to controllers/deployment_test.go diff --git a/internal/controller/reconcile.go b/controllers/reconcile.go similarity index 100% rename from internal/controller/reconcile.go rename to controllers/reconcile.go diff --git a/internal/controller/resources.go b/controllers/resources.go similarity index 100% rename from internal/controller/resources.go rename to controllers/resources.go diff --git a/internal/controller/resources_test.go b/controllers/resources_test.go similarity index 100% rename from internal/controller/resources_test.go rename to controllers/resources_test.go diff --git a/internal/controller/status.go b/controllers/status.go similarity index 100% rename from internal/controller/status.go rename to controllers/status.go diff --git a/internal/controller/status_test.go b/controllers/status_test.go similarity index 100% rename from internal/controller/status_test.go rename to controllers/status_test.go diff --git a/internal/controller/suite_test.go b/controllers/suite_test.go similarity index 100% rename from internal/controller/suite_test.go rename to controllers/suite_test.go diff --git a/internal/controller/utils.go b/controllers/utils.go similarity index 100% rename from internal/controller/utils.go rename to controllers/utils.go diff --git a/internal/controller/utils_test.go b/controllers/utils_test.go similarity index 100% rename from internal/controller/utils_test.go rename to controllers/utils_test.go diff --git a/hack/upgrade-rollouts-script/main.go b/hack/upgrade-rollouts-script/main.go index 7e86e4d..051e553 100644 --- a/hack/upgrade-rollouts-script/main.go +++ b/hack/upgrade-rollouts-script/main.go @@ -36,7 +36,7 @@ const ( argoprojlabsRepoOrg = "argoproj-labs" argoRolloutsManagerRepoName = "argo-rollouts-manager" - controllersDefaultGo = "internal/controller/default.go" + controllersDefaultGo = "controllers/default.go" ) func main() { diff --git a/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go b/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go index d62c676..77f5624 100644 --- a/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go +++ b/tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go @@ -15,7 +15,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" + controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go b/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go index feb45b8..4a90857 100644 --- a/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go +++ b/tests/e2e/namespace-scoped/namespace_scoped_rollouts_test.go @@ -17,7 +17,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" + controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/tests/e2e/rollout_tests_all.go b/tests/e2e/rollout_tests_all.go index 4cf7240..8b985db 100644 --- a/tests/e2e/rollout_tests_all.go +++ b/tests/e2e/rollout_tests_all.go @@ -17,7 +17,7 @@ import ( rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" + controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/tests/e2e/test_utils.go b/tests/e2e/test_utils.go index 5d0c20a..5e533f7 100644 --- a/tests/e2e/test_utils.go +++ b/tests/e2e/test_utils.go @@ -16,7 +16,7 @@ import ( rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1" - controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller" + controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1"