From 45db9bc930e5e97b8801247451fdec22554d4c9a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 24 Nov 2024 06:08:10 +0000 Subject: [PATCH] fix(deps): update github.com/longhorn/go-common-libs digest to d622157 --- go.mod | 2 +- go.sum | 4 ++-- .../go-common-libs/kubernetes/deployment.go | 23 +++++++++++++++++++ vendor/modules.txt | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 vendor/github.com/longhorn/go-common-libs/kubernetes/deployment.go diff --git a/go.mod b/go.mod index 1f84b41f..670271b8 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ replace ( require ( github.com/google/fscrypt v0.3.5 - github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce + github.com/longhorn/go-common-libs v0.0.0-20241124035508-d6221574e626 github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab github.com/mitchellh/go-ps v1.0.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 4bc24095..90929a89 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce h1:6hmmPtH5KRosHGvs3XTXhJ3NLKvrQmgihcBcZyf/KHw= -github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce/go.mod h1:bzIBhK5G4/qrGy6LKu6b2Z1SdzwICqCQoYQXYQI2orQ= +github.com/longhorn/go-common-libs v0.0.0-20241124035508-d6221574e626 h1:6RHxLM2DLwr7FrDn6yyryEXwa7yN01fcZfIyllxmBss= +github.com/longhorn/go-common-libs v0.0.0-20241124035508-d6221574e626/go.mod h1:gSa+qB058kcNlCaOOwIFPHb3tvqMTmKcxtL7HPTS4o4= github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab h1:vW/sSHB0U/GPnornD1cdoKSEe9bdBwVKP68cZUs1Xh0= github.com/longhorn/types v0.0.0-20241123075624-48c550af4eab/go.mod h1:dIPa2yMBPOa514bn3pohT7kbVAQcZbZSWItpgxunuPs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= diff --git a/vendor/github.com/longhorn/go-common-libs/kubernetes/deployment.go b/vendor/github.com/longhorn/go-common-libs/kubernetes/deployment.go new file mode 100644 index 00000000..d879832b --- /dev/null +++ b/vendor/github.com/longhorn/go-common-libs/kubernetes/deployment.go @@ -0,0 +1,23 @@ +package kubernetes + +import ( + "context" + + "github.com/sirupsen/logrus" + + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubeclient "k8s.io/client-go/kubernetes" +) + +// GetDeployment returns the Deployment with the given name in the given namespace. +func GetDeployment(kubeClient kubeclient.Interface, namespace, name string) (*appsv1.Deployment, error) { + log := logrus.WithFields(logrus.Fields{ + "kind": "Deployment", + "namespace": namespace, + "name": name, + }) + log.Trace("Getting resource") + + return kubeClient.AppsV1().Deployments(namespace).Get(context.Background(), name, metav1.GetOptions{}) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index a37f4693..37457e2e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -67,7 +67,7 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/longhorn/go-common-libs v0.0.0-20241123075700-b6fce15463ce +# github.com/longhorn/go-common-libs v0.0.0-20241124035508-d6221574e626 ## explicit; go 1.22.7 github.com/longhorn/go-common-libs/exec github.com/longhorn/go-common-libs/io