mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #5703 from fgrzadkowski/empty_pod_docs
Add documentation explaining there must be at least one container in a Pod
This commit is contained in:
commit
dd74fa7f85
@ -574,7 +574,8 @@ const (
|
||||
|
||||
// PodSpec is a description of a pod
|
||||
type PodSpec struct {
|
||||
Volumes []Volume `json:"volumes"`
|
||||
Volumes []Volume `json:"volumes"`
|
||||
// Required: there must be at least one container in a pod.
|
||||
Containers []Container `json:"containers"`
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"`
|
||||
// Required: Set DNS policy.
|
||||
|
@ -1066,8 +1066,9 @@ const (
|
||||
|
||||
// PodSpec is a description of a pod
|
||||
type PodSpec struct {
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed"`
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
// Required: there must be at least one container in a pod.
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed; there must be at least one container in a Pod"`
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"`
|
||||
// Optional: Set DNS policy. Defaults to "ClusterFirst"
|
||||
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
|
||||
|
@ -1128,8 +1128,9 @@ const (
|
||||
|
||||
// PodSpec is a description of a pod
|
||||
type PodSpec struct {
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed"`
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
// Required: there must be at least one container in a pod.
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; containers cannot currently be added or removed; there must be at least one container in a Pod"`
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"`
|
||||
// Optional: Set DNS policy. Defaults to "ClusterFirst"
|
||||
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
|
||||
|
@ -573,8 +573,9 @@ const (
|
||||
|
||||
// PodSpec is a description of a pod
|
||||
type PodSpec struct {
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed"`
|
||||
Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"`
|
||||
// Required: there must be at least one container in a pod.
|
||||
Containers []Container `json:"containers" description:"list of containers belonging to the pod; cannot be updated; containers cannot currently be added or removed; there must be at least one container in a Pod"`
|
||||
RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"`
|
||||
// Optional: Set DNS policy. Defaults to "ClusterFirst"
|
||||
DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" description:"DNS policy for containers within the pod; one of 'ClusterFirst' or 'Default'"`
|
||||
|
Loading…
Reference in New Issue
Block a user