summaryrefslogtreecommitdiff
path: root/cmd/util.go
diff options
context:
space:
mode:
authorIshita Sequeira <46771830+ishitasequeira@users.noreply.github.com>2025-01-07 15:08:15 -0500
committerGitHub <noreply@github.com>2025-01-07 15:08:15 -0500
commit1a998b1415f937fde94b8912e4eec9235e542e93 (patch)
treeae4b38dc27f27b981a55bc57e188868e52949ef9 /cmd/util.go
parent9a20452b7fbe84d13a941a19a29d931481c61d88 (diff)
Move references for kube, image, registry to registry-scanner (#998)
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
Diffstat (limited to 'cmd/util.go')
-rw-r--r--cmd/util.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/util.go b/cmd/util.go
index 4284c81..628a960 100644
--- a/cmd/util.go
+++ b/cmd/util.go
@@ -7,6 +7,7 @@ import (
"time"
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
+ registryKube "github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)
@@ -26,9 +27,9 @@ func getPrintableHealthPort(port int) string {
}
}
-func getKubeConfig(ctx context.Context, namespace string, kubeConfig string) (*kube.KubernetesClient, error) {
+func getKubeConfig(ctx context.Context, namespace string, kubeConfig string) (*kube.ImageUpdaterKubernetesClient, error) {
var fullKubeConfigPath string
- var kubeClient *kube.KubernetesClient
+ var kubeClient *kube.ImageUpdaterKubernetesClient
var err error
if kubeConfig != "" {
@@ -44,10 +45,13 @@ func getKubeConfig(ctx context.Context, namespace string, kubeConfig string) (*k
log.Debugf("Creating in-cluster Kubernetes client")
}
- kubeClient, err = kube.NewKubernetesClientFromConfig(ctx, namespace, fullKubeConfigPath)
+ kubernetesClient, err := registryKube.NewKubernetesClientFromConfig(ctx, namespace, fullKubeConfigPath)
if err != nil {
return nil, err
}
+ kubeClient = &kube.ImageUpdaterKubernetesClient{
+ KubeClient: kubernetesClient,
+ }
return kubeClient, nil
}