From 65b7d26246b9f6d0afedd6183ae9b6eb8e91ab58 Mon Sep 17 00:00:00 2001 From: Taahir Ahmed Date: Sat, 10 Oct 2020 20:29:26 -0700 Subject: [PATCH] Remove MPL-licensed dep from lruexpirecache github.com/hashicorp/golang-lru is MPL 2 licensed, which means that anyone who distributes code or binaries that incorporates it needs to include its source code, even if they haven't made any modifications. Since lrucacheexpire is picked up as a dependency of using the shared informers in client-go, that's potentially a lot of distributors. Most other deps of client-go are Apache 2.0, MIT, or BSD-like licensed, which only requires including the license. Rather than reverting to groupcache/lru, I just reimplemented the functionality we need, which isn't much. Kubernetes-commit: ecc53182475a00a4a1dc8ca1e056b0deb6bd430c --- go.mod | 9 +++++---- go.sum | 5 ----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 8b2a6470..b75a207c 100644 --- a/go.mod +++ b/go.mod @@ -30,8 +30,8 @@ require ( golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba google.golang.org/protobuf v1.26.0 - k8s.io/api v0.0.0-20210623031714-d4897f24d38d - k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 k8s.io/klog/v2 v2.9.0 k8s.io/utils v0.0.0-20210521133846-da695404a2bc sigs.k8s.io/structured-merge-diff/v4 v4.1.1 @@ -39,6 +39,7 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20210623031714-d4897f24d38d - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go ) diff --git a/go.sum b/go.sum index 35965ccb..48e1a880 100644 --- a/go.sum +++ b/go.sum @@ -134,7 +134,6 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -445,10 +444,6 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20210623031714-d4897f24d38d h1:EIaYOHYm13zWj3myUuVZH9fqSUnAmB7GKoiUoufoZj0= -k8s.io/api v0.0.0-20210623031714-d4897f24d38d/go.mod h1:dPr4vYpBMxtH6RV3Sx1BkuNqvS8PvNu1U1QShIc9EUg= -k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88 h1:9Qc+08Nttbg1dtl8dElWJv9nGb0aMA+Qbx4sXD9iK2E= -k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88/go.mod h1:AZCsxGyiXb/4yTvUIiY+4LESjQ12B77LFrbW2xd61is= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM=