update integration tests to reflect the kube version to stop serving removed APIs

This commit is contained in:
David Eads
2021-05-11 15:17:40 -04:00
parent d3e702fa99
commit d6a4afa5b8
5 changed files with 14 additions and 2 deletions

View File

@@ -593,6 +593,8 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G
APIServerID: c.APIServerID,
StorageVersionManager: c.StorageVersionManager,
Version: c.Version,
}
for {

View File

@@ -83,6 +83,7 @@ func NewResourceExpirationEvaluator(currentVersion apimachineryversion.Info) (Re
} else {
ret.strictRemovedHandlingInAlpha = envBool
}
if envString, ok := os.LookupEnv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE"); !ok {
// do nothing
} else if envBool, err := strconv.ParseBool(envString); err != nil {

View File

@@ -34,6 +34,7 @@ import (
"k8s.io/apimachinery/pkg/util/clock"
"k8s.io/apimachinery/pkg/util/sets"
utilwaitgroup "k8s.io/apimachinery/pkg/util/waitgroup"
"k8s.io/apimachinery/pkg/version"
"k8s.io/apiserver/pkg/admission"
"k8s.io/apiserver/pkg/audit"
"k8s.io/apiserver/pkg/authorization/authorizer"
@@ -209,6 +210,9 @@ type GenericAPIServer struct {
// StorageVersionManager holds the storage versions of the API resources installed by this server.
StorageVersionManager storageversion.Manager
// Version will enable the /version endpoint if non-nil
Version *version.Info
}
// DelegationTarget is an interface which allows for composition of API servers with top level handling that works