From 0db76b042441b037d3e442e0bb427c0b9c9057f9 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 | 17 +++++++++-------- go.sum | 9 --------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index c794dc15..c8dd2d9f 100644 --- a/go.mod +++ b/go.mod @@ -5,16 +5,17 @@ module k8s.io/sample-controller go 1.16 require ( - k8s.io/api v0.0.0-20210619071639-0f1d05d0f338 - k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88 - k8s.io/client-go v0.0.0-20210619071903-3fae6f05ac95 - k8s.io/code-generator v0.0.0-20210619071330-723f918dc760 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 + k8s.io/client-go v0.0.0 + k8s.io/code-generator v0.0.0 k8s.io/klog/v2 v2.9.0 ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20210619071639-0f1d05d0f338 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210619071501-4713ab59dd88 - k8s.io/client-go => k8s.io/client-go v0.0.0-20210619071903-3fae6f05ac95 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20210619071330-723f918dc760 + k8s.io/api => ../api + k8s.io/apimachinery => ../apimachinery + k8s.io/client-go => ../client-go + k8s.io/code-generator => ../code-generator + k8s.io/sample-controller => ../sample-controller ) diff --git a/go.sum b/go.sum index c40f25dd..4eca9406 100644 --- a/go.sum +++ b/go.sum @@ -133,7 +133,6 @@ github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97Dwqy github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 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= @@ -454,14 +453,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-20210619071639-0f1d05d0f338 h1:I2xy7G2dXwWm4wOW7Bq1ZrGipGsH8DtdxfUweLBbqYg= -k8s.io/api v0.0.0-20210619071639-0f1d05d0f338/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/client-go v0.0.0-20210619071903-3fae6f05ac95 h1:Wp1xPF8rzpQlkLEPswI7WKJjUQosHDZuXQRXIj1T1Z8= -k8s.io/client-go v0.0.0-20210619071903-3fae6f05ac95/go.mod h1:KdxPzTHgLRCmXpcnSOA+LaZEp8WyV8TQMVbFMTeJWIA= -k8s.io/code-generator v0.0.0-20210619071330-723f918dc760 h1:Yg2GXjvhtHqrz/H8tafP1L4OZyRleZas4cLVMAAFKt4= -k8s.io/code-generator v0.0.0-20210619071330-723f918dc760/go.mod h1:lBZLjrQ5bAwlmQalYYgV0gH3G7SS+Z2d33ijEte85FY= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 h1:Uusb3oh8XcdzDF/ndlI4ToKTYVlkCSJP39SRY2mfRAw= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=