Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pluto for openSUSE:Factory checked in at 2023-02-12 19:14:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pluto (Old) and /work/SRC/openSUSE:Factory/.pluto.new.1848 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pluto" Sun Feb 12 19:14:28 2023 rev:24 rq:1064467 version:5.13.3 Changes: -------- --- /work/SRC/openSUSE:Factory/pluto/pluto.changes 2023-02-10 14:35:44.226069950 +0100 +++ /work/SRC/openSUSE:Factory/.pluto.new.1848/pluto.changes 2023-02-12 19:14:31.181113624 +0100 @@ -1,0 +2,6 @@ +Sun Feb 12 06:10:06 UTC 2023 - ka...@b1-systems.de + +- Update to version 5.13.3: + * fix : rules to load client configuration to connect to a kubernetes cluster (#419) + +------------------------------------------------------------------- @@ -11 +17 @@ - * update go modules (#450) + * update go modules (#450) (bsc#1208093, CVE-2023-25165) Old: ---- pluto-5.13.2.tar.gz New: ---- pluto-5.13.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pluto.spec ++++++ --- /var/tmp/diff_new_pack.qtxAPT/_old 2023-02-12 19:14:31.901118036 +0100 +++ /var/tmp/diff_new_pack.qtxAPT/_new 2023-02-12 19:14:31.905118061 +0100 @@ -19,7 +19,7 @@ %define __arch_install_post export NO_BRP_STRIP_DEBUG=true Name: pluto -Version: 5.13.2 +Version: 5.13.3 Release: 0 Summary: A cli tool to help discover deprecated apiVersions in Kubernetes License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.qtxAPT/_old 2023-02-12 19:14:31.945118306 +0100 +++ /var/tmp/diff_new_pack.qtxAPT/_new 2023-02-12 19:14:31.949118330 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/FairwindsOps/pluto</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v5.13.2</param> + <param name="revision">v5.13.3</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> @@ -16,7 +16,7 @@ <param name="compression">gz</param> </service> <service name="go_modules" mode="disabled"> - <param name="archive">pluto-5.13.2.tar.gz</param> + <param name="archive">pluto-5.13.3.tar.gz</param> </service> </services> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.qtxAPT/_old 2023-02-12 19:14:31.969118453 +0100 +++ /var/tmp/diff_new_pack.qtxAPT/_new 2023-02-12 19:14:31.973118477 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/FairwindsOps/pluto</param> - <param name="changesrevision">b6ac6022c9755197b2920c3af0795b5b0e00ec3a</param></service></servicedata> + <param name="changesrevision">3d62079d42d9d8ab08562611b216c68e70e75d14</param></service></servicedata> (No newline at EOF) ++++++ pluto-5.13.2.tar.gz -> pluto-5.13.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pluto-5.13.2/pkg/discovery-api/discovery_api.go new/pluto-5.13.3/pkg/discovery-api/discovery_api.go --- old/pluto-5.13.2/pkg/discovery-api/discovery_api.go 2023-02-09 20:12:57.000000000 +0100 +++ new/pluto-5.13.3/pkg/discovery-api/discovery_api.go 2023-02-10 20:43:50.000000000 +0100 @@ -41,7 +41,7 @@ "k8s.io/klog/v2" "github.com/fairwindsops/pluto/v5/pkg/api" - kube "github.com/fairwindsops/pluto/v5/pkg/kube" + "github.com/fairwindsops/pluto/v5/pkg/kube" ) // DiscoveryClient is the declaration to hold objects needed for client-go/discovery. @@ -60,7 +60,7 @@ } var err error - cl.ClientSet, cl.restConfig, err = kube.GetKubeDynamicClient(kubeContext) + cl.restConfig, err = kube.GetConfig(kubeContext) if err != nil { return nil, err } @@ -71,6 +71,10 @@ cl.namespace = namespace + cl.ClientSet, err = dynamic.NewForConfig(cl.restConfig) + if err != nil { + return nil, err + } return cl, nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pluto-5.13.2/pkg/helm/helm.go new/pluto-5.13.3/pkg/helm/helm.go --- old/pluto-5.13.2/pkg/helm/helm.go 2023-02-09 20:12:57.000000000 +0100 +++ new/pluto-5.13.3/pkg/helm/helm.go 2023-02-10 20:43:50.000000000 +0100 @@ -43,7 +43,7 @@ "k8s.io/klog/v2" "github.com/fairwindsops/pluto/v5/pkg/api" - kube "github.com/fairwindsops/pluto/v5/pkg/kube" + "github.com/fairwindsops/pluto/v5/pkg/kube" ) // Helm represents all current releases that we can find in the cluster diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pluto-5.13.2/pkg/helm/helm_test.go new/pluto-5.13.3/pkg/helm/helm_test.go --- old/pluto-5.13.2/pkg/helm/helm_test.go 2023-02-09 20:12:57.000000000 +0100 +++ new/pluto-5.13.3/pkg/helm/helm_test.go 2023-02-10 20:43:50.000000000 +0100 @@ -33,16 +33,24 @@ "testing" "github.com/fairwindsops/pluto/v5/pkg/api" - kube "github.com/fairwindsops/pluto/v5/pkg/kube" + "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" "k8s.io/client-go/kubernetes" testclient "k8s.io/client-go/kubernetes/fake" - _ "k8s.io/client-go/plugin/pkg/client/auth" "k8s.io/client-go/rest" ) +var kubeClient *kube.Kube + +func getMockConfigInstance() *kube.Kube { + kubeClient = &kube.Kube{ + Client: testclient.NewSimpleClientset(), + } + return kubeClient +} + var ( helmSecret = v1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -153,13 +161,6 @@ } ) -func getMockConfigInstance() *kube.Kube { - kubeClient := &kube.Kube{ - Client: testclient.NewSimpleClientset(), - } - return kubeClient -} - func newMockHelm(namespace string) *Helm { return &Helm{ Namespace: namespace, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pluto-5.13.2/pkg/kube/kube.go new/pluto-5.13.3/pkg/kube/kube.go --- old/pluto-5.13.2/pkg/kube/kube.go 2023-02-09 20:12:57.000000000 +0100 +++ new/pluto-5.13.3/pkg/kube/kube.go 2023-02-10 20:43:50.000000000 +0100 @@ -26,12 +26,11 @@ // See the License for the specific language governing permissions and // limitations under the License -package helm +package kube import ( "sync" - "k8s.io/client-go/dynamic" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/klog/v2" @@ -52,10 +51,16 @@ func GetConfigInstance(kubeContext string) (*Kube, error) { var err error var client kubernetes.Interface + var kubeConfig *rest.Config + + kubeConfig, err = GetConfig(kubeContext) + if err != nil { + return nil, err + } once.Do(func() { if kubeClient == nil { - client, err = GetKubeClient(kubeContext) + client, err = GetKubeClient(kubeConfig) kubeClient = &Kube{ Client: client, @@ -68,38 +73,24 @@ return kubeClient, nil } -// GetKubeClient returns a Kubernetes.Interface based on the current configuration -func GetKubeClient(kubeContext string) (kubernetes.Interface, error) { +// GetConfig returns the current kube config with a specific context +func GetConfig(kubeContext string) (*rest.Config, error) { if kubeContext != "" { klog.V(3).Infof("using kube context: %s", kubeContext) } - config, err := config.GetConfigWithContext(kubeContext) + kubeConfig, err := config.GetConfigWithContext(kubeContext) if err != nil { return nil, err } + return kubeConfig, nil +} - clientset, err := kubernetes.NewForConfig(config) +// GetKubeClient returns a Kubernetes.Interface based on the current configuration +func GetKubeClient(kubeConfig *rest.Config) (kubernetes.Interface, error) { + clientset, err := kubernetes.NewForConfig(kubeConfig) if err != nil { return nil, err } return clientset, nil } - -// GetKubeDynamicClient returns a dynamic.Interface, rest.Config based on the current configuration -func GetKubeDynamicClient(kubeContext string) (dynamic.Interface, *rest.Config, error) { - if kubeContext != "" { - klog.V(3).Infof("using kube context: %s", kubeContext) - } - - config, err := config.GetConfigWithContext(kubeContext) - if err != nil { - return nil, nil, err - } - - clientset, err := dynamic.NewForConfig(config) - if err != nil { - return nil, nil, err - } - return clientset, config, nil -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pluto-5.13.2/pkg/kube/kube_test.go new/pluto-5.13.3/pkg/kube/kube_test.go --- old/pluto-5.13.2/pkg/kube/kube_test.go 2023-02-09 20:12:57.000000000 +0100 +++ new/pluto-5.13.3/pkg/kube/kube_test.go 2023-02-10 20:43:50.000000000 +0100 @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package helm +package kube import ( "os" "testing" "github.com/stretchr/testify/assert" + _ "k8s.io/client-go/plugin/pkg/client/auth" ) func Test_getKubeClient(t *testing.T) { @@ -50,7 +51,7 @@ for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { os.Setenv("KUBECONFIG", tt.kubeConfig) - _, err := GetKubeClient(tt.kubeContext) + _, err := GetConfig(tt.kubeContext) if tt.wantErr { assert.Error(t, err) } else { ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/pluto/vendor.tar.gz /work/SRC/openSUSE:Factory/.pluto.new.1848/vendor.tar.gz differ: char 5, line 1