From dc4f6f9da6a7d6efbfe7a0eebc922e41808610ec Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Sat, 15 Apr 2023 14:21:19 +0300 Subject: [PATCH 1/2] e2e framework: remove last dependency to k/k/pkg/util Copied and modified RemoveString function from k/k/pkg/util/slice/slice.go to e2e/framework/pod/pod_client.go This is the last dependency from e2e framework to k/k/pkg/util --- test/e2e/framework/pod/pod_client.go | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/pod/pod_client.go b/test/e2e/framework/pod/pod_client.go index 25c05ab44c5..7289c184526 100644 --- a/test/e2e/framework/pod/pod_client.go +++ b/test/e2e/framework/pod/pod_client.go @@ -38,7 +38,6 @@ import ( "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "k8s.io/kubernetes/pkg/util/slice" "k8s.io/kubernetes/test/e2e/framework" ) @@ -313,10 +312,29 @@ func (c *PodClient) PodIsReady(ctx context.Context, name string) bool { return podutils.IsPodReady(pod) } +// RemoveString returns a newly created []string that contains all items from slice +// that are not equal to s. +// This code is taken from k/k/pkg/util/slice/slice.go to remove +// e2e/framework/pod -> k/k/pkg/util/slice dependency. +func removeString(slice []string, s string) []string { + newSlice := make([]string, 0) + for _, item := range slice { + if item != s { + newSlice = append(newSlice, item) + } + } + if len(newSlice) == 0 { + // Sanitize for unit tests so we don't need to distinguish empty array + // and nil. + return nil + } + return newSlice +} + // RemovePodFinalizer removes the pod's finalizer func (c *PodClient) RemoveFinalizer(ctx context.Context, podName string, finalizerName string) { framework.Logf("Removing pod's %q finalizer: %q", podName, finalizerName) c.Update(ctx, podName, func(pod *v1.Pod) { - pod.ObjectMeta.Finalizers = slice.RemoveString(pod.ObjectMeta.Finalizers, finalizerName, nil) + pod.ObjectMeta.Finalizers = removeString(pod.ObjectMeta.Finalizers, finalizerName) }) } From ff9ebfa90def73bdc56960795270113cbb4c0f4e Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Sat, 15 Apr 2023 14:16:20 +0300 Subject: [PATCH 2/2] e2e framework: control k/k/pkg imports Modified import restrictions for the e2e framework submodules to enable control of the k/k/pkg imports. --- test/e2e/framework/auth/.import-restrictions | 7 +++++-- test/e2e/framework/autoscaling/.import-restrictions | 8 ++++++-- test/e2e/framework/config/.import-restrictions | 7 +++++-- test/e2e/framework/debug/.import-restrictions | 8 ++++++-- test/e2e/framework/deployment/.import-restrictions | 8 ++++++-- test/e2e/framework/endpoints/.import-restrictions | 7 +++++-- test/e2e/framework/endpointslice/.import-restrictions | 7 +++++-- test/e2e/framework/events/.import-restrictions | 7 +++++-- test/e2e/framework/gpu/.import-restrictions | 7 +++++-- test/e2e/framework/ingress/.import-restrictions | 8 ++++++-- test/e2e/framework/internal/.import-restrictions | 7 +++++-- test/e2e/framework/job/.import-restrictions | 7 +++++-- test/e2e/framework/kubectl/.import-restrictions | 8 ++++++-- test/e2e/framework/kubelet/.import-restrictions | 8 ++++++-- test/e2e/framework/kubesystem/.import-restrictions | 7 +++++-- test/e2e/framework/manifest/.import-restrictions | 7 +++++-- test/e2e/framework/metrics/.import-restrictions | 8 ++++++-- test/e2e/framework/network/.import-restrictions | 8 ++++++-- test/e2e/framework/node/.import-restrictions | 8 ++++++-- test/e2e/framework/perf/.import-restrictions | 8 ++++++-- test/e2e/framework/pod/.import-restrictions | 8 ++++++-- test/e2e/framework/providers/.import-restrictions | 8 ++++++-- test/e2e/framework/providers/gce/.import-restrictions | 9 +++++++++ .../framework/providers/kubemark/.import-restrictions | 9 +++++++++ test/e2e/framework/replicaset/.import-restrictions | 7 +++++-- test/e2e/framework/resource/.import-restrictions | 8 ++++++-- test/e2e/framework/security/.import-restrictions | 8 ++++++-- test/e2e/framework/service/.import-restrictions | 8 ++++++-- test/e2e/framework/ssh/.import-restrictions | 7 +++++-- test/e2e/framework/testfiles/.import-restrictions | 7 +++++-- test/e2e/framework/timer/.import-restrictions | 7 +++++-- test/e2e/framework/websocket/.import-restrictions | 7 +++++-- 32 files changed, 183 insertions(+), 60 deletions(-) create mode 100644 test/e2e/framework/providers/gce/.import-restrictions create mode 100644 test/e2e/framework/providers/kubemark/.import-restrictions diff --git a/test/e2e/framework/auth/.import-restrictions b/test/e2e/framework/auth/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/auth/.import-restrictions +++ b/test/e2e/framework/auth/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/autoscaling/.import-restrictions b/test/e2e/framework/autoscaling/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/autoscaling/.import-restrictions +++ b/test/e2e/framework/autoscaling/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/config/.import-restrictions b/test/e2e/framework/config/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/config/.import-restrictions +++ b/test/e2e/framework/config/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/debug/.import-restrictions b/test/e2e/framework/debug/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/debug/.import-restrictions +++ b/test/e2e/framework/debug/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/deployment/.import-restrictions b/test/e2e/framework/deployment/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/deployment/.import-restrictions +++ b/test/e2e/framework/deployment/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/endpoints/.import-restrictions b/test/e2e/framework/endpoints/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/endpoints/.import-restrictions +++ b/test/e2e/framework/endpoints/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/endpointslice/.import-restrictions b/test/e2e/framework/endpointslice/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/endpointslice/.import-restrictions +++ b/test/e2e/framework/endpointslice/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/events/.import-restrictions b/test/e2e/framework/events/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/events/.import-restrictions +++ b/test/e2e/framework/events/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/gpu/.import-restrictions b/test/e2e/framework/gpu/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/gpu/.import-restrictions +++ b/test/e2e/framework/gpu/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/ingress/.import-restrictions b/test/e2e/framework/ingress/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/ingress/.import-restrictions +++ b/test/e2e/framework/ingress/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/internal/.import-restrictions b/test/e2e/framework/internal/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/internal/.import-restrictions +++ b/test/e2e/framework/internal/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/job/.import-restrictions b/test/e2e/framework/job/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/job/.import-restrictions +++ b/test/e2e/framework/job/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/kubectl/.import-restrictions b/test/e2e/framework/kubectl/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/kubectl/.import-restrictions +++ b/test/e2e/framework/kubectl/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/kubelet/.import-restrictions b/test/e2e/framework/kubelet/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/kubelet/.import-restrictions +++ b/test/e2e/framework/kubelet/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/kubesystem/.import-restrictions b/test/e2e/framework/kubesystem/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/kubesystem/.import-restrictions +++ b/test/e2e/framework/kubesystem/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/manifest/.import-restrictions b/test/e2e/framework/manifest/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/manifest/.import-restrictions +++ b/test/e2e/framework/manifest/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/metrics/.import-restrictions b/test/e2e/framework/metrics/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/metrics/.import-restrictions +++ b/test/e2e/framework/metrics/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/network/.import-restrictions b/test/e2e/framework/network/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/network/.import-restrictions +++ b/test/e2e/framework/network/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/node/.import-restrictions b/test/e2e/framework/node/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/node/.import-restrictions +++ b/test/e2e/framework/node/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/perf/.import-restrictions b/test/e2e/framework/perf/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/perf/.import-restrictions +++ b/test/e2e/framework/perf/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/pod/.import-restrictions b/test/e2e/framework/pod/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/pod/.import-restrictions +++ b/test/e2e/framework/pod/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/providers/.import-restrictions b/test/e2e/framework/providers/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/providers/.import-restrictions +++ b/test/e2e/framework/providers/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/providers/gce/.import-restrictions b/test/e2e/framework/providers/gce/.import-restrictions new file mode 100644 index 00000000000..fdd90e600b5 --- /dev/null +++ b/test/e2e/framework/providers/gce/.import-restrictions @@ -0,0 +1,9 @@ +# This E2E framework sub-package is currently allowed to use arbitrary +# dependencies, therefore we need to override the restrictions from +# the parent .import-restrictions file. +# +# At some point it may become useful to also check this package's +# dependencies more careful. +rules: + - selectorRegexp: "" + allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/providers/kubemark/.import-restrictions b/test/e2e/framework/providers/kubemark/.import-restrictions new file mode 100644 index 00000000000..fdd90e600b5 --- /dev/null +++ b/test/e2e/framework/providers/kubemark/.import-restrictions @@ -0,0 +1,9 @@ +# This E2E framework sub-package is currently allowed to use arbitrary +# dependencies, therefore we need to override the restrictions from +# the parent .import-restrictions file. +# +# At some point it may become useful to also check this package's +# dependencies more careful. +rules: + - selectorRegexp: "" + allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/replicaset/.import-restrictions b/test/e2e/framework/replicaset/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/replicaset/.import-restrictions +++ b/test/e2e/framework/replicaset/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/resource/.import-restrictions b/test/e2e/framework/resource/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/resource/.import-restrictions +++ b/test/e2e/framework/resource/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/security/.import-restrictions b/test/e2e/framework/security/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/security/.import-restrictions +++ b/test/e2e/framework/security/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/service/.import-restrictions b/test/e2e/framework/service/.import-restrictions index fdd90e600b5..c72fb309362 100644 --- a/test/e2e/framework/service/.import-restrictions +++ b/test/e2e/framework/service/.import-restrictions @@ -1,9 +1,13 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: + - k8s.io/kubernetes/pkg/api/v1/pod + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/ssh/.import-restrictions b/test/e2e/framework/ssh/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/ssh/.import-restrictions +++ b/test/e2e/framework/ssh/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/testfiles/.import-restrictions b/test/e2e/framework/testfiles/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/testfiles/.import-restrictions +++ b/test/e2e/framework/testfiles/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/timer/.import-restrictions b/test/e2e/framework/timer/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/timer/.import-restrictions +++ b/test/e2e/framework/timer/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ] diff --git a/test/e2e/framework/websocket/.import-restrictions b/test/e2e/framework/websocket/.import-restrictions index fdd90e600b5..03b5ee5ec2c 100644 --- a/test/e2e/framework/websocket/.import-restrictions +++ b/test/e2e/framework/websocket/.import-restrictions @@ -1,9 +1,12 @@ # This E2E framework sub-package is currently allowed to use arbitrary -# dependencies, therefore we need to override the restrictions from -# the parent .import-restrictions file. +# dependencies except of k/k/pkg, therefore we need to override the +# restrictions from the parent .import-restrictions file. # # At some point it may become useful to also check this package's # dependencies more careful. rules: + - selectorRegexp: "^k8s[.]io/kubernetes/pkg" + allowedPrefixes: [] + - selectorRegexp: "" allowedPrefixes: [ "" ]