From bf07bd3d2db3ff121fb3640b8230b1c800e0a20d Mon Sep 17 00:00:00 2001 From: jdesouza Date: Tue, 14 May 2024 14:09:21 -0300 Subject: [PATCH] Add pluto module v5 back (#535) * Revert "Removed pluto v5 references (#534)" This reverts commit 90c7e536755ae5ed37ea761b98bae590ce05c7a0. * Added v5 back --- cmd/pluto/main.go | 4 ++-- cmd/root.go | 10 +++++----- go.mod | 5 ++--- go.sum | 2 -- pkg/discovery-api/discovery_api.go | 4 ++-- pkg/finder/finder.go | 2 +- pkg/finder/finder_test.go | 2 +- pkg/helm/helm.go | 4 ++-- pkg/helm/helm_test.go | 12 ++++++------ 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/cmd/pluto/main.go b/cmd/pluto/main.go index f9403873..b7f2aed4 100644 --- a/cmd/pluto/main.go +++ b/cmd/pluto/main.go @@ -4,7 +4,7 @@ // 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 +// 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, @@ -14,7 +14,7 @@ package main import ( - plutoversionsfile "github.com/fairwindsops/pluto" + plutoversionsfile "github.com/fairwindsops/pluto/v5" "github.com/fairwindsops/pluto/v5/cmd" ) diff --git a/cmd/root.go b/cmd/root.go index 31193b04..403215d2 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -35,12 +35,12 @@ import ( "os" "strings" - "golang.org/x/mod/semver" + "github.com/fairwindsops/pluto/v5/pkg/api" + discoveryapi "github.com/fairwindsops/pluto/v5/pkg/discovery-api" + "github.com/fairwindsops/pluto/v5/pkg/finder" + "github.com/fairwindsops/pluto/v5/pkg/helm" + "github.com/rogpeppe/go-internal/semver" - "github.com/fairwindsops/pluto/pkg/api" - discoveryapi "github.com/fairwindsops/pluto/pkg/discovery-api" - "github.com/fairwindsops/pluto/pkg/finder" - "github.com/fairwindsops/pluto/pkg/helm" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" diff --git a/go.mod b/go.mod index 365981ae..1b4a7367 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/fairwindsops/pluto +module github.com/fairwindsops/pluto/v5 go 1.21 require ( - github.com/fairwindsops/pluto/v5 v5.18.4 github.com/olekukonko/tablewriter v0.0.5 + github.com/rogpeppe/go-internal v1.11.0 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.17.0 @@ -61,7 +61,6 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rubenv/sql-migrate v1.5.2 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect diff --git a/go.sum b/go.sum index 9eea8bc7..9e58a383 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fairwindsops/pluto/v5 v5.18.4 h1:jwSWs5zl+yu3uRuzsiZ0huKo1U4p/B8lxGBtuDF2jbU= -github.com/fairwindsops/pluto/v5 v5.18.4/go.mod h1:X1S9WoMBn2bReAYjoGDZpdaoLI2CHb787IlDaDKsYYU= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= diff --git a/pkg/discovery-api/discovery_api.go b/pkg/discovery-api/discovery_api.go index 1bade78e..e8f9f265 100644 --- a/pkg/discovery-api/discovery_api.go +++ b/pkg/discovery-api/discovery_api.go @@ -40,8 +40,8 @@ import ( "k8s.io/client-go/rest" "k8s.io/klog/v2" - "github.com/fairwindsops/pluto/pkg/api" - "github.com/fairwindsops/pluto/pkg/kube" + "github.com/fairwindsops/pluto/v5/pkg/api" + "github.com/fairwindsops/pluto/v5/pkg/kube" ) // DiscoveryClient is the declaration to hold objects needed for client-go/discovery. diff --git a/pkg/finder/finder.go b/pkg/finder/finder.go index e1aefed8..6cfe59d5 100644 --- a/pkg/finder/finder.go +++ b/pkg/finder/finder.go @@ -35,7 +35,7 @@ import ( "k8s.io/klog/v2" - "github.com/fairwindsops/pluto/pkg/api" + "github.com/fairwindsops/pluto/v5/pkg/api" ) // Dir is the finder dirlication diff --git a/pkg/finder/finder_test.go b/pkg/finder/finder_test.go index eae40ab3..7326e86a 100644 --- a/pkg/finder/finder_test.go +++ b/pkg/finder/finder_test.go @@ -32,7 +32,7 @@ import ( "os" "testing" - "github.com/fairwindsops/pluto/pkg/api" + "github.com/fairwindsops/pluto/v5/pkg/api" "github.com/stretchr/testify/assert" ) diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index c715ef0c..c0444178 100644 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -42,8 +42,8 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" - "github.com/fairwindsops/pluto/pkg/api" - "github.com/fairwindsops/pluto/pkg/kube" + "github.com/fairwindsops/pluto/v5/pkg/api" + "github.com/fairwindsops/pluto/v5/pkg/kube" ) // Helm represents all current releases that we can find in the cluster diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go index 9a407119..e388c79e 100644 --- a/pkg/helm/helm_test.go +++ b/pkg/helm/helm_test.go @@ -32,8 +32,8 @@ import ( "context" "testing" - "github.com/fairwindsops/pluto/pkg/api" - "github.com/fairwindsops/pluto/pkg/kube" + "github.com/fairwindsops/pluto/v5/pkg/api" + "github.com/fairwindsops/pluto/v5/pkg/kube" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,10 +45,10 @@ import ( var kubeClient *kube.Kube func getMockConfigInstance() *kube.Kube { - kubeClient = &kube.Kube{ - Client: testclient.NewSimpleClientset(), - } - return kubeClient + kubeClient = &kube.Kube{ + Client: testclient.NewSimpleClientset(), + } + return kubeClient } var (