mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update K8s packages to v0.32.1
Update K8s packages in go.mod to v0.32.1 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
14
vendor/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go
generated
vendored
14
vendor/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
apimachineryversion "k8s.io/apimachinery/pkg/util/version"
|
||||
"k8s.io/apiserver/pkg/util/version"
|
||||
version "k8s.io/component-base/version"
|
||||
)
|
||||
|
||||
type ResourceEncodingConfig interface {
|
||||
@ -117,6 +117,10 @@ type introducedInterface interface {
|
||||
APILifecycleIntroduced() (major, minor int)
|
||||
}
|
||||
|
||||
type replacementInterface interface {
|
||||
APILifecycleReplacement() schema.GroupVersionKind
|
||||
}
|
||||
|
||||
func emulatedStorageVersion(binaryVersionOfResource schema.GroupVersion, example runtime.Object, effectiveVersion version.EffectiveVersion, scheme *runtime.Scheme) (schema.GroupVersion, error) {
|
||||
if example == nil || effectiveVersion == nil {
|
||||
return binaryVersionOfResource, nil
|
||||
@ -170,6 +174,14 @@ func emulatedStorageVersion(binaryVersionOfResource schema.GroupVersion, example
|
||||
// If it was introduced after current compatibility version, don't use it
|
||||
// skip the introduced check for test when currentVersion is 0.0 to test all apis
|
||||
if introduced, hasIntroduced := exampleOfGVK.(introducedInterface); hasIntroduced && (compatibilityVersion.Major() > 0 || compatibilityVersion.Minor() > 0) {
|
||||
|
||||
// Skip versions that have a replacement.
|
||||
// This can be used to override this storage version selection by
|
||||
// marking a storage version has having a replacement and preventing a
|
||||
// that storage version from being selected.
|
||||
if _, hasReplacement := exampleOfGVK.(replacementInterface); hasReplacement {
|
||||
continue
|
||||
}
|
||||
// API resource lifecycles should be relative to k8s api version
|
||||
majorIntroduced, minorIntroduced := introduced.APILifecycleIntroduced()
|
||||
introducedVer := apimachineryversion.MajorMinor(uint(majorIntroduced), uint(minorIntroduced))
|
||||
|
Reference in New Issue
Block a user