From 86b255eb6ebd649129be907d3b28cc1aef723134 Mon Sep 17 00:00:00 2001 From: Haseeb Tariq Date: Fri, 24 Jul 2020 18:33:10 -0700 Subject: [PATCH 1/2] Move pkg/helm to internal/helm --- changelog/fragments/mv-pkg-helm.yaml | 15 +++++++++++++++ cmd/helm-operator/main.go | 8 ++++---- {pkg => internal}/helm/client/client.go | 0 {pkg => internal}/helm/client/doc.go | 0 {pkg => internal}/helm/controller/controller.go | 2 +- {pkg => internal}/helm/controller/doc.go | 0 {pkg => internal}/helm/controller/reconcile.go | 6 +++--- .../helm/controller/reconcile_test.go | 0 {pkg => internal}/helm/flags/flag.go | 0 {pkg => internal}/helm/internal/diff/diff.go | 0 {pkg => internal}/helm/release/doc.go | 0 {pkg => internal}/helm/release/manager.go | 2 +- {pkg => internal}/helm/release/manager_factory.go | 4 ++-- {pkg => internal}/helm/release/manager_test.go | 0 {pkg/helm/internal => internal/helm}/types/doc.go | 0 .../internal => internal/helm}/types/types.go | 0 .../helm}/types/types_test.go | 0 {pkg => internal}/helm/watches/watches.go | 0 {pkg => internal}/helm/watches/watches_test.go | 0 19 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 changelog/fragments/mv-pkg-helm.yaml rename {pkg => internal}/helm/client/client.go (100%) rename {pkg => internal}/helm/client/doc.go (100%) rename {pkg => internal}/helm/controller/controller.go (98%) rename {pkg => internal}/helm/controller/doc.go (100%) rename {pkg => internal}/helm/controller/reconcile.go (98%) rename {pkg => internal}/helm/controller/reconcile_test.go (100%) rename {pkg => internal}/helm/flags/flag.go (100%) rename {pkg => internal}/helm/internal/diff/diff.go (100%) rename {pkg => internal}/helm/release/doc.go (100%) rename {pkg => internal}/helm/release/manager.go (99%) rename {pkg => internal}/helm/release/manager_factory.go (98%) rename {pkg => internal}/helm/release/manager_test.go (100%) rename {pkg/helm/internal => internal/helm}/types/doc.go (100%) rename {pkg/helm/internal => internal/helm}/types/types.go (100%) rename {pkg/helm/internal => internal/helm}/types/types_test.go (100%) rename {pkg => internal}/helm/watches/watches.go (100%) rename {pkg => internal}/helm/watches/watches_test.go (100%) diff --git a/changelog/fragments/mv-pkg-helm.yaml b/changelog/fragments/mv-pkg-helm.yaml new file mode 100644 index 0000000000..23cec93a50 --- /dev/null +++ b/changelog/fragments/mv-pkg-helm.yaml @@ -0,0 +1,15 @@ +# entries is a list of entries to include in +# release notes and/or the migration guide +entries: + - description: > + Move pkg/helm to internal/helm + + kind: "removal" + + # Is this a breaking change? + breaking: yes + + migration: + header: Move pkg/helm to internal/helm + body: > + TBD diff --git a/cmd/helm-operator/main.go b/cmd/helm-operator/main.go index b3b2b0d793..a9ce4a8978 100644 --- a/cmd/helm-operator/main.go +++ b/cmd/helm-operator/main.go @@ -30,12 +30,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/manager/signals" + "github.com/operator-framework/operator-sdk/internal/helm/controller" + "github.com/operator-framework/operator-sdk/internal/helm/flags" + "github.com/operator-framework/operator-sdk/internal/helm/release" + "github.com/operator-framework/operator-sdk/internal/helm/watches" "github.com/operator-framework/operator-sdk/internal/log/zap" "github.com/operator-framework/operator-sdk/internal/util/k8sutil" - "github.com/operator-framework/operator-sdk/pkg/helm/controller" - "github.com/operator-framework/operator-sdk/pkg/helm/flags" - "github.com/operator-framework/operator-sdk/pkg/helm/release" - "github.com/operator-framework/operator-sdk/pkg/helm/watches" sdkVersion "github.com/operator-framework/operator-sdk/version" ) diff --git a/pkg/helm/client/client.go b/internal/helm/client/client.go similarity index 100% rename from pkg/helm/client/client.go rename to internal/helm/client/client.go diff --git a/pkg/helm/client/doc.go b/internal/helm/client/doc.go similarity index 100% rename from pkg/helm/client/doc.go rename to internal/helm/client/doc.go diff --git a/pkg/helm/controller/controller.go b/internal/helm/controller/controller.go similarity index 98% rename from pkg/helm/controller/controller.go rename to internal/helm/controller/controller.go index f28ae9a770..d991866d29 100644 --- a/pkg/helm/controller/controller.go +++ b/internal/helm/controller/controller.go @@ -35,8 +35,8 @@ import ( libhandler "github.com/operator-framework/operator-lib/handler" "github.com/operator-framework/operator-lib/predicate" + "github.com/operator-framework/operator-sdk/internal/helm/release" "github.com/operator-framework/operator-sdk/internal/util/k8sutil" - "github.com/operator-framework/operator-sdk/pkg/helm/release" ) var log = logf.Log.WithName("helm.controller") diff --git a/pkg/helm/controller/doc.go b/internal/helm/controller/doc.go similarity index 100% rename from pkg/helm/controller/doc.go rename to internal/helm/controller/doc.go diff --git a/pkg/helm/controller/reconcile.go b/internal/helm/controller/reconcile.go similarity index 98% rename from pkg/helm/controller/reconcile.go rename to internal/helm/controller/reconcile.go index 2d3811b5af..47e484f90e 100644 --- a/pkg/helm/controller/reconcile.go +++ b/internal/helm/controller/reconcile.go @@ -34,9 +34,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/operator-framework/operator-sdk/pkg/helm/internal/diff" - "github.com/operator-framework/operator-sdk/pkg/helm/internal/types" - "github.com/operator-framework/operator-sdk/pkg/helm/release" + "github.com/operator-framework/operator-sdk/internal/helm/internal/diff" + "github.com/operator-framework/operator-sdk/internal/helm/release" + "github.com/operator-framework/operator-sdk/internal/helm/types" ) // blank assignment to verify that HelmOperatorReconciler implements reconcile.Reconciler diff --git a/pkg/helm/controller/reconcile_test.go b/internal/helm/controller/reconcile_test.go similarity index 100% rename from pkg/helm/controller/reconcile_test.go rename to internal/helm/controller/reconcile_test.go diff --git a/pkg/helm/flags/flag.go b/internal/helm/flags/flag.go similarity index 100% rename from pkg/helm/flags/flag.go rename to internal/helm/flags/flag.go diff --git a/pkg/helm/internal/diff/diff.go b/internal/helm/internal/diff/diff.go similarity index 100% rename from pkg/helm/internal/diff/diff.go rename to internal/helm/internal/diff/diff.go diff --git a/pkg/helm/release/doc.go b/internal/helm/release/doc.go similarity index 100% rename from pkg/helm/release/doc.go rename to internal/helm/release/doc.go diff --git a/pkg/helm/release/manager.go b/internal/helm/release/manager.go similarity index 99% rename from pkg/helm/release/manager.go rename to internal/helm/release/manager.go index 1a30a88934..d947cf3e1f 100644 --- a/pkg/helm/release/manager.go +++ b/internal/helm/release/manager.go @@ -39,7 +39,7 @@ import ( "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/cli-runtime/pkg/resource" - "github.com/operator-framework/operator-sdk/pkg/helm/internal/types" + "github.com/operator-framework/operator-sdk/internal/helm/types" ) // Manager manages a Helm release. It can install, upgrade, reconcile, diff --git a/pkg/helm/release/manager_factory.go b/internal/helm/release/manager_factory.go similarity index 98% rename from pkg/helm/release/manager_factory.go rename to internal/helm/release/manager_factory.go index 152a36e46b..45d79ceb61 100644 --- a/pkg/helm/release/manager_factory.go +++ b/internal/helm/release/manager_factory.go @@ -28,8 +28,8 @@ import ( v1 "k8s.io/client-go/kubernetes/typed/core/v1" crmanager "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/operator-framework/operator-sdk/pkg/helm/client" - "github.com/operator-framework/operator-sdk/pkg/helm/internal/types" + "github.com/operator-framework/operator-sdk/internal/helm/client" + "github.com/operator-framework/operator-sdk/internal/helm/types" ) // ManagerFactory creates Managers that are specific to custom resources. It is diff --git a/pkg/helm/release/manager_test.go b/internal/helm/release/manager_test.go similarity index 100% rename from pkg/helm/release/manager_test.go rename to internal/helm/release/manager_test.go diff --git a/pkg/helm/internal/types/doc.go b/internal/helm/types/doc.go similarity index 100% rename from pkg/helm/internal/types/doc.go rename to internal/helm/types/doc.go diff --git a/pkg/helm/internal/types/types.go b/internal/helm/types/types.go similarity index 100% rename from pkg/helm/internal/types/types.go rename to internal/helm/types/types.go diff --git a/pkg/helm/internal/types/types_test.go b/internal/helm/types/types_test.go similarity index 100% rename from pkg/helm/internal/types/types_test.go rename to internal/helm/types/types_test.go diff --git a/pkg/helm/watches/watches.go b/internal/helm/watches/watches.go similarity index 100% rename from pkg/helm/watches/watches.go rename to internal/helm/watches/watches.go diff --git a/pkg/helm/watches/watches_test.go b/internal/helm/watches/watches_test.go similarity index 100% rename from pkg/helm/watches/watches_test.go rename to internal/helm/watches/watches_test.go From d124a987202ea14470e5963ac8fa4770aae44be6 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Mon, 27 Jul 2020 09:39:44 -0400 Subject: [PATCH 2/2] internal/helm: move types to internal/types --- internal/helm/controller/reconcile.go | 2 +- internal/helm/{ => internal}/types/doc.go | 0 internal/helm/{ => internal}/types/types.go | 0 internal/helm/{ => internal}/types/types_test.go | 0 internal/helm/release/manager.go | 2 +- internal/helm/release/manager_factory.go | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename internal/helm/{ => internal}/types/doc.go (100%) rename internal/helm/{ => internal}/types/types.go (100%) rename internal/helm/{ => internal}/types/types_test.go (100%) diff --git a/internal/helm/controller/reconcile.go b/internal/helm/controller/reconcile.go index 47e484f90e..407c6d6b18 100644 --- a/internal/helm/controller/reconcile.go +++ b/internal/helm/controller/reconcile.go @@ -35,8 +35,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/operator-framework/operator-sdk/internal/helm/internal/diff" + "github.com/operator-framework/operator-sdk/internal/helm/internal/types" "github.com/operator-framework/operator-sdk/internal/helm/release" - "github.com/operator-framework/operator-sdk/internal/helm/types" ) // blank assignment to verify that HelmOperatorReconciler implements reconcile.Reconciler diff --git a/internal/helm/types/doc.go b/internal/helm/internal/types/doc.go similarity index 100% rename from internal/helm/types/doc.go rename to internal/helm/internal/types/doc.go diff --git a/internal/helm/types/types.go b/internal/helm/internal/types/types.go similarity index 100% rename from internal/helm/types/types.go rename to internal/helm/internal/types/types.go diff --git a/internal/helm/types/types_test.go b/internal/helm/internal/types/types_test.go similarity index 100% rename from internal/helm/types/types_test.go rename to internal/helm/internal/types/types_test.go diff --git a/internal/helm/release/manager.go b/internal/helm/release/manager.go index d947cf3e1f..33ce5e5d1a 100644 --- a/internal/helm/release/manager.go +++ b/internal/helm/release/manager.go @@ -39,7 +39,7 @@ import ( "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/cli-runtime/pkg/resource" - "github.com/operator-framework/operator-sdk/internal/helm/types" + "github.com/operator-framework/operator-sdk/internal/helm/internal/types" ) // Manager manages a Helm release. It can install, upgrade, reconcile, diff --git a/internal/helm/release/manager_factory.go b/internal/helm/release/manager_factory.go index 45d79ceb61..406c5dbf47 100644 --- a/internal/helm/release/manager_factory.go +++ b/internal/helm/release/manager_factory.go @@ -29,7 +29,7 @@ import ( crmanager "sigs.k8s.io/controller-runtime/pkg/manager" "github.com/operator-framework/operator-sdk/internal/helm/client" - "github.com/operator-framework/operator-sdk/internal/helm/types" + "github.com/operator-framework/operator-sdk/internal/helm/internal/types" ) // ManagerFactory creates Managers that are specific to custom resources. It is