mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Set omitempty on DataSource for snapshot on PVCs
Add "omitempty" to spec.dataSource like it is done for all other optional fields too. Serialized code creates otherwise "null" fields and some introspection tools rely on that value to determine if a value is optional or required.
This commit is contained in:
parent
152226c557
commit
f866ca079a
@ -467,7 +467,7 @@ type PersistentVolumeClaimSpec struct {
|
||||
// In the future, we plan to support more data source types and the behavior
|
||||
// of the provisioner may change.
|
||||
// +optional
|
||||
DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"`
|
||||
DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" protobuf:"bytes,7,opt,name=dataSource"`
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
|
||||
|
Loading…
Reference in New Issue
Block a user