@@ -1028,6 +1028,54 @@ type ReplicationControllerList struct {
...
@@ -1028,6 +1028,54 @@ type ReplicationControllerList struct {
Items[]ReplicationController`json:"items" description:"list of replication controllers; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md"`
Items[]ReplicationController`json:"items" description:"list of replication controllers; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md"`
}
}
// DaemonSpec is the specification of a daemon.
typeDaemonSpecstruct{
// Selector is a label query over pods that are managed by the daemon.
Selectormap[string]string`json:"selector,omitempty" description:"label keys and values that must match in order to be controlled by this daemon, if empty defaulted to labels on Pod template; see http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors"`
// Template is the object that describes the pod that will be created.
// The Daemon will create exactly one copy of this pod on every node
// that matches the template's node selector (or on every node if no node
// selector is specified).
Template*PodTemplateSpec`json:"template,omitempty" description:"object that describes the pod that will be created by this daemon; see http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#pod-template"`
}
// DaemonStatus represents the current status of a daemon.
typeDaemonStatusstruct{
// CurrentNumberScheduled is the number of nodes that are running exactly 1 copy of the
// daemon and are supposed to run the daemon.
CurrentNumberScheduledint`json:"currentNumberScheduled" description:"number of nodes that are running exactly 1 copy of the daemon and are supposed to run the daemon"`
// NumberMisscheduled is the number of nodes that are running the daemon, but are
// not supposed to run the daemon.
NumberMisscheduledint`json:"numberMisscheduled" description:"number of nodes that are running the Daemon, but are not supposed to run the daemon"`
// DesiredNumberScheduled is the total number of nodes that should be running the daemon
// (including nodes correctly running the daemon).
DesiredNumberScheduledint`json:"desiredNumberScheduled" description:"total number of nodes that should be running the Daemon (including nodes correctly running the daemon)"`
}
// Daemon represents the configuration of a daemon.
typeDaemonstruct{
TypeMeta`json:",inline"`
ObjectMeta`json:"metadata,omitempty" description:"standard object metadata; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"`
// Spec defines the desired behavior of this daemon.
SpecDaemonSpec`json:"spec,omitempty" description:"specification of the desired behavior of the daemon; http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status"`
// Status is the current status of this daemon. This data may be
// out of date by some window of time.
StatusDaemonStatus`json:"status,omitempty" description:"most recently observed status of the daemon; populated by the system, read-only; http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status"`
}
// DaemonList is a collection of daemon.
typeDaemonListstruct{
TypeMeta`json:",inline"`
ListMeta`json:"metadata,omitempty" description:"standard list metadata; see http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata"`
Items[]Daemon`json:"items" description:"list of daemons"`
// TODO: Pinpoint the specific field that causes the invalid error after we have strategic merge diff
allErrs=append(allErrs,errs.NewFieldInvalid("spec","content of spec is not printed out, please refer to the \"details\"","may not update fields other than spec.nodeSelector"))
}
returnallErrs
}
// ValidateDaemonSpec tests if required fields in the daemon spec are set.