Repository: skupperproject/skupper
Pull request #1874 (2025-01-10 17:43:39)

Fixed the bootstrap script to accept a custom path when using the cli image


Patch:
diff --git a/cmd/bootstrap/bootstrap.sh b/cmd/bootstrap/bootstrap.sh
index 77a07833..ab0b0115 100755
--- a/cmd/bootstrap/bootstrap.sh
+++ b/cmd/bootstrap/bootstrap.sh
@@ -202,10 +202,11 @@ main() {
         file_container_endpoint=$(echo "${CONTAINER_ENDPOINT}" | sed -e "s#unix://##g")
         MOUNTS="${MOUNTS} -v '${file_container_endpoint}:/${CONTAINER_ENGINE}.sock:z'"
     fi
-    INPUT_PATH_ARG=""
+    INPUT_PATH_ARG="/input"
     if [ -n "${INPUT_PATH}" ]; then
         MOUNTS="${MOUNTS} -v '${INPUT_PATH}:/input:z'"
-        INPUT_PATH_ARG="/input"
+    else
+        MOUNTS="${MOUNTS} -v '${SKUPPER_OUTPUT_PATH}/namespaces/${NAMESPACE:-default}/input/resources:/input:z'"
     fi
     MOUNTS="${MOUNTS} -v '${SKUPPER_OUTPUT_PATH}:/output:z'"
     MOUNTS="${MOUNTS} -v '${BOOTSTRAP_OUT}:/bootstrap.out:z'"
diff --git a/cmd/controller/main.go b/cmd/controller/main.go
index 80c3d3d9..4d0134d3 100644
--- a/cmd/controller/main.go
+++ b/cmd/controller/main.go
@@ -4,7 +4,6 @@ import (
 	"flag"
 	"fmt"
 	"log"
-	"log/slog"
 	"os"
 	"os/signal"
 	"syscall"
@@ -13,18 +12,12 @@ import (
 
 	iflag "github.com/skupperproject/skupper/internal/flag"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
-	"github.com/skupperproject/skupper/pkg/kube/grants"
-	"github.com/skupperproject/skupper/pkg/kube/securedaccess"
+	"github.com/skupperproject/skupper/internal/kube/controller"
+	"github.com/skupperproject/skupper/internal/kube/grants"
+	"github.com/skupperproject/skupper/internal/kube/securedaccess"
 	"github.com/skupperproject/skupper/pkg/version"
 )
 
-var controllerLogLevel = new(slog.LevelVar) // defaults to Info
-
-func init() {
-	logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: controllerLogLevel}))
-	slog.SetDefault(logger)
-}
-
 func describe(i interface{}) {
 	fmt.Printf("(%v, %T)\n", i, i)
 	fmt.Println()
@@ -95,7 +88,7 @@ func main() {
 		log.Fatal("Error getting van client ", err.Error())
 	}
 
-	controller, err := NewController(cli, grantConfig, securedAccessConfig, watchNamespace, cli.Namespace)
+	controller, err := controller.NewController(cli, grantConfig, securedAccessConfig, watchNamespace, cli.Namespace)
 	if err != nil {
 		log.Fatal("Error getting new site controller ", err.Error())
 	}
diff --git a/cmd/kube-adaptor/main.go b/cmd/kube-adaptor/main.go
index e51d602d..7ba7b45e 100644
--- a/cmd/kube-adaptor/main.go
+++ b/cmd/kube-adaptor/main.go
@@ -15,7 +15,6 @@ import (
 	iflag "github.com/skupperproject/skupper/internal/flag"
 	"github.com/skupperproject/skupper/internal/kube/adaptor"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"github.com/skupperproject/skupper/pkg/version"
 )
 
@@ -79,7 +78,7 @@ func main() {
 	}
 
 	log.Println("Waiting for Skupper router to be ready")
-	_, err = kube.WaitForPodsSelectorStatus(cli.GetNamespace(), cli.Kube, "skupper.io/component=router", corev1.PodRunning, time.Second*180, time.Second*5)
+	_, err = internalclient.WaitForPodsSelectorStatus(cli.GetNamespace(), cli.Kube, "skupper.io/component=router", corev1.PodRunning, time.Second*180, time.Second*5)
 	if err != nil {
 		log.Fatal("Error waiting for router pods to be ready ", err.Error())
 	}
diff --git a/internal/cmd/skupper/system/nonkube/system_teardown.go b/internal/cmd/skupper/system/nonkube/system_teardown.go
index 7bf60a3b..6ccddbbc 100644
--- a/internal/cmd/skupper/system/nonkube/system_teardown.go
+++ b/internal/cmd/skupper/system/nonkube/system_teardown.go
@@ -2,13 +2,14 @@ package nonkube
 
 import (
 	"fmt"
+
 	"github.com/skupperproject/skupper/pkg/nonkube/bootstrap"
 	"github.com/spf13/cobra"
 )
 
 type CmdSystemTeardown struct {
 	CobraCmd  *cobra.Command
-	TearDown  func(namespace string, platform string) error
+	TearDown  func(namespace string) error
 	Namespace string
 	Platform  string
 }
@@ -44,7 +45,7 @@ func (cmd *CmdSystemTeardown) InputToOptions() {
 
 func (cmd *CmdSystemTeardown) Run() error {
 
-	err := cmd.TearDown(cmd.Namespace, cmd.Platform)
+	err := cmd.TearDown(cmd.Namespace)
 
 	if err != nil {
 		return fmt.Errorf("System teardown has failed: %s", err)
diff --git a/internal/kube/adaptor/collector.go b/internal/kube/adaptor/collector.go
index 4db586e3..268ca404 100644
--- a/internal/kube/adaptor/collector.go
+++ b/internal/kube/adaptor/collector.go
@@ -11,13 +11,15 @@ import (
 	"github.com/skupperproject/skupper/api/types"
 	"github.com/skupperproject/skupper/internal/config"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
-	"github.com/skupperproject/skupper/pkg/kube"
 	kubeflow "github.com/skupperproject/skupper/pkg/kube/flow"
 	"github.com/skupperproject/skupper/pkg/vanflow"
 	"github.com/skupperproject/skupper/pkg/vanflow/session"
 	"github.com/skupperproject/skupper/pkg/version"
+	corev1 "k8s.io/api/core/v1"
+	"k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	corev1informer "k8s.io/client-go/informers/core/v1"
+	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/tools/cache"
 	"k8s.io/client-go/tools/leaderelection"
 	"k8s.io/client-go/tools/leaderelection/resourcelock"
@@ -55,7 +57,7 @@ func siteCollector(ctx context.Context, cli *internalclient.KubeClient) {
 		UID:        current.ObjectMeta.UID,
 	}
 
-	existing, err := kube.NewConfigMap(types.NetworkStatusConfigMapName, &siteData, nil, nil, &owner, cli.Namespace, cli.Kube)
+	existing, err := newConfigMap(types.NetworkStatusConfigMapName, &siteData, nil, nil, &owner, cli.Namespace, cli.Kube)
 	if err != nil && existing == nil {
 		log.Fatal("Failed to create site status config map ", err.Error())
 	}
@@ -169,3 +171,48 @@ func deploymentName() string {
 	return deployment
 
 }
+
+func newConfigMap(name string, data *map[string]string, labels *map[string]string, annotations *map[string]string, owner *metav1.OwnerReference, namespace string, kubeclient kubernetes.Interface) (*corev1.ConfigMap, error) {
+	configMaps := kubeclient.CoreV1().ConfigMaps(namespace)
+	existing, err := configMaps.Get(context.TODO(), name, metav1.GetOptions{})
+	if err == nil {
+		//TODO:  already exists
+		return existing, nil
+	} else if errors.IsNotFound(err) {
+		cm := &corev1.ConfigMap{
+			TypeMeta: metav1.TypeMeta{
+				APIVersion: "v1",
+				Kind:       "ConfigMap",
+			},
+			ObjectMeta: metav1.ObjectMeta{
+				Name: name,
+			},
+		}
+
+		if data != nil {
+			cm.Data = *data
+		}
+		if labels != nil {
+			cm.ObjectMeta.Labels = *labels
+		}
+		if annotations != nil {
+			cm.ObjectMeta.Annotations = *annotations
+		}
+		if owner != nil {
+			cm.ObjectMeta.OwnerReferences = []metav1.OwnerReference{
+				*owner,
+			}
+		}
+
+		created, err := configMaps.Create(context.TODO(), cm, metav1.CreateOptions{})
+
+		if err != nil {
+			return nil, fmt.Errorf("Failed to create config map: %w", err)
+		} else {
+			return created, nil
+		}
+	} else {
+		cm := &corev1.ConfigMap{}
+		return cm, fmt.Errorf("Failed to check existing config maps: %w", err)
+	}
+}
diff --git a/internal/kube/adaptor/config_sync.go b/internal/kube/adaptor/config_sync.go
index f9917c05..75c4f7ae 100644
--- a/internal/kube/adaptor/config_sync.go
+++ b/internal/kube/adaptor/config_sync.go
@@ -8,7 +8,6 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"github.com/skupperproject/skupper/pkg/qdr"
 )
 
@@ -16,11 +15,11 @@ import (
 // secrets for services with TLS enabled, and secrets and connectors for links)
 type ConfigSync struct {
 	agentPool       *qdr.AgentPool
-	controller      *kube.Controller
+	controller      *internalclient.Controller
 	namespace       string
 	profileSyncer   *SslProfileSyncer
-	config          *kube.ConfigMapWatcher
-	secrets         *kube.SecretWatcher
+	config          *internalclient.ConfigMapWatcher
+	secrets         *internalclient.SecretWatcher
 	path            string
 	routerConfigMap string
 }
@@ -28,7 +27,7 @@ type ConfigSync struct {
 func NewConfigSync(cli internalclient.Clients, namespace string, path string, routerConfigMap string) *ConfigSync {
 	configSync := &ConfigSync{
 		agentPool:       qdr.NewAgentPool("amqp://localhost:5672", nil),
-		controller:      kube.NewController("config-sync", cli),
+		controller:      internalclient.NewController("config-sync", cli),
 		namespace:       namespace,
 		profileSyncer:   newSslProfileSyncer(path),
 		path:            path,
@@ -41,7 +40,7 @@ func (c *ConfigSync) Start(stopCh <-chan struct{}) error {
 	if err := mkdir(c.path); err != nil {
 		return err
 	}
-	c.config = c.controller.WatchConfigMaps(kube.ByName(c.routerConfigMap), c.namespace, c.configEvent)
+	c.config = c.controller.WatchConfigMaps(internalclient.ByName(c.routerConfigMap), c.namespace, c.configEvent)
 	c.secrets = c.controller.WatchAllSecrets(c.namespace, c.secretEvent)
 	c.controller.StartWatchers(stopCh)
 	log.Printf("CONFIG_SYNC: Waiting for informers to sync...")
diff --git a/pkg/kube/certificates/mgr.go b/internal/kube/certificates/mgr.go
similarity index 97%
rename from pkg/kube/certificates/mgr.go
rename to internal/kube/certificates/mgr.go
index 6ebbd3e5..9d95c4ea 100644
--- a/pkg/kube/certificates/mgr.go
+++ b/internal/kube/certificates/mgr.go
@@ -13,9 +13,9 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
 	"github.com/skupperproject/skupper/pkg/certs"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 type CertificateManager interface {
@@ -26,12 +26,12 @@ type CertificateManager interface {
 type CertificateManagerImpl struct {
 	definitions        map[string]*skupperv2alpha1.Certificate
 	secrets            map[string]*corev1.Secret
-	certificateWatcher *kube.CertificateWatcher
-	secretWatcher      *kube.SecretWatcher
-	controller         *kube.Controller
+	certificateWatcher *internalclient.CertificateWatcher
+	secretWatcher      *internalclient.SecretWatcher
+	controller         *internalclient.Controller
 }
 
-func NewCertificateManager(controller *kube.Controller) *CertificateManagerImpl {
+func NewCertificateManager(controller *internalclient.Controller) *CertificateManagerImpl {
 	return &CertificateManagerImpl{
 		definitions: map[string]*skupperv2alpha1.Certificate{},
 		secrets:     map[string]*corev1.Secret{},
diff --git a/pkg/kube/controller.go b/internal/kube/client/controller.go
similarity index 98%
rename from pkg/kube/controller.go
rename to internal/kube/client/controller.go
index 98b2df6d..c3a83c50 100644
--- a/pkg/kube/controller.go
+++ b/internal/kube/client/controller.go
@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
-package kube
+package client
 
 import (
 	"context"
@@ -45,7 +45,6 @@ import (
 	routev1interfaces "github.com/openshift/client-go/route/informers/externalversions/internalinterfaces"
 	routev1informer "github.com/openshift/client-go/route/informers/externalversions/route/v1"
 
-	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	"github.com/skupperproject/skupper/internal/kube/resource"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
 	skupperclient "github.com/skupperproject/skupper/pkg/generated/client/clientset/versioned"
@@ -94,7 +93,7 @@ type Controller struct {
 	watchers        []Watcher
 }
 
-func NewController(name string, clients internalclient.Clients) *Controller {
+func NewController(name string, clients Clients) *Controller {
 	return &Controller{
 		eventKey:        name + "Event",
 		errorKey:        name + "Error",
@@ -160,15 +159,6 @@ func (c *Controller) GetDeploymentForPod(podName string, namespace string) (*app
 	return c.GetKubeClient().AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metav1.GetOptions{})
 }
 
-func (c *Controller) NewWatchers(client kubernetes.Interface) Watchers {
-	return &Controller{
-		eventKey: c.eventKey,
-		errorKey: c.errorKey,
-		client:   client,
-		queue:    c.queue,
-	}
-}
-
 func (c *Controller) AddEvent(o interface{}) {
 	c.queue.Add(o)
 }
@@ -284,11 +274,6 @@ func (c *Controller) HaveWatchersSynced() []cache.InformerSynced {
 	return combined
 }
 
-type Watchers interface {
-	WatchConfigMaps(options internalinterfaces.TweakListOptionsFunc, namespace string, handler ConfigMapHandler) *ConfigMapWatcher
-	WatchSecrets(options internalinterfaces.TweakListOptionsFunc, namespace string, handler SecretHandler) *SecretWatcher
-}
-
 func (c *Controller) WatchConfigMaps(options internalinterfaces.TweakListOptionsFunc, namespace string, handler ConfigMapHandler) *ConfigMapWatcher {
 	watcher := &ConfigMapWatcher{
 		handler: handler,
diff --git a/internal/kube/client/pods.go b/internal/kube/client/pods.go
new file mode 100644
index 00000000..5377f9db
--- /dev/null
+++ b/internal/kube/client/pods.go
@@ -0,0 +1,72 @@
+/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package client
+
+import (
+	"context"
+	"time"
+
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/client-go/kubernetes"
+
+	"github.com/skupperproject/skupper/pkg/utils"
+)
+
+func IsPodReady(pod *corev1.Pod) bool {
+	for _, c := range pod.Status.Conditions {
+		if c.Type == corev1.PodReady {
+			return c.Status == corev1.ConditionTrue
+		}
+	}
+	return false
+}
+
+func IsPodRunning(pod *corev1.Pod) bool {
+	return pod.Status.Phase == corev1.PodRunning
+}
+
+func getPods(selector string, namespace string, cli kubernetes.Interface) ([]corev1.Pod, error) {
+	options := metav1.ListOptions{LabelSelector: selector}
+	podList, err := cli.CoreV1().Pods(namespace).List(context.TODO(), options)
+	if err != nil {
+		return nil, err
+	}
+	return podList.Items, err
+}
+
+func WaitForPodsSelectorStatus(namespace string, clientset kubernetes.Interface, selector string, status corev1.PodPhase, timeout time.Duration, interval time.Duration) ([]corev1.Pod, error) {
+	var pods []corev1.Pod
+	var pod corev1.Pod
+	var err error
+
+	ctx, cancel := context.WithTimeout(context.TODO(), timeout)
+	defer cancel()
+	err = utils.RetryWithContext(ctx, interval, func() (bool, error) {
+		pods, err = getPods(selector, namespace, clientset)
+		if err != nil {
+			// pod does not exist yet
+			return false, nil
+		}
+		for _, pod = range pods {
+			if pod.Status.Phase != status {
+				return false, nil
+			}
+		}
+		return true, nil
+	})
+
+	return pods, err
+}
diff --git a/cmd/controller/controller.go b/internal/kube/controller/controller.go
similarity index 88%
rename from cmd/controller/controller.go
rename to internal/kube/controller/controller.go
index 10185ed3..95bc6983 100644
--- a/cmd/controller/controller.go
+++ b/internal/kube/controller/controller.go
@@ -1,11 +1,10 @@
-package main
+package controller
 
 import (
 	"encoding/json"
 	"fmt"
 	"io"
 	"log"
-	"log/slog"
 	"os"
 	"strings"
 
@@ -14,24 +13,23 @@ import (
 	"k8s.io/client-go/informers/internalinterfaces"
 	"k8s.io/client-go/tools/cache"
 
+	"github.com/skupperproject/skupper/internal/kube/certificates"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
+	"github.com/skupperproject/skupper/internal/kube/grants"
+	"github.com/skupperproject/skupper/internal/kube/securedaccess"
+	"github.com/skupperproject/skupper/internal/kube/site"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
-	"github.com/skupperproject/skupper/pkg/kube/certificates"
-	"github.com/skupperproject/skupper/pkg/kube/grants"
-	"github.com/skupperproject/skupper/pkg/kube/securedaccess"
-	"github.com/skupperproject/skupper/pkg/kube/site"
 	"github.com/skupperproject/skupper/pkg/network"
 )
 
 type Controller struct {
-	controller           *kube.Controller
+	controller           *internalclient.Controller
 	stopCh               <-chan struct{}
-	siteWatcher          *kube.SiteWatcher
-	listenerWatcher      *kube.ListenerWatcher
-	connectorWatcher     *kube.ConnectorWatcher
-	linkAccessWatcher    *kube.RouterAccessWatcher
-	grantWatcher         *kube.AccessGrantWatcher
+	siteWatcher          *internalclient.SiteWatcher
+	listenerWatcher      *internalclient.ListenerWatcher
+	connectorWatcher     *internalclient.ConnectorWatcher
+	linkAccessWatcher    *internalclient.RouterAccessWatcher
+	grantWatcher         *internalclient.AccessGrantWatcher
 	sites                map[string]*site.Site
 	startGrantServer     func()
 	accessMgr            *securedaccess.SecuredAccessManager
@@ -54,7 +52,7 @@ func skupperNetworkStatus() internalinterfaces.TweakListOptionsFunc {
 
 func NewController(cli internalclient.Clients, grantConfig *grants.GrantConfig, securedAccessConfig *securedaccess.Config, watchNamespace string, currentNamespace string) (*Controller, error) {
 	controller := &Controller{
-		controller:           kube.NewController("Controller", cli),
+		controller:           internalclient.NewController("Controller", cli),
 		sites:                map[string]*site.Site{},
 		attachableConnectors: map[string]*skupperv2alpha1.AttachedConnector{},
 	}
@@ -358,41 +356,3 @@ func extractSiteRecords(status network.NetworkStatusInfo) []skupperv2alpha1.Site
 	}
 	return records
 }
-
-func skupperLogConfig() internalinterfaces.TweakListOptionsFunc {
-	return func(options *metav1.ListOptions) {
-		options.FieldSelector = "metadata.name=skupper-log-config"
-	}
-}
-
-func convertLogLevel(logLevel string) slog.Level {
-	switch strings.ToLower(logLevel) {
-	case "debug":
-		return slog.LevelDebug
-	case "info":
-		return slog.LevelInfo
-	case "warn":
-		return slog.LevelWarn
-	case "error":
-		return slog.LevelError
-	}
-	return slog.LevelInfo
-}
-
-func (c *Controller) logConfigUpdate(key string, cm *corev1.ConfigMap) error {
-	const controllerLogLevelKey = "CONTROLLER_LOG_LEVEL"
-	var slogLevel slog.Level
-	if cm == nil {
-		// if configmap is deleted, then set log level to info
-		slogLevel = slog.LevelInfo
-	} else {
-		logLevel := cm.Data[controllerLogLevelKey]
-		slogLevel = convertLogLevel(logLevel)
-	}
-
-	if slogLevel != controllerLogLevel.Level() {
-		controllerLogLevel.Set(slogLevel)
-	}
-	slog.Info("Updating log level", slog.String("logLevel", slogLevel.String()))
-	return nil
-}
diff --git a/internal/kube/controller/loglevel.go b/internal/kube/controller/loglevel.go
new file mode 100644
index 00000000..9cd0b08e
--- /dev/null
+++ b/internal/kube/controller/loglevel.go
@@ -0,0 +1,56 @@
+package controller
+
+import (
+	"log/slog"
+	"os"
+	"strings"
+
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/client-go/informers/internalinterfaces"
+)
+
+var controllerLogLevel = new(slog.LevelVar) // defaults to Info
+
+func init() {
+	logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: controllerLogLevel}))
+	slog.SetDefault(logger)
+}
+
+func skupperLogConfig() internalinterfaces.TweakListOptionsFunc {
+	return func(options *metav1.ListOptions) {
+		options.FieldSelector = "metadata.name=skupper-log-config"
+	}
+}
+
+func convertLogLevel(logLevel string) slog.Level {
+	switch strings.ToLower(logLevel) {
+	case "debug":
+		return slog.LevelDebug
+	case "info":
+		return slog.LevelInfo
+	case "warn":
+		return slog.LevelWarn
+	case "error":
+		return slog.LevelError
+	}
+	return slog.LevelInfo
+}
+
+func (c *Controller) logConfigUpdate(key string, cm *corev1.ConfigMap) error {
+	const controllerLogLevelKey = "CONTROLLER_LOG_LEVEL"
+	var slogLevel slog.Level
+	if cm == nil {
+		// if configmap is deleted, then set log level to info
+		slogLevel = slog.LevelInfo
+	} else {
+		logLevel := cm.Data[controllerLogLevelKey]
+		slogLevel = convertLogLevel(logLevel)
+	}
+
+	if slogLevel != controllerLogLevel.Level() {
+		controllerLogLevel.Set(slogLevel)
+	}
+	slog.Info("Updating log level", slog.String("logLevel", slogLevel.String()))
+	return nil
+}
diff --git a/pkg/kube/grants/autoconfigure.go b/internal/kube/grants/autoconfigure.go
similarity index 93%
rename from pkg/kube/grants/autoconfigure.go
rename to internal/kube/grants/autoconfigure.go
index f232083b..e559ebca 100644
--- a/pkg/kube/grants/autoconfigure.go
+++ b/internal/kube/grants/autoconfigure.go
@@ -10,7 +10,6 @@ import (
 
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 type AutoConfigure struct {
@@ -139,7 +138,7 @@ func (s *AutoConfigure) configure(clients internalclient.Clients, namespace stri
 	return nil
 }
 
-func newAutoConfigure(handler kube.SecuredAccessHandler, controller *kube.Controller, currentNamespace string, config *GrantConfig) (*AutoConfigure, error) {
+func newAutoConfigure(handler internalclient.SecuredAccessHandler, controller *internalclient.Controller, currentNamespace string, config *GrantConfig) (*AutoConfigure, error) {
 	ac := &AutoConfigure{
 		port:                 config.Port,
 		tlsCredentialsSecret: config.TlsCredentialsSecret,
@@ -152,6 +151,6 @@ func newAutoConfigure(handler kube.SecuredAccessHandler, controller *kube.Contro
 	if err := ac.configure(controller, currentNamespace); err != nil {
 		return nil, fmt.Errorf("Error creating resources for grant server: %s", err)
 	}
-	controller.WatchSecuredAccessesWithOptions(kube.SkupperResourceByName("skupper-grant-server"), currentNamespace, handler)
+	controller.WatchSecuredAccessesWithOptions(internalclient.SkupperResourceByName("skupper-grant-server"), currentNamespace, handler)
 	return ac, nil
 }
diff --git a/pkg/kube/grants/common_test.go b/internal/kube/grants/common_test.go
similarity index 100%
rename from pkg/kube/grants/common_test.go
rename to internal/kube/grants/common_test.go
diff --git a/pkg/kube/grants/config.go b/internal/kube/grants/config.go
similarity index 100%
rename from pkg/kube/grants/config.go
rename to internal/kube/grants/config.go
diff --git a/pkg/kube/grants/config_test.go b/internal/kube/grants/config_test.go
similarity index 100%
rename from pkg/kube/grants/config_test.go
rename to internal/kube/grants/config_test.go
diff --git a/pkg/kube/grants/disabled.go b/internal/kube/grants/disabled.go
similarity index 87%
rename from pkg/kube/grants/disabled.go
rename to internal/kube/grants/disabled.go
index 97705ccb..a5b303f7 100644
--- a/pkg/kube/grants/disabled.go
+++ b/internal/kube/grants/disabled.go
@@ -8,7 +8,6 @@ import (
 
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 type GrantsDisabled struct {
@@ -25,7 +24,7 @@ func (s *GrantsDisabled) markGrantNotEnabled(key string, grant *skupperv2alpha1.
 	return nil
 }
 
-func disabled(controller *kube.Controller, watchNamespace string) *GrantsDisabled {
+func disabled(controller *internalclient.Controller, watchNamespace string) *GrantsDisabled {
 	mgr := &GrantsDisabled{
 		clients: controller,
 	}
diff --git a/pkg/kube/grants/enabled.go b/internal/kube/grants/enabled.go
similarity index 81%
rename from pkg/kube/grants/enabled.go
rename to internal/kube/grants/enabled.go
index a2129671..7328d869 100644
--- a/pkg/kube/grants/enabled.go
+++ b/internal/kube/grants/enabled.go
@@ -6,18 +6,18 @@ import (
 
 	corev1 "k8s.io/api/core/v1"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
-func enabled(controller *kube.Controller, currentNamespace string, watchNamespace string, config *GrantConfig, generator GrantResponse) *GrantsEnabled {
+func enabled(controller *internalclient.Controller, currentNamespace string, watchNamespace string, config *GrantConfig, generator GrantResponse) *GrantsEnabled {
 	gc := &GrantsEnabled{
 		grants: newGrants(controller, generator, config.scheme(), config.BaseUrl),
 	}
 	gc.server = newServer(config.addr(), config.tlsEnabled(), gc.grants)
 
 	gc.grantWatcher = controller.WatchAccessGrants(watchNamespace, gc.grants.checkGrant)
-	gc.secretWatcher = controller.WatchSecrets(kube.ByName(config.TlsCredentialsSecret), watchNamespace, gc.tlsCredentialsUpdated)
+	gc.secretWatcher = controller.WatchSecrets(internalclient.ByName(config.TlsCredentialsSecret), watchNamespace, gc.tlsCredentialsUpdated)
 
 	if config.AutoConfigure {
 		ac, err := newAutoConfigure(gc.securedAccessChanged, controller, currentNamespace, config)
@@ -32,8 +32,8 @@ func enabled(controller *kube.Controller, currentNamespace string, watchNamespac
 type GrantsEnabled struct {
 	grants        *Grants
 	server        *Server
-	grantWatcher  *kube.AccessGrantWatcher
-	secretWatcher *kube.SecretWatcher
+	grantWatcher  *internalclient.AccessGrantWatcher
+	secretWatcher *internalclient.SecretWatcher
 	autoConfigure *AutoConfigure
 	started       bool
 }
diff --git a/pkg/kube/grants/enabled_test.go b/internal/kube/grants/enabled_test.go
similarity index 100%
rename from pkg/kube/grants/enabled_test.go
rename to internal/kube/grants/enabled_test.go
diff --git a/pkg/kube/grants/grant_test.go b/internal/kube/grants/grant_test.go
similarity index 100%
rename from pkg/kube/grants/grant_test.go
rename to internal/kube/grants/grant_test.go
diff --git a/pkg/kube/grants/grants.go b/internal/kube/grants/grants.go
similarity index 100%
rename from pkg/kube/grants/grants.go
rename to internal/kube/grants/grants.go
diff --git a/internal/kube/grants/init.go b/internal/kube/grants/init.go
new file mode 100644
index 00000000..9007c407
--- /dev/null
+++ b/internal/kube/grants/init.go
@@ -0,0 +1,14 @@
+package grants
+
+import (
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
+)
+
+func Initialise(controller *internalclient.Controller, currentNamespace string, watchNamespace string, config *GrantConfig, generator GrantResponse) func() {
+	if !config.Enabled {
+		disabled(controller, watchNamespace)
+		return nil
+	}
+	ge := enabled(controller, currentNamespace, watchNamespace, config, generator)
+	return ge.Start
+}
diff --git a/pkg/kube/grants/redeem.go b/internal/kube/grants/redeem.go
similarity index 100%
rename from pkg/kube/grants/redeem.go
rename to internal/kube/grants/redeem.go
diff --git a/pkg/kube/grants/redeem_test.go b/internal/kube/grants/redeem_test.go
similarity index 100%
rename from pkg/kube/grants/redeem_test.go
rename to internal/kube/grants/redeem_test.go
diff --git a/pkg/kube/grants/server.go b/internal/kube/grants/server.go
similarity index 100%
rename from pkg/kube/grants/server.go
rename to internal/kube/grants/server.go
diff --git a/pkg/kube/grants/server_test.go b/internal/kube/grants/server_test.go
similarity index 100%
rename from pkg/kube/grants/server_test.go
rename to internal/kube/grants/server_test.go
diff --git a/pkg/kube/grants/tokens.go b/internal/kube/grants/tokens.go
similarity index 100%
rename from pkg/kube/grants/tokens.go
rename to internal/kube/grants/tokens.go
diff --git a/pkg/kube/grants/tokens_test.go b/internal/kube/grants/tokens_test.go
similarity index 100%
rename from pkg/kube/grants/tokens_test.go
rename to internal/kube/grants/tokens_test.go
diff --git a/pkg/kube/qdr/ssl_profile.go b/internal/kube/qdr/ssl_profile.go
similarity index 77%
rename from pkg/kube/qdr/ssl_profile.go
rename to internal/kube/qdr/ssl_profile.go
index 77cb9754..0fddcc51 100644
--- a/pkg/kube/qdr/ssl_profile.go
+++ b/internal/kube/qdr/ssl_profile.go
@@ -4,15 +4,16 @@ import (
 	"context"
 
 	"github.com/skupperproject/skupper/api/types"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"github.com/skupperproject/skupper/pkg/qdr"
+
+	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/client-go/kubernetes"
 )
 
 func AddSslProfile(sslProfile qdr.SslProfile, namespace string, cli kubernetes.Interface) error {
 
-	configmap, err := kube.GetConfigMap(types.TransportConfigMapName, namespace, cli)
+	configmap, err := getConfigMap(types.TransportConfigMapName, namespace, cli)
 	if err != nil {
 		return err
 	}
@@ -44,7 +45,7 @@ func AddSslProfile(sslProfile qdr.SslProfile, namespace string, cli kubernetes.I
 }
 
 func RemoveSslProfile(secretName string, namespace string, cli kubernetes.Interface) error {
-	configmap, err := kube.GetConfigMap(types.TransportConfigMapName, namespace, cli)
+	configmap, err := getConfigMap(types.TransportConfigMapName, namespace, cli)
 	if err != nil {
 		return err
 	}
@@ -73,7 +74,7 @@ func RemoveSslProfile(secretName string, namespace string, cli kubernetes.Interf
 
 func ExistsSslProfile(secretName string, namespace string, cli kubernetes.Interface) (bool, error) {
 
-	configmap, err := kube.GetConfigMap(types.TransportConfigMapName, namespace, cli)
+	configmap, err := getConfigMap(types.TransportConfigMapName, namespace, cli)
 	if err != nil {
 		return false, err
 	}
@@ -91,3 +92,12 @@ func ExistsSslProfile(secretName string, namespace string, cli kubernetes.Interf
 	return false, nil
 
 }
+
+func getConfigMap(name string, namespace string, cli kubernetes.Interface) (*corev1.ConfigMap, error) {
+	current, err := cli.CoreV1().ConfigMaps(namespace).Get(context.TODO(), name, metav1.GetOptions{})
+	if err != nil {
+		return nil, err
+	} else {
+		return current, err
+	}
+}
diff --git a/pkg/kube/qdr/update_config.go b/internal/kube/qdr/update_config.go
similarity index 100%
rename from pkg/kube/qdr/update_config.go
rename to internal/kube/qdr/update_config.go
diff --git a/pkg/kube/securedaccess/access.go b/internal/kube/securedaccess/access.go
similarity index 99%
rename from pkg/kube/securedaccess/access.go
rename to internal/kube/securedaccess/access.go
index 41309cbb..aea2202c 100644
--- a/pkg/kube/securedaccess/access.go
+++ b/internal/kube/securedaccess/access.go
@@ -15,10 +15,10 @@ import (
 
 	routev1 "github.com/openshift/api/route/v1"
 
+	"github.com/skupperproject/skupper/internal/kube/certificates"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	"github.com/skupperproject/skupper/internal/kube/resource"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube/certificates"
 )
 
 type AccessType interface {
diff --git a/pkg/kube/securedaccess/config.go b/internal/kube/securedaccess/config.go
similarity index 100%
rename from pkg/kube/securedaccess/config.go
rename to internal/kube/securedaccess/config.go
diff --git a/pkg/kube/securedaccess/config_test.go b/internal/kube/securedaccess/config_test.go
similarity index 100%
rename from pkg/kube/securedaccess/config_test.go
rename to internal/kube/securedaccess/config_test.go
diff --git a/pkg/kube/securedaccess/contour.go b/internal/kube/securedaccess/contour.go
similarity index 100%
rename from pkg/kube/securedaccess/contour.go
rename to internal/kube/securedaccess/contour.go
diff --git a/pkg/kube/securedaccess/contour_test.go b/internal/kube/securedaccess/contour_test.go
similarity index 100%
rename from pkg/kube/securedaccess/contour_test.go
rename to internal/kube/securedaccess/contour_test.go
diff --git a/pkg/kube/securedaccess/gateway.go b/internal/kube/securedaccess/gateway.go
similarity index 100%
rename from pkg/kube/securedaccess/gateway.go
rename to internal/kube/securedaccess/gateway.go
diff --git a/pkg/kube/securedaccess/gateway.yaml b/internal/kube/securedaccess/gateway.yaml
similarity index 100%
rename from pkg/kube/securedaccess/gateway.yaml
rename to internal/kube/securedaccess/gateway.yaml
diff --git a/pkg/kube/securedaccess/ingress.go b/internal/kube/securedaccess/ingress.go
similarity index 100%
rename from pkg/kube/securedaccess/ingress.go
rename to internal/kube/securedaccess/ingress.go
diff --git a/pkg/kube/securedaccess/loadbalancer.go b/internal/kube/securedaccess/loadbalancer.go
similarity index 100%
rename from pkg/kube/securedaccess/loadbalancer.go
rename to internal/kube/securedaccess/loadbalancer.go
diff --git a/pkg/kube/securedaccess/local.go b/internal/kube/securedaccess/local.go
similarity index 100%
rename from pkg/kube/securedaccess/local.go
rename to internal/kube/securedaccess/local.go
diff --git a/pkg/kube/securedaccess/nodeport.go b/internal/kube/securedaccess/nodeport.go
similarity index 100%
rename from pkg/kube/securedaccess/nodeport.go
rename to internal/kube/securedaccess/nodeport.go
diff --git a/pkg/kube/securedaccess/route.go b/internal/kube/securedaccess/route.go
similarity index 100%
rename from pkg/kube/securedaccess/route.go
rename to internal/kube/securedaccess/route.go
diff --git a/pkg/kube/securedaccess/tls-route.yaml b/internal/kube/securedaccess/tls-route.yaml
similarity index 100%
rename from pkg/kube/securedaccess/tls-route.yaml
rename to internal/kube/securedaccess/tls-route.yaml
diff --git a/pkg/kube/securedaccess/unsupported.go b/internal/kube/securedaccess/unsupported.go
similarity index 100%
rename from pkg/kube/securedaccess/unsupported.go
rename to internal/kube/securedaccess/unsupported.go
diff --git a/pkg/kube/securedaccess/utils.go b/internal/kube/securedaccess/utils.go
similarity index 100%
rename from pkg/kube/securedaccess/utils.go
rename to internal/kube/securedaccess/utils.go
diff --git a/pkg/kube/securedaccess/utils_test.go b/internal/kube/securedaccess/utils_test.go
similarity index 100%
rename from pkg/kube/securedaccess/utils_test.go
rename to internal/kube/securedaccess/utils_test.go
diff --git a/pkg/kube/securedaccess/watchers.go b/internal/kube/securedaccess/watchers.go
similarity index 84%
rename from pkg/kube/securedaccess/watchers.go
rename to internal/kube/securedaccess/watchers.go
index d91c305d..5056b988 100644
--- a/pkg/kube/securedaccess/watchers.go
+++ b/internal/kube/securedaccess/watchers.go
@@ -7,18 +7,18 @@ import (
 
 	routev1interfaces "github.com/openshift/client-go/route/informers/externalversions/internalinterfaces"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 type SecuredAccessResourceWatcher struct {
 	accessMgr            *SecuredAccessManager
-	serviceWatcher       *kube.ServiceWatcher
-	routeWatcher         *kube.RouteWatcher
-	ingressWatcher       *kube.IngressWatcher
-	httpProxyWatcher     *kube.DynamicWatcher
-	tlsRouteWatcher      *kube.DynamicWatcher
-	securedAccessWatcher *kube.SecuredAccessWatcher
+	serviceWatcher       *internalclient.ServiceWatcher
+	routeWatcher         *internalclient.RouteWatcher
+	ingressWatcher       *internalclient.IngressWatcher
+	httpProxyWatcher     *internalclient.DynamicWatcher
+	tlsRouteWatcher      *internalclient.DynamicWatcher
+	securedAccessWatcher *internalclient.SecuredAccessWatcher
 }
 
 func NewSecuredAccessResourceWatcher(accessMgr *SecuredAccessManager) *SecuredAccessResourceWatcher {
@@ -27,7 +27,7 @@ func NewSecuredAccessResourceWatcher(accessMgr *SecuredAccessManager) *SecuredAc
 	}
 }
 
-func (m *SecuredAccessResourceWatcher) WatchResources(controller *kube.Controller, namespace string) {
+func (m *SecuredAccessResourceWatcher) WatchResources(controller *internalclient.Controller, namespace string) {
 	m.serviceWatcher = controller.WatchServices(coreSecuredAccess(), namespace, m.accessMgr.CheckService)
 	m.ingressWatcher = controller.WatchIngresses(coreSecuredAccess(), namespace, m.accessMgr.CheckIngress)
 	m.routeWatcher = controller.WatchRoutes(routeSecuredAccess(), namespace, m.accessMgr.CheckRoute)
@@ -35,11 +35,11 @@ func (m *SecuredAccessResourceWatcher) WatchResources(controller *kube.Controlle
 	m.tlsRouteWatcher = controller.WatchTlsRoutes(dynamicSecuredAccess(), namespace, m.accessMgr.CheckTlsRoute)
 }
 
-func (m *SecuredAccessResourceWatcher) WatchGateway(controller *kube.Controller, namespace string) {
+func (m *SecuredAccessResourceWatcher) WatchGateway(controller *internalclient.Controller, namespace string) {
 	controller.WatchGateways(dynamicByName("skupper"), namespace, m.accessMgr.CheckGateway)
 }
 
-func (m *SecuredAccessResourceWatcher) WatchSecuredAccesses(controller *kube.Controller, namespace string, handler kube.SecuredAccessHandler) {
+func (m *SecuredAccessResourceWatcher) WatchSecuredAccesses(controller *internalclient.Controller, namespace string, handler internalclient.SecuredAccessHandler) {
 	f := func(key string, sa *skupperv2alpha1.SecuredAccess) error {
 		if sa == nil {
 			return m.accessMgr.SecuredAccessDeleted(key)
diff --git a/pkg/kube/site/attached_connector.go b/internal/kube/site/attached_connector.go
similarity index 100%
rename from pkg/kube/site/attached_connector.go
rename to internal/kube/site/attached_connector.go
diff --git a/pkg/kube/site/binding_status.go b/internal/kube/site/binding_status.go
similarity index 100%
rename from pkg/kube/site/binding_status.go
rename to internal/kube/site/binding_status.go
diff --git a/pkg/kube/site/bindings.go b/internal/kube/site/bindings.go
similarity index 92%
rename from pkg/kube/site/bindings.go
rename to internal/kube/site/bindings.go
index 1d95ac17..fd63b0fc 100644
--- a/pkg/kube/site/bindings.go
+++ b/internal/kube/site/bindings.go
@@ -6,8 +6,8 @@ import (
 
 	corev1 "k8s.io/api/core/v1"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 var bindings_logger *slog.Logger
@@ -85,7 +85,7 @@ type PodWatchingContext interface {
 }
 
 type PodWatcher struct {
-	watcher *kube.PodWatcher
+	watcher *internalclient.PodWatcher
 	stopCh  chan struct{}
 	context PodWatchingContext
 }
@@ -93,8 +93,8 @@ type PodWatcher struct {
 func (w *PodWatcher) pods() []skupperv2alpha1.PodDetails {
 	var targets []skupperv2alpha1.PodDetails
 	for _, pod := range w.watcher.List() {
-		if kube.IsPodReady(pod) || w.context.IncludeNotReadyPods() {
-			if kube.IsPodRunning(pod) && pod.DeletionTimestamp == nil {
+		if internalclient.IsPodReady(pod) || w.context.IncludeNotReadyPods() {
+			if internalclient.IsPodRunning(pod) && pod.DeletionTimestamp == nil {
 				bindings_logger.Debug("Pod selected for connector",
 					slog.String("pod", pod.ObjectMeta.Name),
 					w.context.Attr())
diff --git a/pkg/kube/site/bindings_test.go b/internal/kube/site/bindings_test.go
similarity index 100%
rename from pkg/kube/site/bindings_test.go
rename to internal/kube/site/bindings_test.go
diff --git a/pkg/kube/site/extended_bindings.go b/internal/kube/site/extended_bindings.go
similarity index 97%
rename from pkg/kube/site/extended_bindings.go
rename to internal/kube/site/extended_bindings.go
index 13716848..9ec6438d 100644
--- a/pkg/kube/site/extended_bindings.go
+++ b/internal/kube/site/extended_bindings.go
@@ -4,8 +4,8 @@ import (
 	"errors"
 	"log/slog"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"github.com/skupperproject/skupper/pkg/qdr"
 	"github.com/skupperproject/skupper/pkg/site"
 )
@@ -18,12 +18,12 @@ type ExtendedBindings struct {
 	bindings           *site.Bindings
 	connectors         map[string]*AttachedConnector
 	perTargetListeners map[string]*PerTargetListener
-	controller         *kube.Controller
+	controller         *internalclient.Controller
 	site               *Site
 	logger             *slog.Logger
 }
 
-func NewExtendedBindings(controller *kube.Controller, profilePath string) *ExtendedBindings {
+func NewExtendedBindings(controller *internalclient.Controller, profilePath string) *ExtendedBindings {
 	eb := &ExtendedBindings{
 		bindings:           site.NewBindings(profilePath),
 		connectors:         map[string]*AttachedConnector{},
diff --git a/pkg/kube/site/per_target_listener.go b/internal/kube/site/per_target_listener.go
similarity index 100%
rename from pkg/kube/site/per_target_listener.go
rename to internal/kube/site/per_target_listener.go
diff --git a/pkg/kube/site/ports.go b/internal/kube/site/ports.go
similarity index 100%
rename from pkg/kube/site/ports.go
rename to internal/kube/site/ports.go
diff --git a/pkg/kube/site/resources/apply.go b/internal/kube/site/resources/apply.go
similarity index 97%
rename from pkg/kube/site/resources/apply.go
rename to internal/kube/site/resources/apply.go
index cf5a69ae..f9794a6c 100644
--- a/pkg/kube/site/resources/apply.go
+++ b/internal/kube/site/resources/apply.go
@@ -88,7 +88,7 @@ func getCoreParams(site *skupperv2alpha1.Site, group string) CoreParams {
 		ServiceAccount: site.Spec.GetServiceAccount(),
 		ConfigDigest:   configDigest(&site.Spec),
 		RouterImage:    images.GetRouterImageDetails(),
-		AdaptorImage:   images.GetAdaptorImageDetails(),
+		AdaptorImage:   images.GetKubeAdaptorImageDetails(),
 	}
 }
 
diff --git a/pkg/kube/site/resources/skupper-router-deployment.yaml b/internal/kube/site/resources/skupper-router-deployment.yaml
similarity index 100%
rename from pkg/kube/site/resources/skupper-router-deployment.yaml
rename to internal/kube/site/resources/skupper-router-deployment.yaml
diff --git a/pkg/kube/site/resources/skupper-router-local-service.yaml b/internal/kube/site/resources/skupper-router-local-service.yaml
similarity index 100%
rename from pkg/kube/site/resources/skupper-router-local-service.yaml
rename to internal/kube/site/resources/skupper-router-local-service.yaml
diff --git a/pkg/kube/site/site.go b/internal/kube/site/site.go
similarity index 96%
rename from pkg/kube/site/site.go
rename to internal/kube/site/site.go
index a4ab97fb..e890040c 100644
--- a/pkg/kube/site/site.go
+++ b/internal/kube/site/site.go
@@ -14,12 +14,11 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	"github.com/skupperproject/skupper/api/types"
+	"github.com/skupperproject/skupper/internal/kube/certificates"
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
+	kubeqdr "github.com/skupperproject/skupper/internal/kube/qdr"
+	"github.com/skupperproject/skupper/internal/kube/site/resources"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
-	"github.com/skupperproject/skupper/pkg/kube/certificates"
-	kubeqdr "github.com/skupperproject/skupper/pkg/kube/qdr"
-	"github.com/skupperproject/skupper/pkg/kube/site/resources"
 	"github.com/skupperproject/skupper/pkg/qdr"
 	"github.com/skupperproject/skupper/pkg/site"
 	"github.com/skupperproject/skupper/pkg/version"
@@ -36,7 +35,7 @@ type Site struct {
 	site          *skupperv2alpha1.Site
 	name          string
 	namespace     string
-	controller    *kube.Controller
+	controller    *internalclient.Controller
 	bindings      *ExtendedBindings
 	links         map[string]*site.Link
 	errors        map[string]string
@@ -48,7 +47,7 @@ type Site struct {
 	currentGroups []string
 }
 
-func NewSite(namespace string, controller *kube.Controller, certs certificates.CertificateManager, access SecuredAccessFactory) *Site {
+func NewSite(namespace string, controller *internalclient.Controller, certs certificates.CertificateManager, access SecuredAccessFactory) *Site {
 	return &Site{
 		bindings:   NewExtendedBindings(controller, SSL_PROFILE_PATH),
 		namespace:  namespace,
@@ -479,7 +478,7 @@ func (s *Site) Expose(exposed *ExposedPortSet) error {
 				},
 			},
 			Spec: corev1.ServiceSpec{
-				Selector: kube.GetLabelsForRouter(), //TODO: handle external bridges
+				Selector: getLabelsForRouter(), //TODO: handle external bridges
 			},
 		}
 		//TODO: add user specified labels and annotations
@@ -517,7 +516,7 @@ func (s *Site) Expose(exposed *ExposedPortSet) error {
 		return err
 	} else {
 		updated := false
-		if kube.UpdateSelectorFromMap(&current.Spec, kube.GetLabelsForRouter()) {
+		if updateSelectorFromMap(&current.Spec, getLabelsForRouter()) {
 			updated = true
 		}
 		if updatePorts(&current.Spec, exposed.Ports) {
@@ -1208,7 +1207,7 @@ func (s *Site) RouterPodEvent(key string, pod *corev1.Pod) error {
 func (s *Site) isRouterPodRunning() skupperv2alpha1.ConditionState {
 	state := skupperv2alpha1.PendingCondition("No router pod is ready")
 	for _, pod := range s.routerPods {
-		if kube.IsPodRunning(pod) && kube.IsPodReady(pod) {
+		if internalclient.IsPodRunning(pod) && internalclient.IsPodReady(pod) {
 			return skupperv2alpha1.ReadyCondition()
 		} else {
 			state = podState(pod)
@@ -1245,3 +1244,35 @@ func updateConnectorStatus(client internalclient.Clients, connector *skupperv2al
 func updateListenerStatus(client internalclient.Clients, listener *skupperv2alpha1.Listener) (*skupperv2alpha1.Listener, error) {
 	return client.GetSkupperClient().SkupperV2alpha1().Listeners(listener.ObjectMeta.Namespace).UpdateStatus(context.TODO(), listener, metav1.UpdateOptions{})
 }
+
+func getLabelsForRouter() map[string]string {
+	return map[string]string{
+		"application":          types.TransportDeploymentName,
+		"skupper.io/component": "router",
+	}
+}
+
+func equivalentSelectors(a map[string]string, b map[string]string) bool {
+	if len(a) != len(b) {
+		return false
+	}
+	for k, v := range a {
+		if v2, ok := b[k]; !ok || v != v2 {
+			return false
+		}
+	}
+	for k, v := range b {
+		if v2, ok := a[k]; !ok || v != v2 {
+			return false
+		}
+	}
+	return true
+}
+
+func updateSelectorFromMap(spec *corev1.ServiceSpec, desired map[string]string) bool {
+	if !equivalentSelectors(spec.Selector, desired) {
+		spec.Selector = desired
+		return true
+	}
+	return false
+}
diff --git a/pkg/images/image_utils.go b/pkg/images/image_utils.go
index de3ab776..a068b8b6 100644
--- a/pkg/images/image_utils.go
+++ b/pkg/images/image_utils.go
@@ -18,13 +18,13 @@ type SkupperImage struct {
 const (
 	RouterImageEnvKey             string = "SKUPPER_ROUTER_IMAGE"
 	ControllerImageEnvKey         string = "SKUPPER_CONTROLLER_IMAGE"
-	AdaptorImageEnvKey            string = "SKUPPER_ADAPTOR_IMAGE"
+	KubeAdaptorImageEnvKey        string = "SKUPPER_KUBE_ADAPTOR_IMAGE"
 	NetworkObserverImageEnvKey    string = "SKUPPER_NETWORK_OBSERVER_IMAGE"
 	CliImageEnvKey                string = "SKUPPER_CLI_IMAGE"
 	PrometheusServerImageEnvKey   string = "PROMETHEUS_SERVER_IMAGE"
 	OauthProxyImageEnvKey         string = "OAUTH_PROXY_IMAGE"
 	RouterPullPolicyEnvKey        string = "SKUPPER_ROUTER_IMAGE_PULL_POLICY"
-	AdaptorPullPolicyEnvKey       string = "SKUPPER_ADAPTOR_IMAGE_PULL_POLICY"
+	KubeAdaptorPullPolicyEnvKey   string = "SKUPPER_KUBE_ADAPTOR_IMAGE_PULL_POLICY"
 	OauthProxyPullPolicyEnvKey    string = "OAUTH_PROXY_IMAGE_PULL_POLICY"
 	SkupperImageRegistryEnvKey    string = "SKUPPER_IMAGE_REGISTRY"
 	PrometheusImageRegistryEnvKey string = "PROMETHEUS_IMAGE_REGISTRY"
@@ -104,25 +104,25 @@ func GetCliImageName() string {
 	}
 }
 
-func GetAdaptorImageDetails() types.ImageDetails {
+func GetKubeAdaptorImageDetails() types.ImageDetails {
 	return types.ImageDetails{
-		Name:       GetAdaptorImageName(),
-		PullPolicy: GetAdaptorImagePullPolicy(),
+		Name:       GetKubeAdaptorImageName(),
+		PullPolicy: GetKubeAdaptorImagePullPolicy(),
 	}
 }
 
-func GetAdaptorImageName() string {
-	image := os.Getenv(AdaptorImageEnvKey)
+func GetKubeAdaptorImageName() string {
+	image := os.Getenv(KubeAdaptorImageEnvKey)
 	if image == "" {
 		imageRegistry := GetImageRegistry()
-		return strings.Join([]string{imageRegistry, AdaptorImageName}, "/")
+		return strings.Join([]string{imageRegistry, KubeAdaptorImageName}, "/")
 	} else {
 		return image
 	}
 }
 
-func GetAdaptorImagePullPolicy() string {
-	return getPullPolicy(AdaptorPullPolicyEnvKey)
+func GetKubeAdaptorImagePullPolicy() string {
+	return getPullPolicy(KubeAdaptorPullPolicyEnvKey)
 }
 
 func GetPrometheusServerImageName() string {
@@ -242,11 +242,11 @@ func GetImages(component string, enableSHA bool) []SkupperImage {
 			registry = GetImageRegistry()
 		}
 
-		envImage = os.Getenv(AdaptorImageEnvKey)
+		envImage = os.Getenv(KubeAdaptorImageEnvKey)
 		if envImage != "" {
-			names[AdaptorImageEnvKey] = envImage
+			names[KubeAdaptorImageEnvKey] = envImage
 		} else {
-			names[AdaptorImageEnvKey] = AdaptorImageName
+			names[KubeAdaptorImageEnvKey] = KubeAdaptorImageName
 			registry = GetImageRegistry()
 		}
 	case "controller":
diff --git a/pkg/images/images.go b/pkg/images/images.go
index 4d0caf83..7f88df77 100644
--- a/pkg/images/images.go
+++ b/pkg/images/images.go
@@ -4,7 +4,7 @@ const (
 	DefaultImageRegistry     string = "quay.io/skupper"
 	RouterImageName          string = "skupper-router:main"
 	ControllerImageName      string = "controller:v2-latest"
-	AdaptorImageName         string = "kube-adaptor:v2-latest"
+	KubeAdaptorImageName     string = "kube-adaptor:v2-latest"
 	NetworkObserverImageName string = "network-observer:v2-latest"
 	CliImageName             string = "cli:v2-latest"
 
diff --git a/pkg/kube/configmaps.go b/pkg/kube/configmaps.go
deleted file mode 100644
index fd3f8cbf..00000000
--- a/pkg/kube/configmaps.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package kube
-
-import (
-	"context"
-	"fmt"
-
-	corev1 "k8s.io/api/core/v1"
-	"k8s.io/apimachinery/pkg/api/errors"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/client-go/kubernetes"
-)
-
-func NewConfigMap(name string, data *map[string]string, labels *map[string]string, annotations *map[string]string, owner *metav1.OwnerReference, namespace string, kubeclient kubernetes.Interface) (*corev1.ConfigMap, error) {
-	configMaps := kubeclient.CoreV1().ConfigMaps(namespace)
-	existing, err := configMaps.Get(context.TODO(), name, metav1.GetOptions{})
-	if err == nil {
-		//TODO:  already exists
-		return existing, nil
-	} else if errors.IsNotFound(err) {
-		cm := &corev1.ConfigMap{
-			TypeMeta: metav1.TypeMeta{
-				APIVersion: "v1",
-				Kind:       "ConfigMap",
-			},
-			ObjectMeta: metav1.ObjectMeta{
-				Name: name,
-			},
-		}
-
-		if data != nil {
-			cm.Data = *data
-		}
-		if labels != nil {
-			cm.ObjectMeta.Labels = *labels
-		}
-		if annotations != nil {
-			cm.ObjectMeta.Annotations = *annotations
-		}
-		if owner != nil {
-			cm.ObjectMeta.OwnerReferences = []metav1.OwnerReference{
-				*owner,
-			}
-		}
-
-		created, err := configMaps.Create(context.TODO(), cm, metav1.CreateOptions{})
-
-		if err != nil {
-			return nil, fmt.Errorf("Failed to create config map: %w", err)
-		} else {
-			return created, nil
-		}
-	} else {
-		cm := &corev1.ConfigMap{}
-		return cm, fmt.Errorf("Failed to check existing config maps: %w", err)
-	}
-}
-
-func GetConfigMap(name string, namespace string, cli kubernetes.Interface) (*corev1.ConfigMap, error) {
-	current, err := cli.CoreV1().ConfigMaps(namespace).Get(context.TODO(), name, metav1.GetOptions{})
-	if err != nil {
-		return nil, err
-	} else {
-		return current, err
-	}
-}
diff --git a/pkg/kube/grants/init.go b/pkg/kube/grants/init.go
deleted file mode 100644
index ee800756..00000000
--- a/pkg/kube/grants/init.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package grants
-
-import (
-	"github.com/skupperproject/skupper/pkg/kube"
-)
-
-func Initialise(controller *kube.Controller, currentNamespace string, watchNamespace string, config *GrantConfig, generator GrantResponse) func() {
-	if !config.Enabled {
-		disabled(controller, watchNamespace)
-		return nil
-	}
-	ge := enabled(controller, currentNamespace, watchNamespace, config, generator)
-	return ge.Start
-}
diff --git a/pkg/kube/misc.go b/pkg/kube/misc.go
deleted file mode 100644
index abf27d29..00000000
--- a/pkg/kube/misc.go
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package kube
-
-import (
-	"fmt"
-	"reflect"
-	"strconv"
-	"strings"
-
-	corev1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-func GetAllContainerPorts(container corev1.Container) map[int]int {
-	ports := map[int]int{}
-	for _, cp := range container.Ports {
-		ports[int(cp.ContainerPort)] = int(cp.ContainerPort)
-	}
-	return ports
-}
-
-func PortMapToLabelStr(portMap map[int]int) string {
-	portStr := ""
-	for iPort, tPort := range portMap {
-		if len(portStr) > 0 {
-			portStr += ","
-		}
-		portStr += fmt.Sprintf("%d:%d", iPort, tPort)
-	}
-	return portStr
-}
-
-func PortLabelStrToMap(portsStr string) map[int]int {
-	var err error
-	portMap := map[int]int{}
-	if portsStr == "" {
-		return portMap
-	}
-	for _, port := range strings.Split(portsStr, ",") {
-		ports := strings.Split(port, ":")
-		var iPort, tPort int
-		iPort, err = strconv.Atoi(ports[0])
-		if err != nil {
-			return map[int]int{}
-		}
-		tPort = iPort
-		if len(ports) > 1 {
-			tPort, err = strconv.Atoi(ports[1])
-			if err != nil {
-				return map[int]int{}
-			}
-		}
-		portMap[iPort] = tPort
-	}
-	return portMap
-}
-
-func SetAnnotation(o *metav1.ObjectMeta, key string, value string) {
-	if o.Annotations == nil {
-		o.Annotations = map[string]string{}
-	}
-	o.Annotations[key] = value
-}
-
-func SetLabel(o *metav1.ObjectMeta, key string, value string) {
-	if o.Labels == nil {
-		o.Labels = map[string]string{}
-	}
-	o.Labels[key] = value
-}
-
-func UpdateLabels(o *metav1.ObjectMeta, desired map[string]string) bool {
-	if reflect.DeepEqual(desired, o.Labels) {
-		return false
-	}
-	if o.Labels == nil {
-		o.Labels = desired
-	} else {
-		//note this only adds new labels, it never removes any (is that what is wanted?)
-		for k, v := range desired {
-			o.Labels[k] = v
-		}
-	}
-	return true
-}
-
-func UpdateAnnotations(o *metav1.ObjectMeta, desired map[string]string) bool {
-	if reflect.DeepEqual(desired, o.Annotations) {
-		return false
-	}
-	if o.Annotations == nil {
-		o.Annotations = desired
-	} else {
-		//note this only adds new annotations, it never removes any
-		for k, v := range desired {
-			o.Annotations[k] = v
-		}
-	}
-	return true
-}
diff --git a/pkg/kube/pods.go b/pkg/kube/pods.go
deleted file mode 100644
index e48204b6..00000000
--- a/pkg/kube/pods.go
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package kube
-
-import (
-	"bytes"
-	"context"
-	"errors"
-	"fmt"
-	"io"
-	"k8s.io/apimachinery/pkg/labels"
-	"strings"
-	"time"
-
-	corev1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/client-go/kubernetes"
-
-	"github.com/skupperproject/skupper/pkg/utils"
-)
-
-func GetPods(selector string, namespace string, cli kubernetes.Interface) ([]corev1.Pod, error) {
-	options := metav1.ListOptions{LabelSelector: selector}
-	podList, err := cli.CoreV1().Pods(namespace).List(context.TODO(), options)
-	if err != nil {
-		return nil, err
-	}
-	return podList.Items, err
-}
-
-func GetPullPolicy(policy string) corev1.PullPolicy {
-	switch policy {
-	case string(corev1.PullAlways):
-		return corev1.PullAlways
-	case string(corev1.PullNever):
-		return corev1.PullNever
-	case string(corev1.PullIfNotPresent):
-		return corev1.PullIfNotPresent
-	default:
-		return ""
-	}
-}
-
-func IsPodReady(pod *corev1.Pod) bool {
-	for _, c := range pod.Status.Conditions {
-		if c.Type == corev1.PodReady {
-			return c.Status == corev1.ConditionTrue
-		}
-	}
-	return false
-}
-
-func IsPodRunning(pod *corev1.Pod) bool {
-	return pod.Status.Phase == corev1.PodRunning
-}
-
-func FirstReadyPod(list []corev1.Pod) *corev1.Pod {
-	for _, p := range list {
-		if IsPodReady(&p) {
-			return &p
-		}
-	}
-	return nil
-}
-
-func GetReadyPod(namespace string, clientset kubernetes.Interface, component string, application string) (*corev1.Pod, error) {
-	matchLabels := map[string]string{"skupper.io/component": component}
-
-	if application != "" {
-		matchLabels["application"] = application
-	}
-
-	labelSelector := metav1.LabelSelector{MatchLabels: matchLabels}
-	listOptions := metav1.ListOptions{LabelSelector: labels.Set(labelSelector.MatchLabels).String()}
-
-	pods, err := clientset.CoreV1().Pods(namespace).List(context.TODO(), listOptions)
-	if err != nil {
-		return nil, err
-	} else if len(pods.Items) == 0 {
-		return nil, errors.New("Not found")
-	}
-	pod := FirstReadyPod(pods.Items)
-	if pod == nil {
-		return nil, errors.New("Not ready")
-	} else {
-		return pod, nil
-	}
-}
-
-func GetImageVersion(pod *corev1.Pod, container string) string {
-	for _, c := range pod.Status.ContainerStatuses {
-		if c.Name == container {
-			parts := strings.Split(c.ImageID, "@")
-			if len(parts) > 1 && len(parts[1]) >= 19 {
-				return fmt.Sprintf("%s (%s)", c.Image, parts[1][:19])
-			} else {
-				return fmt.Sprintf("%s", c.Image)
-			}
-		}
-	}
-	return "not-found"
-}
-
-func GetComponentVersion(namespace string, clientset kubernetes.Interface, component string, container string) string {
-	application := ""
-	if component == "router" {
-		application = "skupper-router"
-	}
-	pod, err := GetReadyPod(namespace, clientset, component, application)
-	if err == nil {
-		return GetImageVersion(pod, container)
-	} else {
-		return "not-found"
-	}
-}
-
-func WaitForPodStatus(namespace string, clientset kubernetes.Interface, podName string, status corev1.PodPhase, timeout time.Duration, interval time.Duration) (*corev1.Pod, error) {
-	var pod *corev1.Pod
-	var err error
-
-	ctx, cancel := context.WithTimeout(context.TODO(), timeout)
-	defer cancel()
-	err = utils.RetryWithContext(ctx, interval, func() (bool, error) {
-		pod, err = clientset.CoreV1().Pods(namespace).Get(ctx, podName, metav1.GetOptions{})
-		if err != nil {
-			// pod does not exist yet
-			return false, nil
-		}
-		return pod.Status.Phase == status, nil
-	})
-
-	return pod, err
-}
-func WaitForPodsSelectorStatus(namespace string, clientset kubernetes.Interface, selector string, status corev1.PodPhase, timeout time.Duration, interval time.Duration) ([]corev1.Pod, error) {
-	var pods []corev1.Pod
-	var pod corev1.Pod
-	var err error
-
-	ctx, cancel := context.WithTimeout(context.TODO(), timeout)
-	defer cancel()
-	err = utils.RetryWithContext(ctx, interval, func() (bool, error) {
-		pods, err = GetPods(selector, namespace, clientset)
-		if err != nil {
-			// pod does not exist yet
-			return false, nil
-		}
-		for _, pod = range pods {
-			if pod.Status.Phase != status {
-				return false, nil
-			}
-		}
-		return true, nil
-	})
-
-	return pods, err
-}
-
-func WaitForPodsStatus(namespace string, clientset kubernetes.Interface, selector string, status corev1.PodPhase, timeout time.Duration, interval time.Duration) error {
-	var err error
-
-	ctx, cancel := context.WithTimeout(context.TODO(), timeout)
-	defer cancel()
-	err = utils.RetryWithContext(ctx, interval, func() (bool, error) {
-		pods, err := GetPods(selector, namespace, clientset)
-		if err != nil {
-			return false, nil
-		}
-		if len(pods) == 0 {
-			return false, nil
-		}
-		for _, pod := range pods {
-			if pod.Status.Phase != status {
-				return false, nil
-			}
-		}
-		return true, nil
-	})
-
-	return err
-}
-
-func GetPodContainerLogs(podName string, containerName string, namespace string, clientset kubernetes.Interface) (string, error) {
-	podLogOpts := corev1.PodLogOptions{}
-	return GetPodContainerLogsWithOpts(podName, containerName, namespace, clientset, podLogOpts)
-}
-
-func GetPodContainerLogsWithOpts(podName string, containerName string, namespace string, clientset kubernetes.Interface, podLogOpts corev1.PodLogOptions) (string, error) {
-	if containerName != "" {
-		podLogOpts.Container = containerName
-	}
-	req := clientset.CoreV1().Pods(namespace).GetLogs(podName, &podLogOpts)
-	podLogs, err := req.Stream(context.TODO())
-	if err != nil {
-		return "", err
-	}
-	defer podLogs.Close()
-
-	buf := new(bytes.Buffer)
-	_, err = io.Copy(buf, podLogs)
-	if err != nil {
-		return "", err
-	}
-	str := buf.String()
-
-	return str, nil
-}
-
-func GetContainerPorts(spec *corev1.PodSpec) []corev1.ContainerPort {
-	ports := []corev1.ContainerPort{}
-	for _, container := range spec.Containers {
-		for _, port := range container.Ports {
-			ports = append(ports, port)
-		}
-	}
-	return ports
-}
diff --git a/pkg/kube/services.go b/pkg/kube/services.go
deleted file mode 100644
index 7e67e787..00000000
--- a/pkg/kube/services.go
+++ /dev/null
@@ -1,159 +0,0 @@
-package kube
-
-import (
-	"fmt"
-	"strings"
-
-	corev1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/apimachinery/pkg/util/intstr"
-
-	"github.com/skupperproject/skupper/api/types"
-)
-
-func GetLabelsForRouter() map[string]string {
-	return map[string]string{
-		"application":          types.TransportDeploymentName,
-		"skupper.io/component": "router",
-	}
-}
-
-func GetLoadBalancerHostOrIP(service *corev1.Service) string {
-	for _, i := range service.Status.LoadBalancer.Ingress {
-		if i.IP != "" {
-			return i.IP
-		} else if i.Hostname != "" {
-			return i.Hostname
-		}
-	}
-	return ""
-}
-
-func GetServicePortMap(service *corev1.Service) map[int]int {
-	actualPorts := map[int]int{}
-	if len(service.Spec.Ports) > 0 {
-		for _, port := range service.Spec.Ports {
-			targetPort := port.TargetPort.IntValue()
-			if targetPort == 0 {
-				targetPort = int(port.Port)
-			}
-			actualPorts[int(port.Port)] = targetPort
-		}
-	}
-	return actualPorts
-}
-
-func IndexServicePorts(service *corev1.Service) map[int]int {
-	actualPorts := map[int]int{}
-	if len(service.Spec.Ports) > 0 {
-		for _, port := range service.Spec.Ports {
-			targetPort := port.TargetPort.IntValue()
-			if targetPort == 0 {
-				targetPort = int(port.Port)
-			}
-			actualPorts[int(port.Port)] = targetPort
-		}
-	}
-	return actualPorts
-}
-
-func GetOriginalAssignedPorts(service *corev1.Service) map[int]int {
-	originalAssignedPort := service.Annotations[types.OriginalAssignedQualifier]
-	return PortLabelStrToMap(originalAssignedPort)
-}
-
-func GetOriginalTargetPorts(service *corev1.Service) map[int]int {
-	originalTargetPort := service.Annotations[types.OriginalTargetPortQualifier]
-	return PortLabelStrToMap(originalTargetPort)
-}
-
-func UpdatePorts(spec *corev1.ServiceSpec, desiredPortMappings map[int]int, protocol corev1.Protocol) bool {
-	var ports []corev1.ServicePort
-	update := false
-	for _, port := range spec.Ports {
-		if targetPort, ok := desiredPortMappings[int(port.Port)]; ok {
-			if targetPort != int(port.TargetPort.IntVal) {
-				port.TargetPort = intstr.IntOrString{IntVal: int32(targetPort)}
-				update = true
-			}
-			ports = append(ports, port)
-			delete(desiredPortMappings, int(port.Port))
-		} else {
-			update = true // port should be deleted
-		}
-	}
-	for port, targetPort := range desiredPortMappings {
-		update = true
-		ports = append(ports, corev1.ServicePort{
-			Name:       fmt.Sprintf("port%d", port),
-			Port:       int32(port),
-			TargetPort: intstr.IntOrString{IntVal: int32(targetPort)},
-			Protocol:   protocol,
-		})
-	}
-	if update {
-		spec.Ports = ports
-		return true
-	}
-	return false
-}
-
-func PortsAsString(ports []corev1.ServicePort) string {
-	formatted := []string{}
-	for _, port := range ports {
-		formatted = append(formatted, fmt.Sprintf("%d:%d", port.Port, port.TargetPort.IntVal))
-	}
-	return strings.Join(formatted, ",")
-}
-
-func EquivalentSelectors(a map[string]string, b map[string]string) bool {
-	if len(a) != len(b) {
-		return false
-	}
-	for k, v := range a {
-		if v2, ok := b[k]; !ok || v != v2 {
-			return false
-		}
-	}
-	for k, v := range b {
-		if v2, ok := a[k]; !ok || v != v2 {
-			return false
-		}
-	}
-	return true
-}
-
-func GetSelectorAsMap(selector string) (map[string]string, error) {
-	ls, err := metav1.ParseToLabelSelector(selector)
-	if err != nil {
-		return nil, err
-	}
-	m, err := metav1.LabelSelectorAsMap(ls)
-	if err != nil {
-		return nil, err
-	}
-	return m, nil
-}
-
-func UpdateSelectorFromMap(spec *corev1.ServiceSpec, desired map[string]string) bool {
-	if !EquivalentSelectors(spec.Selector, desired) {
-		spec.Selector = desired
-		return true
-	}
-	return false
-}
-
-func UpdateSelector(spec *corev1.ServiceSpec, selector string) (bool, error) {
-	desired, err := GetSelectorAsMap(selector)
-	if err != nil {
-		return false, err
-	}
-	return UpdateSelectorFromMap(spec, desired), nil
-}
-
-func protocol(protocol string) corev1.Protocol {
-	if strings.EqualFold(protocol, "udp") {
-		return corev1.ProtocolUDP
-	}
-	return corev1.ProtocolTCP
-}
diff --git a/pkg/nonkube/bootstrap/bootstrap.go b/pkg/nonkube/bootstrap/bootstrap.go
index 074b6b71..b6ff0f6f 100644
--- a/pkg/nonkube/bootstrap/bootstrap.go
+++ b/pkg/nonkube/bootstrap/bootstrap.go
@@ -2,6 +2,10 @@ package bootstrap
 
 import (
 	"fmt"
+	"os"
+	"os/exec"
+	"path"
+
 	"github.com/skupperproject/skupper/api/types"
 	internalbundle "github.com/skupperproject/skupper/internal/nonkube/bundle"
 	internalutils "github.com/skupperproject/skupper/internal/utils"
@@ -11,9 +15,6 @@ import (
 	"github.com/skupperproject/skupper/pkg/nonkube/compat"
 	"github.com/skupperproject/skupper/pkg/nonkube/systemd"
 	"github.com/skupperproject/skupper/pkg/utils"
-	"os"
-	"os/exec"
-	"path"
 )
 
 type Config struct {
@@ -43,7 +44,7 @@ func PreBootstrap(config *Config) error {
 			fmt.Printf("Input path has not been provided and namespace %s does not exist\n", config.Namespace)
 			return fmt.Errorf("No sources found at: %s\n", path.Join(api.GetHostNamespaceHome(config.Namespace), string(api.InputSiteStatePath)))
 		}
-	} else if inputSourcesDefined {
+	} else if inputSourcesDefined && !api.IsRunningInContainer() {
 		return fmt.Errorf("Input path has been provided, but namespace %s has input sources defined at:\n %s\n", config.Namespace, path.Join(api.GetHostNamespaceHome(config.Namespace), string(api.InputSiteStatePath)))
 	}
 
diff --git a/pkg/nonkube/bootstrap/teardown.go b/pkg/nonkube/bootstrap/teardown.go
index d33467f5..097b9c51 100644
--- a/pkg/nonkube/bootstrap/teardown.go
+++ b/pkg/nonkube/bootstrap/teardown.go
@@ -2,11 +2,12 @@ package bootstrap
 
 import (
 	"fmt"
+	"os"
+
 	internalclient "github.com/skupperproject/skupper/internal/nonkube/client/compat"
 	"github.com/skupperproject/skupper/internal/nonkube/client/fs"
 	"github.com/skupperproject/skupper/pkg/nonkube/api"
 	"github.com/skupperproject/skupper/pkg/nonkube/common"
-	"os"
 )
 
 type LocalData struct {
@@ -14,9 +15,14 @@ type LocalData struct {
 	service     string
 }
 
-func Teardown(namespace string, platform string) error {
+func Teardown(namespace string) error {
 
-	if err := removeRouter(namespace); err != nil {
+	platformLoader := &common.NamespacePlatformLoader{}
+	platform, err := platformLoader.Load(namespace)
+	if err != nil {
+		return err
+	}
+	if err := removeRouter(namespace, platform); err != nil {
 		return err
 	}
 
@@ -43,9 +49,17 @@ func removeDefinition(namespace string) error {
 	return os.RemoveAll(api.GetHostNamespaceHome(namespace))
 }
 
-func removeRouter(namespace string) error {
+func removeRouter(namespace string, platform string) error {
+
+	endpoint := os.Getenv("CONTAINER_ENDPOINT")
+	if endpoint == "" {
+		endpoint = fmt.Sprintf("unix://%s/podman/podman.sock", api.GetRuntimeDir())
+		if platform == "docker" {
+			endpoint = "unix:///run/docker.sock"
+		}
+	}
 
-	cli, err := internalclient.NewCompatClient(os.Getenv("CONTAINER_ENDPOINT"), "")
+	cli, err := internalclient.NewCompatClient(endpoint, "")
 	if err != nil {
 		return fmt.Errorf("failed to create container client: %v", err)
 	}
diff --git a/pkg/nonkube/compat/site_state_renderer.go b/pkg/nonkube/compat/site_state_renderer.go
index f15bc349..f9cf3f28 100644
--- a/pkg/nonkube/compat/site_state_renderer.go
+++ b/pkg/nonkube/compat/site_state_renderer.go
@@ -37,7 +37,14 @@ func (s *SiteStateRenderer) Render(loadedSiteState *api.SiteState, reload bool)
 		return err
 	}
 	s.loadedSiteState = loadedSiteState
-	s.cli, err = internalclient.NewCompatClient(os.Getenv("CONTAINER_ENDPOINT"), "")
+	endpoint := os.Getenv("CONTAINER_ENDPOINT")
+	if endpoint == "" {
+		endpoint = fmt.Sprintf("unix://%s/podman/podman.sock", api.GetRuntimeDir())
+		if s.Platform == "docker" {
+			endpoint = "unix:///run/docker.sock"
+		}
+	}
+	s.cli, err = internalclient.NewCompatClient(endpoint, "")
 	if err != nil {
 		return fmt.Errorf("failed to create container client: %v", err)
 	}
diff --git a/pkg/utils/configs/manifest.go b/pkg/utils/configs/manifest.go
index 1af6ce55..ba255d00 100644
--- a/pkg/utils/configs/manifest.go
+++ b/pkg/utils/configs/manifest.go
@@ -105,9 +105,9 @@ func getEnvironmentVariableMap() *map[string]string {
 		envVariables[images.ControllerImageEnvKey] = controllerImage
 	}
 
-	adaptorImage := os.Getenv(images.AdaptorImageEnvKey)
+	adaptorImage := os.Getenv(images.KubeAdaptorImageEnvKey)
 	if adaptorImage != "" {
-		envVariables[images.AdaptorImageEnvKey] = adaptorImage
+		envVariables[images.KubeAdaptorImageEnvKey] = adaptorImage
 	}
 
 	networkObserverImage := os.Getenv(images.NetworkObserverImageEnvKey)
@@ -141,7 +141,7 @@ func GetRunningImages(component string, enableSHA bool, runningPods map[string]s
 	case "router":
 		// skupper router has two components
 		names[images.RouterImageEnvKey] = runningPods["router"]
-		names[images.AdaptorImageEnvKey] = runningPods["kube-adaptor"]
+		names[images.KubeAdaptorImageEnvKey] = runningPods["kube-adaptor"]
 
 	case "controller":
 		names[images.ControllerImageEnvKey] = runningPods["controller"]
diff --git a/scripts/update-helm-crds.sh b/scripts/update-helm-crds.sh
index a1b60902..7734d157 100755
--- a/scripts/update-helm-crds.sh
+++ b/scripts/update-helm-crds.sh
@@ -4,7 +4,7 @@
 SOURCE_DIR="./api/types/crds"
 
 # Destination directory
-DEST_DIR="./deployments/helm/crds"
+DEST_DIR="./charts/skupper-setup/crds"
 
 # Check if source directory exists
 if [ ! -d "$SOURCE_DIR" ]; then


Test patch:
diff --git a/internal/cmd/skupper/system/nonkube/system_teardown_test.go b/internal/cmd/skupper/system/nonkube/system_teardown_test.go
index 029e90ee..0bcd81ec 100644
--- a/internal/cmd/skupper/system/nonkube/system_teardown_test.go
+++ b/internal/cmd/skupper/system/nonkube/system_teardown_test.go
@@ -2,11 +2,12 @@ package nonkube
 
 import (
 	"fmt"
+	"testing"
+
 	"github.com/skupperproject/skupper/api/types"
 	"github.com/skupperproject/skupper/internal/cmd/skupper/common"
 	"github.com/skupperproject/skupper/internal/cmd/skupper/common/utils"
 	"gotest.tools/v3/assert"
-	"testing"
 )
 
 func TestCmdSystemTearDown_ValidateInput(t *testing.T) {
@@ -122,7 +123,7 @@ func newCmdSystemTeardownWithMocks(systemTeardDownFails bool) *CmdSystemTeardown
 	return cmdMock
 }
 
-func mockCmdSystemTeardown(namespace string, platform string) error { return nil }
-func mockCmdSystemTeardownFails(namespace string, platform string) error {
+func mockCmdSystemTeardown(namespace string) error { return nil }
+func mockCmdSystemTeardownFails(namespace string) error {
 	return fmt.Errorf("fail")
 }
diff --git a/pkg/kube/grants/autoconfigure_test.go b/internal/kube/grants/autoconfigure_test.go
similarity index 98%
rename from pkg/kube/grants/autoconfigure_test.go
rename to internal/kube/grants/autoconfigure_test.go
index 13c53dfc..a99086af 100644
--- a/pkg/kube/grants/autoconfigure_test.go
+++ b/internal/kube/grants/autoconfigure_test.go
@@ -14,7 +14,6 @@ import (
 	"github.com/skupperproject/skupper/internal/kube/client/fake"
 	"github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
 	fakev2alpha1 "github.com/skupperproject/skupper/pkg/generated/client/clientset/versioned/typed/skupper/v2alpha1/fake"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 func Test_configure(t *testing.T) {
@@ -202,7 +201,7 @@ func Test_newAutoconfigure(t *testing.T) {
 			if err != nil {
 				t.Error(err)
 			}
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 
 			config := &GrantConfig{
 				Port:     9090,
diff --git a/pkg/kube/grants/disabled_test.go b/internal/kube/grants/disabled_test.go
similarity index 93%
rename from pkg/kube/grants/disabled_test.go
rename to internal/kube/grants/disabled_test.go
index 2716bf99..0c256a04 100644
--- a/pkg/kube/grants/disabled_test.go
+++ b/internal/kube/grants/disabled_test.go
@@ -8,9 +8,9 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	"github.com/skupperproject/skupper/internal/kube/client/fake"
 	"github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 func Test_markGrantNotEnabled(t *testing.T) {
@@ -78,7 +78,7 @@ func Test_disabled(t *testing.T) {
 	if err != nil {
 		t.Error(err)
 	}
-	controller := kube.NewController("Controller", client)
+	controller := internalclient.NewController("Controller", client)
 	disabled(controller, "test")
 	stopCh := make(chan struct{})
 	defer close(stopCh)
diff --git a/pkg/kube/grants/init_test.go b/internal/kube/grants/init_test.go
similarity index 92%
rename from pkg/kube/grants/init_test.go
rename to internal/kube/grants/init_test.go
index eaca2fbe..c6443103 100644
--- a/pkg/kube/grants/init_test.go
+++ b/internal/kube/grants/init_test.go
@@ -8,9 +8,9 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	"github.com/skupperproject/skupper/internal/kube/client/fake"
 	"github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 )
 
 func Test_Initialise(t *testing.T) {
@@ -75,7 +75,7 @@ func Test_Initialise(t *testing.T) {
 			if err != nil {
 				t.Error(err)
 			}
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 
 			start := Initialise(controller, "test", metav1.NamespaceAll, &tt.config, nil)
 			if tt.endpoint != nil {
@@ -111,7 +111,7 @@ func Test_Initialise(t *testing.T) {
 
 }
 
-func updateSecuredAccessEndpoint(controller *kube.Controller, name string, namespace string, endpoint *v2alpha1.Endpoint) error {
+func updateSecuredAccessEndpoint(controller *internalclient.Controller, name string, namespace string, endpoint *v2alpha1.Endpoint) error {
 	sa, err := controller.GetSkupperClient().SkupperV2alpha1().SecuredAccesses(namespace).Get(context.TODO(), name, metav1.GetOptions{})
 	if err != nil {
 		return err
diff --git a/pkg/kube/securedaccess/access_test.go b/internal/kube/securedaccess/access_test.go
similarity index 99%
rename from pkg/kube/securedaccess/access_test.go
rename to internal/kube/securedaccess/access_test.go
index 7d4674f3..7f792563 100644
--- a/pkg/kube/securedaccess/access_test.go
+++ b/internal/kube/securedaccess/access_test.go
@@ -12,7 +12,6 @@ import (
 	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	fakeclient "github.com/skupperproject/skupper/internal/kube/client/fake"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"gotest.tools/v3/assert"
 	"gotest.tools/v3/assert/cmp"
 	corev1 "k8s.io/api/core/v1"
@@ -2381,7 +2380,7 @@ func TestSecuredAccessDeleted(t *testing.T) {
 			certs := newMockCertificateManager()
 			m := NewSecuredAccessManager(client, certs, &tt.config, ControllerContext{Namespace: "test"})
 			w := NewSecuredAccessResourceWatcher(m)
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 			w.WatchResources(controller, metav1.NamespaceAll)
 			w.WatchSecuredAccesses(controller, metav1.NamespaceAll, func(string, *skupperv2alpha1.SecuredAccess) error { return nil })
 			stopCh := make(chan struct{})
@@ -3454,7 +3453,7 @@ func TestRecreateOnDelete(t *testing.T) {
 			certs := newMockCertificateManager()
 			m := NewSecuredAccessManager(client, certs, &tt.config, ControllerContext{Namespace: "test"})
 			w := NewSecuredAccessResourceWatcher(m)
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 			w.WatchResources(controller, metav1.NamespaceAll)
 			w.WatchSecuredAccesses(controller, metav1.NamespaceAll, func(string, *skupperv2alpha1.SecuredAccess) error { return nil })
 			stopCh := make(chan struct{})
diff --git a/pkg/kube/securedaccess/watchers_test.go b/internal/kube/securedaccess/watchers_test.go
similarity index 99%
rename from pkg/kube/securedaccess/watchers_test.go
rename to internal/kube/securedaccess/watchers_test.go
index 376d5714..bf6aea88 100644
--- a/pkg/kube/securedaccess/watchers_test.go
+++ b/internal/kube/securedaccess/watchers_test.go
@@ -12,7 +12,6 @@ import (
 	fakeclient "github.com/skupperproject/skupper/internal/kube/client/fake"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
 	fakev2alpha1 "github.com/skupperproject/skupper/pkg/generated/client/clientset/versioned/typed/skupper/v2alpha1/fake"
-	"github.com/skupperproject/skupper/pkg/kube"
 	"gotest.tools/v3/assert"
 	"gotest.tools/v3/assert/cmp"
 	corev1 "k8s.io/api/core/v1"
@@ -697,7 +696,7 @@ func TestSecuredAccessRecovery(t *testing.T) {
 			certs := newMockCertificateManager()
 			m := NewSecuredAccessManager(client, certs, &tt.config, ControllerContext{Namespace: "test"})
 			w := NewSecuredAccessResourceWatcher(m)
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 			w.WatchResources(controller, metav1.NamespaceAll)
 			w.WatchSecuredAccesses(controller, metav1.NamespaceAll, func(string, *skupperv2alpha1.SecuredAccess) error { return nil })
 			stopCh := make(chan struct{})
@@ -1200,7 +1199,7 @@ func TestGateway(t *testing.T) {
 			certs := newMockCertificateManager()
 			m := NewSecuredAccessManager(client, certs, &tt.config, ControllerContext{Namespace: tt.namespace})
 			w := NewSecuredAccessResourceWatcher(m)
-			controller := kube.NewController("Controller", client)
+			controller := internalclient.NewController("Controller", client)
 			w.WatchResources(controller, metav1.NamespaceAll)
 			w.WatchSecuredAccesses(controller, metav1.NamespaceAll, func(string, *skupperv2alpha1.SecuredAccess) error { return nil })
 			w.WatchGateway(controller, tt.namespace)
diff --git a/pkg/kube/site/site_test.go b/internal/kube/site/site_test.go
similarity index 99%
rename from pkg/kube/site/site_test.go
rename to internal/kube/site/site_test.go
index ddca7a68..5fadaa2c 100644
--- a/pkg/kube/site/site_test.go
+++ b/internal/kube/site/site_test.go
@@ -4,12 +4,12 @@ import (
 	"context"
 	"testing"
 
+	"github.com/skupperproject/skupper/internal/kube/certificates"
+	internalclient "github.com/skupperproject/skupper/internal/kube/client"
 	fakeclient "github.com/skupperproject/skupper/internal/kube/client/fake"
+	"github.com/skupperproject/skupper/internal/kube/securedaccess"
 	"github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
 	skupperv2alpha1 "github.com/skupperproject/skupper/pkg/apis/skupper/v2alpha1"
-	"github.com/skupperproject/skupper/pkg/kube"
-	"github.com/skupperproject/skupper/pkg/kube/certificates"
-	"github.com/skupperproject/skupper/pkg/kube/securedaccess"
 	"github.com/skupperproject/skupper/pkg/qdr"
 	site1 "github.com/skupperproject/skupper/pkg/site"
 	"github.com/skupperproject/skupper/pkg/version"
@@ -1037,7 +1037,7 @@ func newSiteMocks(namespace string, k8sObjects []runtime.Object, skupperObjects
 		return nil, err
 	}
 
-	controller := kube.NewController("test", client)
+	controller := internalclient.NewController("test", client)
 	newSite := &Site{
 		controller: controller,
 		bindings:   NewExtendedBindings(controller, ""),
diff --git a/pkg/kube/configmaps_test.go b/pkg/kube/configmaps_test.go
deleted file mode 100644
index 09d9aa07..00000000
--- a/pkg/kube/configmaps_test.go
+++ /dev/null
@@ -1,183 +0,0 @@
-package kube
-
-import (
-	"context"
-	"fmt"
-	"reflect"
-	"testing"
-
-	"gotest.tools/v3/assert"
-	v1 "k8s.io/api/core/v1"
-	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"k8s.io/apimachinery/pkg/runtime"
-	"k8s.io/client-go/kubernetes/fake"
-	k8stesting "k8s.io/client-go/testing"
-)
-
-func TestNewConfigMap(t *testing.T) {
-
-	const NS = "test"
-	kubeClient := fake.NewSimpleClientset()
-
-	// Result type to validate
-	type result struct {
-		cm  *v1.ConfigMap
-		err error
-	}
-
-	// Test iteration for test table
-	type test struct {
-		name        string
-		cmName      string
-		data        *map[string]string
-		labels      *map[string]string
-		annotations *map[string]string
-		owner       *metav1.OwnerReference
-		expected    result
-	}
-
-	// Add a namespace
-	existingCm := &v1.ConfigMap{
-		ObjectMeta: metav1.ObjectMeta{
-			Name:      "existing-cm",
-			Namespace: NS,
-			OwnerReferences: []metav1.OwnerReference{
-				{Name: "TestNewConfigMap"},
-			},
-		},
-	}
-	kubeClient.CoreV1().ConfigMaps(NS).Create(context.TODO(), existingCm, metav1.CreateOptions{})
-
-	// Add a fake reaction when trying to get or create "error-cm"
-	kubeClient.Fake.PrependReactor("*", "configmaps", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
-		switch v := action.(type) {
-		case k8stesting.GetAction:
-			cmName := v.GetName()
-			if cmName == "get-cm-error" {
-				return true, nil, fmt.Errorf("fake error getting ConfigMap [%s]", cmName)
-			}
-		case k8stesting.CreateAction:
-			cmName := v.GetObject().(*v1.ConfigMap).Name
-			if cmName == "new-cm-error" {
-				return true, nil, fmt.Errorf("fake error creating ConfigMap [%s]", cmName)
-			}
-		}
-		return false, nil, nil
-	})
-
-	testTable := []test{
-		// already exists
-		{
-			name:        "existing-cm",
-			cmName:      "existing-cm",
-			data:        &map[string]string{"entry": "value"},
-			labels:      &map[string]string{"entry": "value"},
-			annotations: &map[string]string{"entry": "value"},
-			owner:       &metav1.OwnerReference{Name: "TestNewConfigMap"},
-			expected: result{
-				cm:  existingCm,
-				err: nil,
-			},
-		},
-		// unexpected error retrieving configmap
-		{
-			name:   "get-cm-error",
-			cmName: "get-cm-error",
-			expected: result{
-				cm:  &v1.ConfigMap{},
-				err: fmt.Errorf("Failed to check existing config maps: fake error getting ConfigMap [get-cm-error]"),
-			},
-		},
-		// successful - no data or owner
-		{
-			name:   "new-cm",
-			cmName: "new-cm",
-			expected: result{
-				cm: &v1.ConfigMap{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "new-cm",
-					},
-				},
-				err: nil,
-			},
-		},
-		// successful - all data
-		{
-			name:   "new-cm-all-data",
-			cmName: "new-cm-all-data",
-			owner: &metav1.OwnerReference{
-				Name: "TestNewConfigMap",
-			},
-			data: &map[string]string{
-				"entry1": "value1",
-			},
-			labels: &map[string]string{
-				"entry2": "value2",
-			},
-			annotations: &map[string]string{
-				"entry3": "value3",
-			},
-			expected: result{
-				cm: &v1.ConfigMap{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "new-cm-all-data",
-						Labels: map[string]string{
-							"entry2": "value2",
-						},
-						Annotations: map[string]string{
-							"entry3": "value3",
-						},
-						OwnerReferences: []metav1.OwnerReference{
-							{Name: "TestNewConfigMap"},
-						},
-					},
-					Data: map[string]string{
-						"entry1": "value1",
-					},
-				},
-				err: nil,
-			},
-		},
-		// error creating
-		{
-			name:   "new-cm-error",
-			cmName: "new-cm-error",
-			owner: &metav1.OwnerReference{
-				Name: "TestNewConfigMap",
-			},
-			labels:      &map[string]string{},
-			annotations: &map[string]string{},
-			data: &map[string]string{
-				"entry1": "value1",
-			},
-			expected: result{
-				cm:  nil,
-				err: fmt.Errorf("Failed to create config map: fake error creating ConfigMap [new-cm-error]"),
-			},
-		},
-	}
-
-	// Iterate through test table
-	for _, test := range testTable {
-		t.Run(test.name, func(t *testing.T) {
-			// call NewConfigMap
-			cm, err := NewConfigMap(test.cmName, test.data, test.labels, test.annotations, test.owner, NS, kubeClient)
-			assert.Equal(t, test.expected.err == nil, err == nil)
-			if err != nil {
-				assert.Equal(t, test.expected.err.Error(), err.Error())
-			}
-			assert.Equal(t, test.expected.cm == nil, cm == nil)
-			if cm != nil {
-				assert.Equal(t, test.expected.cm.ObjectMeta.Name, cm.ObjectMeta.Name)
-				assert.Equal(t, test.expected.cm.Data == nil, cm.Data == nil)
-				if cm.Data != nil {
-					assert.Assert(t, reflect.DeepEqual(test.expected.cm.Data, cm.Data))
-				}
-				assert.Equal(t, test.expected.cm.OwnerReferences == nil, cm.OwnerReferences == nil)
-				if cm.OwnerReferences != nil {
-					assert.Assert(t, reflect.DeepEqual(test.expected.cm.OwnerReferences, cm.OwnerReferences))
-				}
-			}
-		})
-	}
-}
diff --git a/pkg/utils/configs/manifest_test.go b/pkg/utils/configs/manifest_test.go
index e11b38e8..db2d10d9 100644
--- a/pkg/utils/configs/manifest_test.go
+++ b/pkg/utils/configs/manifest_test.go
@@ -25,7 +25,7 @@ func TestManifestManager(t *testing.T) {
 			title: "configured manifest has different images that the default manifest",
 			envVariablesWithValue: []string{
 				images.SkupperImageRegistryEnvKey,
-				images.AdaptorImageEnvKey,
+				images.KubeAdaptorImageEnvKey,
 				images.RouterImageEnvKey,
 				images.ControllerImageEnvKey,
 			},
@@ -37,7 +37,7 @@ func TestManifestManager(t *testing.T) {
 							Version:   "main",
 							Images: []images.SkupperImage{
 								{
-									Name: "SKUPPER_ADAPTOR_IMAGE_TESTING",
+									Name: "SKUPPER_KUBE_ADAPTOR_IMAGE_TESTING",
 								},
 								{
 									Name: "SKUPPER_ROUTER_IMAGE_TESTING",
@@ -64,7 +64,7 @@ func TestManifestManager(t *testing.T) {
 							Version:   "",
 							Images: []images.SkupperImage{
 								{
-									Name: strings.Join([]string{images.DefaultImageRegistry, images.AdaptorImageName}, "/"),
+									Name: strings.Join([]string{images.DefaultImageRegistry, images.KubeAdaptorImageName}, "/"),
 								},
 								{
 									Name: strings.Join([]string{images.DefaultImageRegistry, images.RouterImageName}, "/"),
@@ -75,7 +75,7 @@ func TestManifestManager(t *testing.T) {
 				},
 				Variables: &map[string]string{
 					images.SkupperImageRegistryEnvKey: "SKUPPER_IMAGE_REGISTRY_TESTING",
-					images.AdaptorImageEnvKey:         "SKUPPER_ADAPTOR_IMAGE_TESTING",
+					images.KubeAdaptorImageEnvKey:     "SKUPPER_KUBE_ADAPTOR_IMAGE_TESTING",
 					images.RouterImageEnvKey:          "SKUPPER_ROUTER_IMAGE_TESTING",
 					images.ControllerImageEnvKey:      "SKUPPER_CONTROLLER_IMAGE_TESTING",
 				},
@@ -92,7 +92,7 @@ func TestManifestManager(t *testing.T) {
 							Version:   "main",
 							Images: []images.SkupperImage{
 								{
-									Name: strings.Join([]string{images.DefaultImageRegistry, images.AdaptorImageName}, "/"),
+									Name: strings.Join([]string{images.DefaultImageRegistry, images.KubeAdaptorImageName}, "/"),
 								},
 								{
 									Name: strings.Join([]string{images.DefaultImageRegistry, images.RouterImageName}, "/"),
@@ -110,7 +110,7 @@ func TestManifestManager(t *testing.T) {
 							Version:   "main",
 							Images: []images.SkupperImage{
 								{
-									Name: strings.Join([]string{images.DefaultImageRegistry, images.AdaptorImageName}, "/"),
+									Name: strings.Join([]string{images.DefaultImageRegistry, images.KubeAdaptorImageName}, "/"),
 								},
 								{
 									Name: strings.Join([]string{images.DefaultImageRegistry, images.RouterImageName}, "/"),