Skip to content

Commit

Permalink
Update deps (#77)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Jan 6, 2024
1 parent cd32078 commit 49a0c0b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
go.mongodb.org/mongo-driver v1.10.2
k8s.io/api v0.29.0
k8s.io/klog/v2 v2.110.1
kmodules.xyz/client-go v0.29.5
kubedb.dev/apimachinery v0.40.1-0.20240104031132-a1d475ceb73e
kmodules.xyz/client-go v0.29.6-0.20240106073345-92f92b4d6985
kubedb.dev/apimachinery v0.40.1-0.20240106103518-87c402a1ae51
sigs.k8s.io/controller-runtime v0.16.3
xorm.io/xorm v1.3.2
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -782,16 +782,16 @@ k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6R
k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/client-go v0.29.5 h1:iRl4MoV+96TM1csInOCWjn5xSOXzuYlil6CO40vXLHU=
kmodules.xyz/client-go v0.29.5/go.mod h1:pHuzpwzEcDUIGjVVvwz9N8lY+6A7HXwvs2d7NtK7Hho=
kmodules.xyz/client-go v0.29.6-0.20240106073345-92f92b4d6985 h1:TrYD40aWXVm+8KkFoQ+FSw5rr6DN2EwjYX9MCzy5y3c=
kmodules.xyz/client-go v0.29.6-0.20240106073345-92f92b4d6985/go.mod h1:pHuzpwzEcDUIGjVVvwz9N8lY+6A7HXwvs2d7NtK7Hho=
kmodules.xyz/custom-resources v0.29.0 h1:RaDM2+wSVXiwIvLqmkTVYpwoH83AC8wruXe2p2rOZNY=
kmodules.xyz/custom-resources v0.29.0/go.mod h1:MzZyXtxdg1PDxGk3RTTO1Xv3KiVqZnIonSwmxVbagOY=
kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9H1UFRwB4=
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY=
kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw=
kubedb.dev/apimachinery v0.40.1-0.20240104031132-a1d475ceb73e h1:W4P/V/i6PkCL6ODaG7M2669AhhnRv8PYhvOFHTrVeWg=
kubedb.dev/apimachinery v0.40.1-0.20240104031132-a1d475ceb73e/go.mod h1:pa3rY23DEC7j4c0H2uIe6uG7YUbNnT1qA3p7UBr3pwQ=
kubedb.dev/apimachinery v0.40.1-0.20240106103518-87c402a1ae51 h1:6RgHui7DPEXOSGIAWY9N3gytdbQHH1Yry2hwKSQdDsc=
kubedb.dev/apimachinery v0.40.1-0.20240106103518-87c402a1ae51/go.mod h1:pa3rY23DEC7j4c0H2uIe6uG7YUbNnT1qA3p7UBr3pwQ=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
Expand Down
20 changes: 20 additions & 0 deletions vendor/kmodules.xyz/client-go/apiextensions/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,23 @@ func WaitForCRDReady(client crd_cs.Interface, crds []*CustomResourceDefinition)
})
return errors.Wrap(err, "timed out waiting for CRD")
}

func RemoveCRDs(client crd_cs.Interface, crds []*CustomResourceDefinition) error {
for _, crd := range crds {
// Use crd v1 for k8s >= 1.16, if available
// ref: https://github.com/kubernetes/kubernetes/issues/91395
if crd.V1 == nil {
gvr := schema.GroupVersionResource{
Group: crd.V1beta1.Spec.Group,
Version: crd.V1beta1.Spec.Versions[0].Name,
Resource: crd.V1beta1.Spec.Names.Plural,
}
return fmt.Errorf("missing V1 definition for %s", gvr)
}
err := client.ApiextensionsV1().CustomResourceDefinitions().Delete(context.TODO(), crd.V1.Name, metav1.DeleteOptions{})
if err != nil && !kerr.IsNotFound(err) {
return err
}
}
return nil
}
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ k8s.io/utils/trace
# kmodules.xyz/apiversion v0.2.0
## explicit; go 1.14
kmodules.xyz/apiversion
# kmodules.xyz/client-go v0.29.5
# kmodules.xyz/client-go v0.29.6-0.20240106073345-92f92b4d6985
## explicit; go 1.21.5
kmodules.xyz/client-go
kmodules.xyz/client-go/api/v1
Expand All @@ -1317,7 +1317,7 @@ kmodules.xyz/monitoring-agent-api/api/v1
# kmodules.xyz/offshoot-api v0.29.0
## explicit; go 1.21.5
kmodules.xyz/offshoot-api/api/v1
# kubedb.dev/apimachinery v0.40.1-0.20240104031132-a1d475ceb73e
# kubedb.dev/apimachinery v0.40.1-0.20240106103518-87c402a1ae51
## explicit; go 1.21.5
kubedb.dev/apimachinery/apis
kubedb.dev/apimachinery/apis/catalog
Expand Down

0 comments on commit 49a0c0b

Please sign in to comment.