Skip to content

Commit f7cc9e3

Browse files
authored
Merge pull request #907 from xing-yang/remove_k8s_dep
Remove direct dependency on k8s.io/kubernetes
2 parents 3cccd02 + fd03420 commit f7cc9e3

File tree

6 files changed

+7
-212
lines changed

6 files changed

+7
-212
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ require (
2323
k8s.io/component-base v0.28.0
2424
k8s.io/component-helpers v0.28.0
2525
k8s.io/klog/v2 v2.100.1
26-
k8s.io/kubernetes v1.28.0
2726
)
2827

2928
require (

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,6 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
338338
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
339339
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=
340340
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM=
341-
k8s.io/kubernetes v1.28.0 h1:p8qq/VoNHnBWinLEi5LO2IvCfzFouN7Jhdz8+L++V+U=
342-
k8s.io/kubernetes v1.28.0/go.mod h1:rBQpjGYlLBV0KuOLw8EG45N5EBCskWiPpi0xy5liHMI=
343341
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
344342
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
345343
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=

pkg/validation-webhook/convert_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ import (
3030
"k8s.io/apimachinery/pkg/runtime"
3131
"k8s.io/apimachinery/pkg/runtime/serializer"
3232
"k8s.io/apimachinery/pkg/util/diff"
33-
admissionfuzzer "k8s.io/kubernetes/pkg/apis/admission/fuzzer"
3433
)
3534

3635
func TestConvertAdmissionRequestToV1(t *testing.T) {
37-
f := fuzzer.FuzzerFor(admissionfuzzer.Funcs, rand.NewSource(rand.Int63()), serializer.NewCodecFactory(runtime.NewScheme()))
36+
f := fuzzer.FuzzerFor(AdmissionfuzzerFuncs, rand.NewSource(rand.Int63()), serializer.NewCodecFactory(runtime.NewScheme()))
3837
for i := 0; i < 100; i++ {
3938
t.Run(fmt.Sprintf("Run %d/100", i), func(t *testing.T) {
4039
orig := &v1beta1.AdmissionRequest{}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package fuzzer
17+
// NOTE: This file is copied from
18+
// https://github.com/kubernetes/kubernetes/blob/v1.29.0-alpha.0/pkg/apis/admission/fuzzer/fuzzer.go
19+
// so that external-snapshotter no longer needs to depend on k8s.io/kubernetes
20+
21+
package webhook
1822

1923
import (
2024
fuzz "github.com/google/gofuzz"
@@ -25,7 +29,7 @@ import (
2529
)
2630

2731
// Funcs returns the fuzzer functions for the admission api group.
28-
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
32+
var AdmissionfuzzerFuncs = func(codecs runtimeserializer.CodecFactory) []interface{} {
2933
return []interface{}{
3034
func(s *runtime.RawExtension, c fuzz.Continue) {
3135
u := &unstructured.Unstructured{Object: map[string]interface{}{

vendor/k8s.io/kubernetes/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

vendor/modules.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,6 @@ k8s.io/kube-openapi/pkg/schemamutation
745745
k8s.io/kube-openapi/pkg/spec3
746746
k8s.io/kube-openapi/pkg/util/proto
747747
k8s.io/kube-openapi/pkg/validation/spec
748-
# k8s.io/kubernetes v1.28.0
749-
## explicit; go 1.20
750-
k8s.io/kubernetes/pkg/apis/admission/fuzzer
751748
# k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
752749
## explicit; go 1.18
753750
k8s.io/utils/buffer

0 commit comments

Comments
 (0)