mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 06:02:18 +00:00
Backport the BoundPods type to v1beta1/2/internal
This commit is contained in:
@@ -43,6 +43,7 @@ func init() {
|
||||
&Event{},
|
||||
&EventList{},
|
||||
&ContainerManifestList{},
|
||||
&BoundPods{},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -63,3 +64,4 @@ func (*ServerOpList) IsAnAPIObject() {}
|
||||
func (*Event) IsAnAPIObject() {}
|
||||
func (*EventList) IsAnAPIObject() {}
|
||||
func (*ContainerManifestList) IsAnAPIObject() {}
|
||||
func (*BoundPods) IsAnAPIObject() {}
|
||||
|
@@ -711,3 +711,34 @@ type EventList struct {
|
||||
TypeMeta `yaml:",inline" json:",inline"`
|
||||
Items []Event `yaml:"items,omitempty" json:"items,omitempty"`
|
||||
}
|
||||
|
||||
// Backported from v1beta3 to replace ContainerManifest
|
||||
|
||||
// PodSpec is a description of a pod
|
||||
type PodSpec struct {
|
||||
Volumes []Volume `json:"volumes" yaml:"volumes"`
|
||||
Containers []Container `json:"containers" yaml:"containers"`
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// BoundPod is a collection of containers that should be run on a host. A BoundPod
|
||||
// defines how a Pod may change after a Binding is created. A Pod is a request to
|
||||
// execute a pod, whereas a BoundPod is the specification that would be run on a server.
|
||||
type BoundPod struct {
|
||||
TypeMeta `json:",inline" yaml:",inline"`
|
||||
|
||||
// Spec defines the behavior of a pod.
|
||||
Spec PodSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// BoundPods is a list of Pods bound to a common server. The resource version of
|
||||
// the pod list is guaranteed to only change when the list of bound pods changes.
|
||||
type BoundPods struct {
|
||||
TypeMeta `json:",inline" yaml:",inline"`
|
||||
|
||||
// Host is the name of a node that these pods were bound to.
|
||||
Host string `json:"host" yaml:"host"`
|
||||
|
||||
// Items is the list of all pods bound to a given host.
|
||||
Items []BoundPod `json:"items" yaml:"items"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user