Merge pull request #71302 from liggitt/verify-unit-test-feature-gates
Split mutable and read-only access to feature gates, limit tests to readonly access Kubernetes-commit: 79e5cb2cb7ebc9093fa72f3e8a61085701cb1bd6
This commit is contained in:
commit
db2f9b05a5
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"ImportPath": "k8s.io/apiserver",
|
||||
"GoVersion": "go1.11",
|
||||
"GodepVersion": "v80",
|
||||
"GodepVersion": "v80-k8s-r1",
|
||||
"Packages": [
|
||||
"./..."
|
||||
],
|
||||
|
|
@ -944,347 +944,347 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admission/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/apps/v1beta2",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/auditregistration/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authentication/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/authorization/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/batch/v2alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/certificates/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/coordination/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/core/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/events/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/extensions/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/networking/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/policy/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/rbac/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/scheduling/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/settings/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1alpha1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api/storage/v1beta1",
|
||||
"Rev": "d04500c8c3dda9c980b668c57abc2ca61efcf5c4"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/validation",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/api/validation/path",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/naming",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/rand",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/uuid",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/waitgroup",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||
"Rev": "a5db2f3d07a9c21c0a83f353f010367135099ba8"
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/discovery",
|
||||
|
|
@ -1294,14 +1294,6 @@
|
|||
"ImportPath": "k8s.io/client-go/discovery/fake",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/dynamic",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/admissionregistration",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
|
|
@ -1486,10 +1478,6 @@
|
|||
"ImportPath": "k8s.io/client-go/kubernetes",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/fake",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/scheme",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
|
|
@ -1902,10 +1890,6 @@
|
|||
"ImportPath": "k8s.io/client-go/tools/cache",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/clientcmd",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/clientcmd/api",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
|
|
@ -1926,10 +1910,6 @@
|
|||
"ImportPath": "k8s.io/client-go/tools/pager",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/record",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/reference",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
|
|
@ -1990,6 +1970,90 @@
|
|||
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
|
||||
"Rev": "c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/discovery",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/dynamic",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/informers/auditregistration/v1alpha1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/fake",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/scheme",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/listers/core/v1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/rest",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/testing",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/cache",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/clientcmd",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/clientcmd/api",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/tools/record",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/util/cert",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go/util/flowcontrol",
|
||||
"Rev": "8abb21031259350aad0799bb42ba213ee8bb3399"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/utils/pointer",
|
||||
"Rev": "8e7ff06bf0e2d3289061230af203e430a15b6dcc"
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ func (i *initializer) ValidateInitialization() error {
|
|||
}
|
||||
|
||||
if !utilfeature.DefaultFeatureGate.Enabled(features.Initializers) {
|
||||
if err := utilfeature.DefaultFeatureGate.Set(string(features.Initializers) + "=true"); err != nil {
|
||||
if err := utilfeature.DefaultMutableFeatureGate.Set(string(features.Initializers) + "=true"); err != nil {
|
||||
klog.Errorf("error enabling Initializers feature as part of admission plugin setup: %v", err)
|
||||
} else {
|
||||
klog.Infof("enabled Initializers feature as part of admission plugin setup")
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ const (
|
|||
)
|
||||
|
||||
func init() {
|
||||
utilfeature.DefaultFeatureGate.Add(defaultKubernetesFeatureGates)
|
||||
utilfeature.DefaultMutableFeatureGate.Add(defaultKubernetesFeatureGates)
|
||||
}
|
||||
|
||||
// defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
|
||||
|
|
|
|||
|
|
@ -154,5 +154,5 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) {
|
|||
"handler, which picks a randomized value above this number as the connection timeout, "+
|
||||
"to spread out load.")
|
||||
|
||||
utilfeature.DefaultFeatureGate.AddFlag(fs)
|
||||
utilfeature.DefaultMutableFeatureGate.AddFlag(fs)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,8 +51,15 @@ var (
|
|||
allAlphaGate: setUnsetAlphaGates,
|
||||
}
|
||||
|
||||
// DefaultMutableFeatureGate is a mutable version of DefaultFeatureGate.
|
||||
// Only top-level commands/options setup and the k8s.io/apiserver/pkg/util/feature/testing package should make use of this.
|
||||
// Tests that need to modify feature gates for the duration of their test should use:
|
||||
// defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, <value>)()
|
||||
DefaultMutableFeatureGate MutableFeatureGate = NewFeatureGate()
|
||||
|
||||
// DefaultFeatureGate is a shared global FeatureGate.
|
||||
DefaultFeatureGate FeatureGate = NewFeatureGate()
|
||||
// Top-level commands/options setup that needs to modify this feature gate should use DefaultMutableFeatureGate.
|
||||
DefaultFeatureGate FeatureGate = DefaultMutableFeatureGate
|
||||
)
|
||||
|
||||
type FeatureSpec struct {
|
||||
|
|
@ -72,9 +79,23 @@ const (
|
|||
Deprecated = prerelease("DEPRECATED")
|
||||
)
|
||||
|
||||
// FeatureGate parses and stores flag gates for known features from
|
||||
// a string like feature1=true,feature2=false,...
|
||||
// FeatureGate indicates whether a given feature is enabled or not
|
||||
type FeatureGate interface {
|
||||
// Enabled returns true if the key is enabled.
|
||||
Enabled(key Feature) bool
|
||||
// KnownFeatures returns a slice of strings describing the FeatureGate's known features.
|
||||
KnownFeatures() []string
|
||||
// DeepCopy returns a deep copy of the FeatureGate object, such that gates can be
|
||||
// set on the copy without mutating the original. This is useful for validating
|
||||
// config against potential feature gate changes before committing those changes.
|
||||
DeepCopy() MutableFeatureGate
|
||||
}
|
||||
|
||||
// MutableFeatureGate parses and stores flag gates for known features from
|
||||
// a string like feature1=true,feature2=false,...
|
||||
type MutableFeatureGate interface {
|
||||
FeatureGate
|
||||
|
||||
// AddFlag adds a flag for setting global feature gates to the specified FlagSet.
|
||||
AddFlag(fs *pflag.FlagSet)
|
||||
// Set parses and stores flag gates for known features
|
||||
|
|
@ -82,16 +103,8 @@ type FeatureGate interface {
|
|||
Set(value string) error
|
||||
// SetFromMap stores flag gates for known features from a map[string]bool or returns an error
|
||||
SetFromMap(m map[string]bool) error
|
||||
// Enabled returns true if the key is enabled.
|
||||
Enabled(key Feature) bool
|
||||
// Add adds features to the featureGate.
|
||||
Add(features map[Feature]FeatureSpec) error
|
||||
// KnownFeatures returns a slice of strings describing the FeatureGate's known features.
|
||||
KnownFeatures() []string
|
||||
// DeepCopy returns a deep copy of the FeatureGate object, such that gates can be
|
||||
// set on the copy without mutating the original. This is useful for validating
|
||||
// config against potential feature gate changes before committing those changes.
|
||||
DeepCopy() FeatureGate
|
||||
}
|
||||
|
||||
// featureGate implements FeatureGate as well as pflag.Value for flag parsing.
|
||||
|
|
@ -294,7 +307,7 @@ func (f *featureGate) KnownFeatures() []string {
|
|||
// DeepCopy returns a deep copy of the FeatureGate object, such that gates can be
|
||||
// set on the copy without mutating the original. This is useful for validating
|
||||
// config against potential feature gate changes before committing those changes.
|
||||
func (f *featureGate) DeepCopy() FeatureGate {
|
||||
func (f *featureGate) DeepCopy() MutableFeatureGate {
|
||||
// Copy existing state.
|
||||
known := map[Feature]FeatureSpec{}
|
||||
for k, v := range f.known.Load().(map[Feature]FeatureSpec) {
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ func TestFeatureGateOverride(t *testing.T) {
|
|||
const testBetaGate Feature = "TestBeta"
|
||||
|
||||
// Don't parse the flag, assert defaults are used.
|
||||
var f FeatureGate = NewFeatureGate()
|
||||
var f *featureGate = NewFeatureGate()
|
||||
f.Add(map[Feature]FeatureSpec{
|
||||
testAlphaGate: {Default: false, PreRelease: Alpha},
|
||||
testBetaGate: {Default: false, PreRelease: Beta},
|
||||
|
|
@ -177,7 +177,7 @@ func TestFeatureGateFlagDefaults(t *testing.T) {
|
|||
const testBetaGate Feature = "TestBeta"
|
||||
|
||||
// Don't parse the flag, assert defaults are used.
|
||||
var f FeatureGate = NewFeatureGate()
|
||||
var f *featureGate = NewFeatureGate()
|
||||
f.Add(map[Feature]FeatureSpec{
|
||||
testAlphaGate: {Default: false, PreRelease: Alpha},
|
||||
testBetaGate: {Default: true, PreRelease: Beta},
|
||||
|
|
@ -201,7 +201,7 @@ func TestFeatureGateKnownFeatures(t *testing.T) {
|
|||
)
|
||||
|
||||
// Don't parse the flag, assert defaults are used.
|
||||
var f FeatureGate = NewFeatureGate()
|
||||
var f *featureGate = NewFeatureGate()
|
||||
f.Add(map[Feature]FeatureSpec{
|
||||
testAlphaGate: {Default: false, PreRelease: Alpha},
|
||||
testBetaGate: {Default: true, PreRelease: Beta},
|
||||
|
|
|
|||
|
|
@ -18,67 +18,27 @@ package testing
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"k8s.io/apiserver/pkg/util/feature"
|
||||
)
|
||||
|
||||
// VerifyFeatureGatesUnchanged ensures the provided gate does not change any values when tests() are completed.
|
||||
// Intended to be placed into unit test packages that mess with feature gates.
|
||||
//
|
||||
// Example use:
|
||||
//
|
||||
// import (
|
||||
// "testing"
|
||||
//
|
||||
// utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
// utilfeaturetesting "k8s.io/apiserver/pkg/util/feature/testing"
|
||||
// _ "k8s.io/kubernetes/pkg/features"
|
||||
// )
|
||||
//
|
||||
// func TestMain(m *testing.M) {
|
||||
// utilfeaturetesting.VerifyFeatureGatesUnchanged(utilfeature.DefaultFeatureGate, m.Run)
|
||||
// }
|
||||
func VerifyFeatureGatesUnchanged(gate feature.FeatureGate, tests func() int) {
|
||||
originalGates := gate.DeepCopy()
|
||||
originalSet := fmt.Sprint(gate)
|
||||
|
||||
rc := tests()
|
||||
|
||||
finalSet := fmt.Sprint(gate)
|
||||
if finalSet != originalSet {
|
||||
for _, kv := range strings.Split(finalSet, ",") {
|
||||
k := strings.Split(kv, "=")[0]
|
||||
if originalGates.Enabled(feature.Feature(k)) != gate.Enabled(feature.Feature(k)) {
|
||||
fmt.Println(fmt.Sprintf("VerifyFeatureGatesUnchanged: mutated %s feature gate from %v to %v", k, originalGates.Enabled(feature.Feature(k)), gate.Enabled(feature.Feature(k))))
|
||||
rc = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if rc != 0 {
|
||||
os.Exit(rc)
|
||||
}
|
||||
}
|
||||
|
||||
// SetFeatureGateDuringTest sets the specified gate to the specified value, and returns a function that restores the original value.
|
||||
// Failures to set or restore cause the test to fail.
|
||||
//
|
||||
// Example use:
|
||||
//
|
||||
// defer utilfeaturetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.<FeatureName>, true)()
|
||||
func SetFeatureGateDuringTest(t *testing.T, gate feature.FeatureGate, feature feature.Feature, value bool) func() {
|
||||
originalValue := gate.Enabled(feature)
|
||||
func SetFeatureGateDuringTest(t *testing.T, gate feature.FeatureGate, f feature.Feature, value bool) func() {
|
||||
originalValue := gate.Enabled(f)
|
||||
|
||||
if err := gate.Set(fmt.Sprintf("%s=%v", feature, value)); err != nil {
|
||||
t.Errorf("error setting %s=%v: %v", feature, value, err)
|
||||
if err := gate.(feature.MutableFeatureGate).Set(fmt.Sprintf("%s=%v", f, value)); err != nil {
|
||||
t.Errorf("error setting %s=%v: %v", f, value, err)
|
||||
}
|
||||
|
||||
return func() {
|
||||
if err := gate.Set(fmt.Sprintf("%s=%v", feature, originalValue)); err != nil {
|
||||
t.Errorf("error restoring %s=%v: %v", feature, originalValue, err)
|
||||
if err := gate.(feature.MutableFeatureGate).Set(fmt.Sprintf("%s=%v", f, originalValue)); err != nil {
|
||||
t.Errorf("error restoring %s=%v: %v", f, originalValue, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue