mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Add TypedLocalObjectReference and DataSource
This PR adds TypedLocalObjectReference in the core API and adds DataSource in PersistentVolumeClaimSpec.
This commit is contained in:
parent
d46d67159f
commit
e4c82b3d7b
@ -413,6 +413,9 @@ type PersistentVolumeClaimSpec struct {
|
|||||||
// This is an alpha feature and may change in the future.
|
// This is an alpha feature and may change in the future.
|
||||||
// +optional
|
// +optional
|
||||||
VolumeMode *PersistentVolumeMode
|
VolumeMode *PersistentVolumeMode
|
||||||
|
// If specified, volume will be prepopulated with data from the DataSource.
|
||||||
|
// +optional
|
||||||
|
DataSource *TypedLocalObjectReference
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersistentVolumeClaimConditionType string
|
type PersistentVolumeClaimConditionType string
|
||||||
@ -3960,6 +3963,16 @@ type LocalObjectReference struct {
|
|||||||
Name string
|
Name string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
|
||||||
|
type TypedLocalObjectReference struct {
|
||||||
|
// Name of the referent.
|
||||||
|
// +optional
|
||||||
|
Name string
|
||||||
|
// Kind of the referent.
|
||||||
|
// +optional
|
||||||
|
Kind string
|
||||||
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
type SerializedReference struct {
|
type SerializedReference struct {
|
||||||
|
@ -458,6 +458,9 @@ type PersistentVolumeClaimSpec struct {
|
|||||||
// This is an alpha feature and may change in the future.
|
// This is an alpha feature and may change in the future.
|
||||||
// +optional
|
// +optional
|
||||||
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
|
VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"`
|
||||||
|
// If specified, volume will be prepopulated with data from the DataSource.
|
||||||
|
// +optional
|
||||||
|
DataSource *TypedLocalObjectReference `json:"dataSource" protobuf:"bytes,7,opt,name=dataSource"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
|
// PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
|
||||||
@ -4478,6 +4481,19 @@ type LocalObjectReference struct {
|
|||||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TypedLocalObjectReference contains enough information to let you locate the
|
||||||
|
// typed referenced object inside the same namespace.
|
||||||
|
type TypedLocalObjectReference struct {
|
||||||
|
// Name of the referent.
|
||||||
|
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||||
|
// +optional
|
||||||
|
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||||
|
// Kind of the referent.
|
||||||
|
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
|
Kind string `json:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
||||||
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// SerializedReference is a reference to serialized object.
|
// SerializedReference is a reference to serialized object.
|
||||||
|
Loading…
Reference in New Issue
Block a user