mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-16 16:21:11 +00:00
Add DataSourceRef field to PVC spec
Modify the behavior of the AnyVolumeDataSource alpha feature gate to enable a new field, DataSourceRef, rather than modifying the behavior of the existing DataSource field. This allows addition Volume Populators in a way that doesn't risk breaking backwards compatibility, although it will result in eventually deprecating the DataSource field. Kubernetes-commit: 00dba76918e8ce5b5cff6719bbd64c2cd38ad4e2
This commit is contained in:
parent
4339f1ba5f
commit
0cb2597950
@ -33,6 +33,7 @@ type PersistentVolumeClaimSpecApplyConfiguration struct {
|
|||||||
StorageClassName *string `json:"storageClassName,omitempty"`
|
StorageClassName *string `json:"storageClassName,omitempty"`
|
||||||
VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"`
|
VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"`
|
||||||
DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"`
|
DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"`
|
||||||
|
DataSourceRef *TypedLocalObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeClaimSpecApplyConfiguration constructs an declarative configuration of the PersistentVolumeClaimSpec type for use with
|
// PersistentVolumeClaimSpecApplyConfiguration constructs an declarative configuration of the PersistentVolumeClaimSpec type for use with
|
||||||
@ -98,3 +99,11 @@ func (b *PersistentVolumeClaimSpecApplyConfiguration) WithDataSource(value *Type
|
|||||||
b.DataSource = value
|
b.DataSource = value
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithDataSourceRef sets the DataSourceRef field in the declarative configuration to the given value
|
||||||
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||||
|
// If called multiple times, the DataSourceRef field is set to the value of the last call.
|
||||||
|
func (b *PersistentVolumeClaimSpecApplyConfiguration) WithDataSourceRef(value *TypedLocalObjectReferenceApplyConfiguration) *PersistentVolumeClaimSpecApplyConfiguration {
|
||||||
|
b.DataSourceRef = value
|
||||||
|
return b
|
||||||
|
}
|
||||||
|
@ -4916,6 +4916,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: dataSource
|
- name: dataSource
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.core.v1.TypedLocalObjectReference
|
namedType: io.k8s.api.core.v1.TypedLocalObjectReference
|
||||||
|
- name: dataSourceRef
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.core.v1.TypedLocalObjectReference
|
||||||
- name: resources
|
- name: resources
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.core.v1.ResourceRequirements
|
namedType: io.k8s.api.core.v1.ResourceRequirements
|
||||||
|
Loading…
Reference in New Issue
Block a user