Skip to content

Commit

Permalink
Merge pull request #314 from gianlucam76/main
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
gianlucam76 authored Dec 2, 2024
2 parents a0d9a78 + b695088 commit 97c4fec
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ require (
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.36.0
github.com/pkg/errors v0.9.1
github.com/projectsveltos/addon-controller v0.38.1-0.20241130093051-67a9bcd4999c
github.com/projectsveltos/event-manager v0.38.1-0.20241130135738-05ad83315f36
github.com/projectsveltos/libsveltos v0.42.1
github.com/projectsveltos/addon-controller v0.43.1-0.20241202100654-55c0786240ee
github.com/projectsveltos/event-manager v0.43.1-0.20241202114051-1c0a0d0cadee
github.com/projectsveltos/libsveltos v0.43.1-0.20241201131544-c4c2550af4af
github.com/robfig/cron/v3 v3.0.1
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.31.3
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/projectsveltos/addon-controller v0.38.1-0.20241130093051-67a9bcd4999c h1:RBZu6TgZAUjC/0KuXVZ9Ip/1Yt6tzMXpnsAnNmPF4XA=
github.com/projectsveltos/addon-controller v0.38.1-0.20241130093051-67a9bcd4999c/go.mod h1:WB/ean/I1EqRG9Mfw6+Jq371y1ykrF8Jetsh4lnKXMc=
github.com/projectsveltos/event-manager v0.38.1-0.20241130135738-05ad83315f36 h1:9AEVtIHarbzwQg1CPgvaZEW7Jqn6jPk4yGwwflqhRSM=
github.com/projectsveltos/event-manager v0.38.1-0.20241130135738-05ad83315f36/go.mod h1:lf7okHRrhjMv/0WtzJkqLp4QuCw0j9kzkB95fI5TgQg=
github.com/projectsveltos/libsveltos v0.42.1 h1:B7c8cF+vhR5AZJT8D4h19PSJfZqWUCR3CKEDUf032JI=
github.com/projectsveltos/libsveltos v0.42.1/go.mod h1:XPev2TKsMxVG5LwhbbMkcCs/U0730ZMmOXIvu2HEtWo=
github.com/projectsveltos/addon-controller v0.43.1-0.20241202100654-55c0786240ee h1:rkbzO6c5ttqDk1KAtbr3HPSquT5AO4eaa388NNgiCRc=
github.com/projectsveltos/addon-controller v0.43.1-0.20241202100654-55c0786240ee/go.mod h1:Mg0CsrS5NLlvKL5kIjqLznmvVE63Guj2aK+23k0kf0Y=
github.com/projectsveltos/event-manager v0.43.1-0.20241202114051-1c0a0d0cadee h1:JtYRf4FocJZCwswqMMdB2J7+9hQITW3kYnt9ftdLOMA=
github.com/projectsveltos/event-manager v0.43.1-0.20241202114051-1c0a0d0cadee/go.mod h1:XyJhynQqut5bUGdjGHCDpIOyf/rJv4KETlvJ7cr/V+s=
github.com/projectsveltos/libsveltos v0.43.1-0.20241201131544-c4c2550af4af h1:rkf6H9XqWmO10dTmZIsns7Zgcw4+vvnLa1bUrURPoJA=
github.com/projectsveltos/libsveltos v0.43.1-0.20241201131544-c4c2550af4af/go.mod h1:4hqQRjwZ/DZ6u0haL3zhdARZ3lpspLv57rkhpXIzbsg=
github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y=
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
Expand Down
8 changes: 4 additions & 4 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module github.com/projectsveltos/sveltosctl/hack/tools
go 1.22.7

require (
github.com/onsi/ginkgo/v2 v2.21.0
github.com/onsi/ginkgo/v2 v2.22.0
golang.org/x/oauth2 v0.24.0
k8s.io/client-go v0.31.2
k8s.io/client-go v0.31.3
sigs.k8s.io/controller-tools v0.16.5
sigs.k8s.io/kind v0.25.0
)
Expand Down Expand Up @@ -49,9 +49,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.31.2 // indirect
k8s.io/api v0.31.3 // indirect
k8s.io/apiextensions-apiserver v0.31.2 // indirect
k8s.io/apimachinery v0.31.2 // indirect
k8s.io/apimachinery v0.31.3 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
Expand Down
16 changes: 8 additions & 8 deletions hack/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM=
github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=
github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=
github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw=
Expand Down Expand Up @@ -173,14 +173,14 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0=
k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk=
k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8=
k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE=
k8s.io/apiextensions-apiserver v0.31.2 h1:W8EwUb8+WXBLu56ser5IudT2cOho0gAKeTOnywBLxd0=
k8s.io/apiextensions-apiserver v0.31.2/go.mod h1:i+Geh+nGCJEGiCGR3MlBDkS7koHIIKWVfWeRFiOsUcM=
k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw=
k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc=
k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs=
k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4=
k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4=
k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/show/admin_rbacs.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"k8s.io/apimachinery/pkg/types"

libsveltosv1beta1 "github.com/projectsveltos/libsveltos/api/v1beta1"
"github.com/projectsveltos/libsveltos/lib/k8s_utils"
logs "github.com/projectsveltos/libsveltos/lib/logsettings"
libsveltosutils "github.com/projectsveltos/libsveltos/lib/utils"
"github.com/projectsveltos/sveltosctl/internal/utils"
)

Expand Down Expand Up @@ -305,7 +305,7 @@ func collectContent(data map[string]string, logger logr.Logger) ([]*unstructured
continue
}

policy, err := libsveltosutils.GetUnstructured([]byte(elements[i]))
policy, err := k8s_utils.GetUnstructured([]byte(elements[i]))
if err != nil {
logger.Error(err, fmt.Sprintf("failed to get policy from Data %.100s", elements[i]))
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions internal/commands/show/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"gopkg.in/yaml.v3"

libsveltosv1beta1 "github.com/projectsveltos/libsveltos/api/v1beta1"
"github.com/projectsveltos/libsveltos/lib/k8s_utils"
logs "github.com/projectsveltos/libsveltos/lib/logsettings"
libsveltosutils "github.com/projectsveltos/libsveltos/lib/utils"
"github.com/projectsveltos/sveltosctl/internal/utils"
)

Expand Down Expand Up @@ -167,7 +167,7 @@ func printResource(resourceStatus *libsveltosv1beta1.ResourceStatus,
return nil
}

resource, err := libsveltosutils.GetUnstructured(resourceStatus.Resource)
resource, err := k8s_utils.GetUnstructured(resourceStatus.Resource)
if err != nil {
logger.V(logs.LogDebug).Info(fmt.Sprintf("failed to get resource %s:%s/%s",
gvk, resourceNamespace, resourceName))
Expand Down

0 comments on commit 97c4fec

Please sign in to comment.