Repository: operator-framework/operator-sdk
Pull request #3560 (2020-07-27 13:28:49)

*: move pkg/ansible to internal/ansible
**Description of the change:**
Move `pkg/ansible` to `internal/ansible`

**Motivation for the change:**
There should be no exported APIs in Operator SDK 1.0.0

**Checklist**

If the pull request includes user-facing changes, extra documentation is required:
- [x] Add a new changelog fragment in `changelog/fragments` (see [`changelog/fragments/00-template.yaml`](https://github.com/operator-framework/operator-sdk/tree/master/changelog/fragments/00-template.yaml))
- [ ] Add or update relevant sections of the docs website in [`website/content/en/docs`](https://github.com/operator-framework/operator-sdk/tree/master/website/content/en/docs)



Patch:
diff --git a/.gitignore b/.gitignore
index e7bfc23a..34d24282 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,7 +101,7 @@ images/scorecard-test/scorecard-test
 images/scorecard-test-kuttl/scorecard-test-kuttl
 
 # Test artifacts
-pkg/ansible/runner/testdata/valid.yaml
+internal/ansible/runner/testdata/valid.yaml
 /bin
 internal/scorecard/examples/custom-scorecard-tests/go.sum
 
diff --git a/changelog/fragments/mv-ansible-internal.yaml b/changelog/fragments/mv-ansible-internal.yaml
new file mode 100644
index 00000000..5dddb705
--- /dev/null
+++ b/changelog/fragments/mv-ansible-internal.yaml
@@ -0,0 +1,11 @@
+entries:
+  - description: >
+      The ansible operator implementation in `pkg/ansible` was moved to
+      `internal/ansible`.
+
+    kind: change
+    breaking: true
+    migration:
+      header: Hybrid Go/Ansible operator use cases are not supported in 1.0.0
+      body: >
+        There is no migration path that enables continued use of the Ansible-based operator Go libraries
diff --git a/changelog/fragments/mv-pkg-helm.yaml b/changelog/fragments/mv-pkg-helm.yaml
new file mode 100644
index 00000000..23cec93a
--- /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/ansible-operator/main.go b/cmd/ansible-operator/main.go
index e1c656e4..1c462194 100644
--- a/cmd/ansible-operator/main.go
+++ b/cmd/ansible-operator/main.go
@@ -32,14 +32,14 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/manager"
 	"sigs.k8s.io/controller-runtime/pkg/manager/signals"
 
+	"github.com/operator-framework/operator-sdk/internal/ansible/controller"
+	"github.com/operator-framework/operator-sdk/internal/ansible/flags"
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy"
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/controllermap"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner"
+	"github.com/operator-framework/operator-sdk/internal/ansible/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/ansible/controller"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/flags"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/watches"
 	sdkVersion "github.com/operator-framework/operator-sdk/version"
 )
 
diff --git a/cmd/helm-operator/main.go b/cmd/helm-operator/main.go
index b3b2b0d7..a9ce4a89 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/ansible/OWNERS b/internal/ansible/OWNERS
similarity index 100%
rename from pkg/ansible/OWNERS
rename to internal/ansible/OWNERS
diff --git a/pkg/ansible/controller/controller.go b/internal/ansible/controller/controller.go
similarity index 94%
rename from pkg/ansible/controller/controller.go
rename to internal/ansible/controller/controller.go
index bee5e1e6..222a61d5 100644
--- a/pkg/ansible/controller/controller.go
+++ b/internal/ansible/controller/controller.go
@@ -32,9 +32,9 @@ import (
 	ctrlpredicate "sigs.k8s.io/controller-runtime/pkg/predicate"
 	"sigs.k8s.io/controller-runtime/pkg/source"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/events"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/predicate"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner"
+	"github.com/operator-framework/operator-sdk/internal/ansible/events"
+	"github.com/operator-framework/operator-sdk/internal/ansible/predicate"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner"
 )
 
 var log = logf.Log.WithName("ansible-controller")
diff --git a/pkg/ansible/controller/reconcile.go b/internal/ansible/controller/reconcile.go
similarity index 96%
rename from pkg/ansible/controller/reconcile.go
rename to internal/ansible/controller/reconcile.go
index 4fee7625..ee2d7fdf 100644
--- a/pkg/ansible/controller/reconcile.go
+++ b/internal/ansible/controller/reconcile.go
@@ -25,13 +25,6 @@ import (
 	"strings"
 	"time"
 
-	ansiblestatus "github.com/operator-framework/operator-sdk/pkg/ansible/controller/status"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/events"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/metrics"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/kubeconfig"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
-
 	v1 "k8s.io/api/core/v1"
 	apierrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -41,6 +34,13 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	logf "sigs.k8s.io/controller-runtime/pkg/log"
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
+
+	ansiblestatus "github.com/operator-framework/operator-sdk/internal/ansible/controller/status"
+	"github.com/operator-framework/operator-sdk/internal/ansible/events"
+	"github.com/operator-framework/operator-sdk/internal/ansible/metrics"
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/kubeconfig"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
 )
 
 const (
diff --git a/pkg/ansible/controller/status/types.go b/internal/ansible/controller/status/types.go
similarity index 98%
rename from pkg/ansible/controller/status/types.go
rename to internal/ansible/controller/status/types.go
index f4d88798..54f5dd49 100644
--- a/pkg/ansible/controller/status/types.go
+++ b/internal/ansible/controller/status/types.go
@@ -18,11 +18,11 @@ import (
 	"encoding/json"
 	"time"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
-
 	v1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	logf "sigs.k8s.io/controller-runtime/pkg/log"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
 )
 
 var log = logf.Log.WithName("controller.status")
diff --git a/pkg/ansible/controller/status/utils.go b/internal/ansible/controller/status/utils.go
similarity index 100%
rename from pkg/ansible/controller/status/utils.go
rename to internal/ansible/controller/status/utils.go
diff --git a/pkg/ansible/controller/status/utils_test.go b/internal/ansible/controller/status/utils_test.go
similarity index 100%
rename from pkg/ansible/controller/status/utils_test.go
rename to internal/ansible/controller/status/utils_test.go
diff --git a/pkg/ansible/events/log_events.go b/internal/ansible/events/log_events.go
similarity index 97%
rename from pkg/ansible/events/log_events.go
rename to internal/ansible/events/log_events.go
index 7790904e..acdfe35d 100644
--- a/pkg/ansible/events/log_events.go
+++ b/internal/ansible/events/log_events.go
@@ -18,10 +18,10 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
-
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	logf "sigs.k8s.io/controller-runtime/pkg/log"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
 )
 
 // LogLevel - Levelt for the logging to take place.
diff --git a/pkg/ansible/flags/flag.go b/internal/ansible/flags/flag.go
similarity index 100%
rename from pkg/ansible/flags/flag.go
rename to internal/ansible/flags/flag.go
diff --git a/pkg/ansible/metrics/metrics.go b/internal/ansible/metrics/metrics.go
similarity index 100%
rename from pkg/ansible/metrics/metrics.go
rename to internal/ansible/metrics/metrics.go
diff --git a/pkg/ansible/paramconv/paramconv.go b/internal/ansible/paramconv/paramconv.go
similarity index 100%
rename from pkg/ansible/paramconv/paramconv.go
rename to internal/ansible/paramconv/paramconv.go
diff --git a/pkg/ansible/paramconv/paramconv_test.go b/internal/ansible/paramconv/paramconv_test.go
similarity index 100%
rename from pkg/ansible/paramconv/paramconv_test.go
rename to internal/ansible/paramconv/paramconv_test.go
diff --git a/pkg/ansible/predicate/predicate.go b/internal/ansible/predicate/predicate.go
similarity index 100%
rename from pkg/ansible/predicate/predicate.go
rename to internal/ansible/predicate/predicate.go
diff --git a/pkg/ansible/proxy/cache_response.go b/internal/ansible/proxy/cache_response.go
similarity index 94%
rename from pkg/ansible/proxy/cache_response.go
rename to internal/ansible/proxy/cache_response.go
index 5c5b4284..ff0149be 100644
--- a/pkg/ansible/proxy/cache_response.go
+++ b/internal/ansible/proxy/cache_response.go
@@ -24,10 +24,6 @@ import (
 	"strings"
 
 	libhandler "github.com/operator-framework/operator-lib/handler"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/requestfactory"
-	k8sRequest "github.com/operator-framework/operator-sdk/pkg/ansible/proxy/requestfactory"
-
 	"k8s.io/apimachinery/pkg/api/meta"
 	metainternalscheme "k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -38,6 +34,9 @@ import (
 	"k8s.io/apimachinery/pkg/util/sets"
 	"sigs.k8s.io/controller-runtime/pkg/cache"
 	"sigs.k8s.io/controller-runtime/pkg/client"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/controllermap"
+	k8sRequest "github.com/operator-framework/operator-sdk/internal/ansible/proxy/requestfactory"
 )
 
 type marshaler interface {
@@ -150,7 +149,7 @@ func (c *cacheResponseHandler) ServeHTTP(w http.ResponseWriter, req *http.Reques
 }
 
 // skipCacheLookup - determine if we should skip the cache lookup
-func (c *cacheResponseHandler) skipCacheLookup(r *requestfactory.RequestInfo, gvk schema.GroupVersionKind,
+func (c *cacheResponseHandler) skipCacheLookup(r *k8sRequest.RequestInfo, gvk schema.GroupVersionKind,
 	req *http.Request) bool {
 
 	skip := matchesRegexp(req.URL.String(), c.skipPathRegexp)
@@ -241,7 +240,7 @@ func (c *cacheResponseHandler) recoverDependentWatches(req *http.Request, un *un
 	}
 }
 
-func (c *cacheResponseHandler) getListFromCache(r *requestfactory.RequestInfo, req *http.Request,
+func (c *cacheResponseHandler) getListFromCache(r *k8sRequest.RequestInfo, req *http.Request,
 	k schema.GroupVersionKind) (marshaler, error) {
 	k8sListOpts := &metav1.ListOptions{}
 	if err := metainternalscheme.ParameterCodec.DecodeParameters(req.URL.Query(), metav1.SchemeGroupVersion,
@@ -283,7 +282,7 @@ func (c *cacheResponseHandler) getListFromCache(r *requestfactory.RequestInfo, r
 	return &un, nil
 }
 
-func (c *cacheResponseHandler) getObjectFromCache(r *requestfactory.RequestInfo, req *http.Request,
+func (c *cacheResponseHandler) getObjectFromCache(r *k8sRequest.RequestInfo, req *http.Request,
 	k schema.GroupVersionKind) (marshaler, error) {
 	un := &unstructured.Unstructured{}
 	un.SetGroupVersionKind(k)
diff --git a/pkg/ansible/proxy/controllermap/controllermap.go b/internal/ansible/proxy/controllermap/controllermap.go
similarity index 100%
rename from pkg/ansible/proxy/controllermap/controllermap.go
rename to internal/ansible/proxy/controllermap/controllermap.go
diff --git a/pkg/ansible/proxy/inject_owner.go b/internal/ansible/proxy/inject_owner.go
similarity index 97%
rename from pkg/ansible/proxy/inject_owner.go
rename to internal/ansible/proxy/inject_owner.go
index dadf4b9d..867f9682 100644
--- a/pkg/ansible/proxy/inject_owner.go
+++ b/internal/ansible/proxy/inject_owner.go
@@ -23,15 +23,15 @@ import (
 	"net/http/httputil"
 
 	"github.com/operator-framework/operator-lib/handler"
-	"github.com/operator-framework/operator-sdk/internal/util/k8sutil"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap"
-	k8sRequest "github.com/operator-framework/operator-sdk/pkg/ansible/proxy/requestfactory"
-
 	"k8s.io/apimachinery/pkg/api/meta"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/apimachinery/pkg/util/sets"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/controllermap"
+	k8sRequest "github.com/operator-framework/operator-sdk/internal/ansible/proxy/requestfactory"
+	"github.com/operator-framework/operator-sdk/internal/util/k8sutil"
 )
 
 // injectOwnerReferenceHandler will handle proxied requests and inject the
diff --git a/pkg/ansible/proxy/kubeconfig/kubeconfig.go b/internal/ansible/proxy/kubeconfig/kubeconfig.go
similarity index 100%
rename from pkg/ansible/proxy/kubeconfig/kubeconfig.go
rename to internal/ansible/proxy/kubeconfig/kubeconfig.go
diff --git a/pkg/ansible/proxy/kubectl.go b/internal/ansible/proxy/kubectl.go
similarity index 100%
rename from pkg/ansible/proxy/kubectl.go
rename to internal/ansible/proxy/kubectl.go
diff --git a/pkg/ansible/proxy/proxy.go b/internal/ansible/proxy/proxy.go
similarity index 96%
rename from pkg/ansible/proxy/proxy.go
rename to internal/ansible/proxy/proxy.go
index a2493695..b04ba8e8 100644
--- a/pkg/ansible/proxy/proxy.go
+++ b/internal/ansible/proxy/proxy.go
@@ -14,9 +14,6 @@
 
 package proxy
 
-// This file contains this project's custom code, as opposed to kubectl.go
-// which contains code retrieved from the kubernetes project.
-
 import (
 	"bytes"
 	"encoding/base64"
@@ -31,9 +28,6 @@ import (
 
 	libhandler "github.com/operator-framework/operator-lib/handler"
 	"github.com/operator-framework/operator-lib/predicate"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/kubeconfig"
-	k8sRequest "github.com/operator-framework/operator-sdk/pkg/ansible/proxy/requestfactory"
 	"k8s.io/apimachinery/pkg/api/meta"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
@@ -43,6 +37,10 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/cache"
 	"sigs.k8s.io/controller-runtime/pkg/handler"
 	"sigs.k8s.io/controller-runtime/pkg/source"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/controllermap"
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/kubeconfig"
+	k8sRequest "github.com/operator-framework/operator-sdk/internal/ansible/proxy/requestfactory"
 )
 
 // This is the default timeout to wait for the cache to respond
diff --git a/pkg/ansible/proxy/requestfactory/requestinfo.go b/internal/ansible/proxy/requestfactory/requestinfo.go
similarity index 100%
rename from pkg/ansible/proxy/requestfactory/requestinfo.go
rename to internal/ansible/proxy/requestfactory/requestinfo.go
diff --git a/pkg/ansible/runner/eventapi/eventapi.go b/internal/ansible/runner/eventapi/eventapi.go
similarity index 100%
rename from pkg/ansible/runner/eventapi/eventapi.go
rename to internal/ansible/runner/eventapi/eventapi.go
diff --git a/pkg/ansible/runner/eventapi/types.go b/internal/ansible/runner/eventapi/types.go
similarity index 100%
rename from pkg/ansible/runner/eventapi/types.go
rename to internal/ansible/runner/eventapi/types.go
diff --git a/pkg/ansible/runner/fake/runner.go b/internal/ansible/runner/fake/runner.go
similarity index 94%
rename from pkg/ansible/runner/fake/runner.go
rename to internal/ansible/runner/fake/runner.go
index ad0260ec..d105076e 100644
--- a/pkg/ansible/runner/fake/runner.go
+++ b/internal/ansible/runner/fake/runner.go
@@ -18,9 +18,10 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
 )
 
 // Runner - implements the Runner interface for a GVK that's being watched.
diff --git a/pkg/ansible/runner/internal/inputdir/inputdir.go b/internal/ansible/runner/internal/inputdir/inputdir.go
similarity index 100%
rename from pkg/ansible/runner/internal/inputdir/inputdir.go
rename to internal/ansible/runner/internal/inputdir/inputdir.go
diff --git a/pkg/ansible/runner/runner.go b/internal/ansible/runner/runner.go
similarity index 96%
rename from pkg/ansible/runner/runner.go
rename to internal/ansible/runner/runner.go
index 31fcaf12..450b07fa 100644
--- a/pkg/ansible/runner/runner.go
+++ b/internal/ansible/runner/runner.go
@@ -24,15 +24,15 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/metrics"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/paramconv"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/internal/inputdir"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/watches"
-
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	logf "sigs.k8s.io/controller-runtime/pkg/log"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/metrics"
+	"github.com/operator-framework/operator-sdk/internal/ansible/paramconv"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/internal/inputdir"
+	"github.com/operator-framework/operator-sdk/internal/ansible/watches"
 )
 
 var log = logf.Log.WithName("runner")
diff --git a/pkg/ansible/runner/testdata/playbook.yml b/internal/ansible/runner/testdata/playbook.yml
similarity index 100%
rename from pkg/ansible/runner/testdata/playbook.yml
rename to internal/ansible/runner/testdata/playbook.yml
diff --git a/pkg/ansible/runner/testdata/roles/role/tasks.yaml b/internal/ansible/runner/testdata/roles/role/tasks.yaml
similarity index 100%
rename from pkg/ansible/runner/testdata/roles/role/tasks.yaml
rename to internal/ansible/runner/testdata/roles/role/tasks.yaml
diff --git a/pkg/ansible/watches/testdata/ansible_collections/nameSpace/collection/roles/someRole/empty_file b/internal/ansible/watches/testdata/ansible_collections/nameSpace/collection/roles/someRole/empty_file
similarity index 100%
rename from pkg/ansible/watches/testdata/ansible_collections/nameSpace/collection/roles/someRole/empty_file
rename to internal/ansible/watches/testdata/ansible_collections/nameSpace/collection/roles/someRole/empty_file
diff --git a/pkg/ansible/watches/testdata/duplicate_gvk.yaml b/internal/ansible/watches/testdata/duplicate_gvk.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/duplicate_gvk.yaml
rename to internal/ansible/watches/testdata/duplicate_gvk.yaml
diff --git a/pkg/ansible/watches/testdata/invalid.yaml b/internal/ansible/watches/testdata/invalid.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid.yaml
rename to internal/ansible/watches/testdata/invalid.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_collection.yaml b/internal/ansible/watches/testdata/invalid_collection.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_collection.yaml
rename to internal/ansible/watches/testdata/invalid_collection.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_duration.yaml b/internal/ansible/watches/testdata/invalid_duration.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_duration.yaml
rename to internal/ansible/watches/testdata/invalid_duration.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_finalizer_no_vars.yaml b/internal/ansible/watches/testdata/invalid_finalizer_no_vars.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_finalizer_no_vars.yaml
rename to internal/ansible/watches/testdata/invalid_finalizer_no_vars.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_finalizer_playbook_path.yaml b/internal/ansible/watches/testdata/invalid_finalizer_playbook_path.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_finalizer_playbook_path.yaml
rename to internal/ansible/watches/testdata/invalid_finalizer_playbook_path.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_finalizer_role_path.yaml b/internal/ansible/watches/testdata/invalid_finalizer_role_path.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_finalizer_role_path.yaml
rename to internal/ansible/watches/testdata/invalid_finalizer_role_path.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_finalizer_whithout_name.yaml b/internal/ansible/watches/testdata/invalid_finalizer_whithout_name.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_finalizer_whithout_name.yaml
rename to internal/ansible/watches/testdata/invalid_finalizer_whithout_name.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_playbook_path.yaml b/internal/ansible/watches/testdata/invalid_playbook_path.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_playbook_path.yaml
rename to internal/ansible/watches/testdata/invalid_playbook_path.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_role_path.yaml b/internal/ansible/watches/testdata/invalid_role_path.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_role_path.yaml
rename to internal/ansible/watches/testdata/invalid_role_path.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_status.yaml b/internal/ansible/watches/testdata/invalid_status.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_status.yaml
rename to internal/ansible/watches/testdata/invalid_status.yaml
diff --git a/pkg/ansible/watches/testdata/invalid_yaml_file.yaml b/internal/ansible/watches/testdata/invalid_yaml_file.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/invalid_yaml_file.yaml
rename to internal/ansible/watches/testdata/invalid_yaml_file.yaml
diff --git a/pkg/ansible/watches/testdata/playbook.yml b/internal/ansible/watches/testdata/playbook.yml
similarity index 100%
rename from pkg/ansible/watches/testdata/playbook.yml
rename to internal/ansible/watches/testdata/playbook.yml
diff --git a/pkg/ansible/watches/testdata/roles/role/tasks.yaml b/internal/ansible/watches/testdata/roles/role/tasks.yaml
similarity index 100%
rename from pkg/ansible/watches/testdata/roles/role/tasks.yaml
rename to internal/ansible/watches/testdata/roles/role/tasks.yaml
diff --git a/pkg/ansible/watches/testdata/valid.yaml.tmpl b/internal/ansible/watches/testdata/valid.yaml.tmpl
similarity index 100%
rename from pkg/ansible/watches/testdata/valid.yaml.tmpl
rename to internal/ansible/watches/testdata/valid.yaml.tmpl
diff --git a/pkg/ansible/watches/watches.go b/internal/ansible/watches/watches.go
similarity index 99%
rename from pkg/ansible/watches/watches.go
rename to internal/ansible/watches/watches.go
index f8db70f2..645a9033 100644
--- a/pkg/ansible/watches/watches.go
+++ b/internal/ansible/watches/watches.go
@@ -32,7 +32,7 @@ import (
 	logf "sigs.k8s.io/controller-runtime/pkg/log"
 	yaml "sigs.k8s.io/yaml"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/flags"
+	"github.com/operator-framework/operator-sdk/internal/ansible/flags"
 )
 
 var log = logf.Log.WithName("watches")
diff --git a/pkg/ansible/watches/watches_test.go b/internal/ansible/watches/watches_test.go
similarity index 100%
rename from pkg/ansible/watches/watches_test.go
rename to internal/ansible/watches/watches_test.go
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 f28ae9a7..d991866d 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 2d3811b5..407c6d6b 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/internal/types"
+	"github.com/operator-framework/operator-sdk/internal/helm/release"
 )
 
 // 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/internal/types/doc.go b/internal/helm/internal/types/doc.go
similarity index 100%
rename from pkg/helm/internal/types/doc.go
rename to internal/helm/internal/types/doc.go
diff --git a/pkg/helm/internal/types/types.go b/internal/helm/internal/types/types.go
similarity index 100%
rename from pkg/helm/internal/types/types.go
rename to internal/helm/internal/types/types.go
diff --git a/pkg/helm/internal/types/types_test.go b/internal/helm/internal/types/types_test.go
similarity index 100%
rename from pkg/helm/internal/types/types_test.go
rename to internal/helm/internal/types/types_test.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 1a30a889..33ce5e5d 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/internal/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 97%
rename from pkg/helm/release/manager_factory.go
rename to internal/helm/release/manager_factory.go
index 152a36e4..406c5dbf 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/internal/types"
 )
 
 // ManagerFactory creates Managers that are specific to custom resources. It is


Test patch:
diff --git a/hack/tests/e2e-ansible.sh b/hack/tests/e2e-ansible.sh
index e8bb70e3..05e5d957 100755
--- a/hack/tests/e2e-ansible.sh
+++ b/hack/tests/e2e-ansible.sh
@@ -7,7 +7,7 @@ source hack/lib/image_lib.sh
 source ./hack/lib/common.sh
 
 # ansible proxy test require a running cluster; run during e2e instead
-go test -count=1 ./pkg/ansible/proxy/...
+go test -count=1 ./internal/ansible/proxy/...
 
 DEST_IMAGE="quay.io/example/memcached-operator:v0.0.2"
 ROOTDIR="$(pwd)"
diff --git a/pkg/ansible/controller/reconcile_test.go b/internal/ansible/controller/reconcile_test.go
similarity index 97%
rename from pkg/ansible/controller/reconcile_test.go
rename to internal/ansible/controller/reconcile_test.go
index 85a28107..8a3ae999 100644
--- a/pkg/ansible/controller/reconcile_test.go
+++ b/internal/ansible/controller/reconcile_test.go
@@ -20,19 +20,19 @@ import (
 	"testing"
 	"time"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/controller"
-	ansiblestatus "github.com/operator-framework/operator-sdk/pkg/ansible/controller/status"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/events"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/eventapi"
-	"github.com/operator-framework/operator-sdk/pkg/ansible/runner/fake"
-
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/controller"
+	ansiblestatus "github.com/operator-framework/operator-sdk/internal/ansible/controller/status"
+	"github.com/operator-framework/operator-sdk/internal/ansible/events"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/eventapi"
+	"github.com/operator-framework/operator-sdk/internal/ansible/runner/fake"
 )
 
 func TestReconcile(t *testing.T) {
diff --git a/pkg/ansible/proxy/proxy_test.go b/internal/ansible/proxy/proxy_test.go
similarity index 97%
rename from pkg/ansible/proxy/proxy_test.go
rename to internal/ansible/proxy/proxy_test.go
index 85398d3b..0a677b94 100644
--- a/pkg/ansible/proxy/proxy_test.go
+++ b/internal/ansible/proxy/proxy_test.go
@@ -23,14 +23,14 @@ import (
 	"os"
 	"testing"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/proxy/controllermap"
-
 	kcorev1 "k8s.io/api/core/v1"
 	kmetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/client/config"
 	"sigs.k8s.io/controller-runtime/pkg/manager"
+
+	"github.com/operator-framework/operator-sdk/internal/ansible/proxy/controllermap"
 )
 
 func TestHandler(t *testing.T) {
diff --git a/pkg/ansible/runner/runner_test.go b/internal/ansible/runner/runner_test.go
similarity index 99%
rename from pkg/ansible/runner/runner_test.go
rename to internal/ansible/runner/runner_test.go
index 9be86231..0c369438 100644
--- a/pkg/ansible/runner/runner_test.go
+++ b/internal/ansible/runner/runner_test.go
@@ -24,7 +24,7 @@ import (
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 
-	"github.com/operator-framework/operator-sdk/pkg/ansible/watches"
+	"github.com/operator-framework/operator-sdk/internal/ansible/watches"
 )
 
 func checkCmdFunc(t *testing.T, cmdFunc cmdFuncType, playbook, role string, verbosity int) {