Add servedVersions info in StorageVersion API

Kubernetes-commit: 1c48b7ec144785b4b2493a01d82e40d6d34ce578
This commit is contained in:
Richa Banker 2023-06-01 18:07:56 -07:00 committed by Kubernetes Publisher
parent 0cde78477a
commit 61c0de83db
2 changed files with 17 additions and 0 deletions

View File

@ -24,6 +24,7 @@ type ServerStorageVersionApplyConfiguration struct {
APIServerID *string `json:"apiServerID,omitempty"`
EncodingVersion *string `json:"encodingVersion,omitempty"`
DecodableVersions []string `json:"decodableVersions,omitempty"`
ServedVersions []string `json:"servedVersions,omitempty"`
}
// ServerStorageVersionApplyConfiguration constructs an declarative configuration of the ServerStorageVersion type for use with
@ -57,3 +58,13 @@ func (b *ServerStorageVersionApplyConfiguration) WithDecodableVersions(values ..
}
return b
}
// WithServedVersions adds the given value to the ServedVersions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ServedVersions field.
func (b *ServerStorageVersionApplyConfiguration) WithServedVersions(values ...string) *ServerStorageVersionApplyConfiguration {
for i := range values {
b.ServedVersions = append(b.ServedVersions, values[i])
}
return b
}

View File

@ -695,6 +695,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: encodingVersion
type:
scalar: string
- name: servedVersions
type:
list:
elementType:
scalar: string
elementRelationship: associative
- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersion
map:
fields: