mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes to v1.21.2
Updated kubernetes packages to latest release. resizefs package has been included into k8s.io/mount-utils package. updated code to use the same. Updates: #1968 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
32
vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
generated
vendored
32
vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
generated
vendored
@ -129,12 +129,6 @@ func (s *Scheme) nameFunc(t reflect.Type) string {
|
||||
return gvks[0].Kind
|
||||
}
|
||||
|
||||
// fromScope gets the input version, desired output version, and desired Scheme
|
||||
// from a conversion.Scope.
|
||||
func (s *Scheme) fromScope(scope conversion.Scope) *Scheme {
|
||||
return s
|
||||
}
|
||||
|
||||
// Converter allows access to the converter for the scheme
|
||||
func (s *Scheme) Converter() *conversion.Converter {
|
||||
return s.converter
|
||||
@ -235,6 +229,32 @@ func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type {
|
||||
return types
|
||||
}
|
||||
|
||||
// VersionsForGroupKind returns the versions that a particular GroupKind can be converted to within the given group.
|
||||
// A GroupKind might be converted to a different group. That information is available in EquivalentResourceMapper.
|
||||
func (s *Scheme) VersionsForGroupKind(gk schema.GroupKind) []schema.GroupVersion {
|
||||
availableVersions := []schema.GroupVersion{}
|
||||
for gvk := range s.gvkToType {
|
||||
if gk != gvk.GroupKind() {
|
||||
continue
|
||||
}
|
||||
|
||||
availableVersions = append(availableVersions, gvk.GroupVersion())
|
||||
}
|
||||
|
||||
// order the return for stability
|
||||
ret := []schema.GroupVersion{}
|
||||
for _, version := range s.PrioritizedVersionsForGroup(gk.Group) {
|
||||
for _, availableVersion := range availableVersions {
|
||||
if version != availableVersion {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, availableVersion)
|
||||
}
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
// AllKnownTypes returns the all known types.
|
||||
func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type {
|
||||
return s.gvkToType
|
||||
|
Reference in New Issue
Block a user