mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Add json description to v1beta3 API.
This commit is contained in:
parent
a858c7423e
commit
28aef4ba53
@ -64,7 +64,7 @@ type TypeMeta struct {
|
||||
// various status objects.
|
||||
type ListMeta struct {
|
||||
// SelfLink is a URL representing this object.
|
||||
SelfLink string `json:"selfLink,omitempty" description:"URL for the object"`
|
||||
SelfLink string `json:"selfLink,omitempty" description:"URL for the object; populated by the system, read-only"`
|
||||
|
||||
// An opaque value that represents the version of this response for use with optimistic
|
||||
// concurrency and change monitoring endpoints. Clients must treat these values as opaque
|
||||
@ -102,7 +102,7 @@ type ObjectMeta struct {
|
||||
Namespace string `json:"namespace,omitempty" description:"namespace of the object"`
|
||||
|
||||
// SelfLink is a URL representing this object.
|
||||
SelfLink string `json:"selfLink,omitempty" "URL for the object; populated by the system, read-only"`
|
||||
SelfLink string `json:"selfLink,omitempty" description:"URL for the object; populated by the system, read-only"`
|
||||
|
||||
// UID is the unique in time and space value for this object. It is typically generated by
|
||||
// the server on successful creation of a resource and is not allowed to change on PUT
|
||||
@ -633,7 +633,7 @@ type PodTemplate struct {
|
||||
// PodTemplateList is a list of PodTemplates.
|
||||
type PodTemplateList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []PodTemplate `json:"items" description:"list of pod templates"`
|
||||
}
|
||||
@ -653,59 +653,59 @@ type BoundPod struct {
|
||||
// the pod list is guaranteed to only change when the list of bound pods changes.
|
||||
type BoundPods struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Host is the name of a node that these pods were bound to.
|
||||
Host string `json:"host"`
|
||||
Host string `json:"host" description:"name of a node that these pods were bound to"`
|
||||
|
||||
// Items is the list of all pods bound to a given host.
|
||||
Items []BoundPod `json:"items"`
|
||||
Items []BoundPod `json:"items" description:"list of all pods bound to a given host"`
|
||||
}
|
||||
|
||||
// ReplicationControllerSpec is the specification of a replication controller.
|
||||
type ReplicationControllerSpec struct {
|
||||
// Replicas is the number of desired replicas.
|
||||
Replicas int `json:"replicas"`
|
||||
Replicas int `json:"replicas" description:"number of replicas desired"`
|
||||
|
||||
// Selector is a label query over pods that should match the Replicas count.
|
||||
Selector map[string]string `json:"selector,omitempty"`
|
||||
Selector map[string]string `json:"selector,omitempty" description:"label keys and values that must match in order to be controlled by this replication controller"`
|
||||
|
||||
// TemplateRef is a reference to an object that describes the pod that will be created if
|
||||
// insufficient replicas are detected.
|
||||
TemplateRef *ObjectReference `json:"templateRef,omitempty"`
|
||||
TemplateRef *ObjectReference `json:"templateRef,omitempty" description:"reference to an object that describes the pod that will be created if insufficient replicas are detected"`
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected. This takes precedence over a
|
||||
// TemplateRef.
|
||||
Template *PodTemplateSpec `json:"template,omitempty"`
|
||||
Template *PodTemplateSpec `json:"template,omitempty" description:"object that describes the pod that will be created if insufficient replicas are detected; takes precendence over templateRef"`
|
||||
}
|
||||
|
||||
// ReplicationControllerStatus represents the current status of a replication
|
||||
// controller.
|
||||
type ReplicationControllerStatus struct {
|
||||
// Replicas is the number of actual replicas.
|
||||
Replicas int `json:"replicas"`
|
||||
Replicas int `json:"replicas" description:"most recently oberved number of replicas"`
|
||||
}
|
||||
|
||||
// ReplicationController represents the configuration of a replication controller.
|
||||
type ReplicationController struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the desired behavior of this replication controller.
|
||||
Spec ReplicationControllerSpec `json:"spec,omitempty"`
|
||||
Spec ReplicationControllerSpec `json:"spec,omitempty" description:"specification of the desired behavior of the replication controller; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
|
||||
// Status is the current status of this replication controller. This data may be
|
||||
// out of date by some window of time.
|
||||
Status ReplicationControllerStatus `json:"status,omitempty"`
|
||||
Status ReplicationControllerStatus `json:"status,omitempty" description:"most recently observed status of the replication controller; populated by the system, read-only; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// ReplicationControllerList is a collection of replication controllers.
|
||||
type ReplicationControllerList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []ReplicationController `json:"items"`
|
||||
Items []ReplicationController `json:"items" description:"list of replication controllers"`
|
||||
}
|
||||
|
||||
// Session Affinity Type string
|
||||
@ -726,13 +726,13 @@ type ServiceStatus struct{}
|
||||
type ServiceSpec struct {
|
||||
// Port is the TCP or UDP port that will be made available to each pod for connecting to the pods
|
||||
// proxied by this service.
|
||||
Port int `json:"port"`
|
||||
Port int `json:"port" description:"port exposed by the service"`
|
||||
|
||||
// Optional: Supports "TCP" and "UDP". Defaults to "TCP".
|
||||
Protocol Protocol `json:"protocol,omitempty"`
|
||||
Protocol Protocol `json:"protocol,omitempty" description:"protocol for port; must be UDP or TCP; TCP if unspecified"`
|
||||
|
||||
// This service will route traffic to pods having labels matching this selector. If null, no endpoints will be automatically created. If empty, all pods will be selected.
|
||||
Selector map[string]string `json:"selector"`
|
||||
Selector map[string]string `json:"selector" description:"label keys and values that must match in order to receive traffic for this service; if empty, all pods are selected, if not specified, endpoints must be manually specified"`
|
||||
|
||||
// PortalIP is usually assigned by the master. If specified by the user
|
||||
// we will try to respect it or else fail the request. This field can
|
||||
@ -740,7 +740,8 @@ type ServiceSpec struct {
|
||||
PortalIP string `json:"portalIP,omitempty description: IP address of the service; usually assigned by the system; if specified, it will be allocated to the service if unused, and creation of the service will fail otherwise"`
|
||||
|
||||
// CreateExternalLoadBalancer indicates whether a load balancer should be created for this service.
|
||||
CreateExternalLoadBalancer bool `json:"createExternalLoadBalancer,omitempty"`
|
||||
CreateExternalLoadBalancer bool `json:"createExternalLoadBalancer,omitempty" description:"set up a cloud-provider-specific load balancer on an external IP"`
|
||||
|
||||
// PublicIPs are used by external load balancers, or can be set by
|
||||
// users to handle external traffic that arrives at a node.
|
||||
PublicIPs []string `json:"publicIPs,omitempty" description:"externally visible IPs (e.g. load balancers) that should be proxied to this service"`
|
||||
@ -748,10 +749,10 @@ type ServiceSpec struct {
|
||||
// ContainerPort is the name or number of the port on the container to direct traffic to.
|
||||
// This is useful if the containers the service points to have multiple open ports.
|
||||
// Optional: If unspecified, the service port is used (an identity map).
|
||||
ContainerPort util.IntOrString `json:"containerPort,omitempty"`
|
||||
ContainerPort util.IntOrString `json:"containerPort,omitempty" description:"number or name of the port to access on the containers belonging to pods targeted by the service; defaults to the container's first open port"`
|
||||
|
||||
// Optional: Supports "ClientIP" and "None". Used to maintain session affinity.
|
||||
SessionAffinity AffinityType `json:"sessionAffinity,omitempty"`
|
||||
SessionAffinity AffinityType `json:"sessionAffinity,omitempty" description:"enable client IP based session affinity; must be ClientIP or None; defaults to None"`
|
||||
}
|
||||
|
||||
// Service is a named abstraction of software service (for example, mysql) consisting of local port
|
||||
@ -759,73 +760,73 @@ type ServiceSpec struct {
|
||||
// will answer requests sent through the proxy.
|
||||
type Service struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the behavior of a service.
|
||||
Spec ServiceSpec `json:"spec,omitempty"`
|
||||
Spec ServiceSpec `json:"spec,omitempty" description:"specification of the desired behavior of the service; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
|
||||
// Status represents the current status of a service.
|
||||
Status ServiceStatus `json:"status,omitempty"`
|
||||
Status ServiceStatus `json:"status,omitempty" description:"most recently observed status of the service; populated by the system, read-only; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// ServiceList holds a list of services.
|
||||
type ServiceList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []Service `json:"items"`
|
||||
Items []Service `json:"items" description:"list of services"`
|
||||
}
|
||||
|
||||
// Endpoints is a collection of endpoints that implement the actual service, for example:
|
||||
// Name: "mysql", Endpoints: [{"ip": "10.10.1.1", "port": 1909}, {"ip": "10.10.2.2", "port": 8834}]
|
||||
type Endpoints struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Optional: The IP protocol for these endpoints. Supports "TCP" and
|
||||
// "UDP". Defaults to "TCP".
|
||||
Protocol Protocol `json:"protocol,omitempty"`
|
||||
Protocol Protocol `json:"protocol,omitempty" description:"IP protocol for endpoint ports; must be UDP or TCP; TCP if unspecified"`
|
||||
|
||||
Endpoints []Endpoint `json:"endpoints,omitempty"`
|
||||
Endpoints []Endpoint `json:"endpoints,omitempty" description:"list of endpoints corresponding to a service"`
|
||||
}
|
||||
|
||||
// Endpoint is a single IP endpoint of a service.
|
||||
type Endpoint struct {
|
||||
// Required: The IP of this endpoint.
|
||||
// TODO: This should allow hostname or IP, see #4447.
|
||||
IP string `json:"ip"`
|
||||
IP string `json:"ip" description:"IP of this endpoint"`
|
||||
|
||||
// Required: The destination port to access.
|
||||
Port int `json:"port"`
|
||||
Port int `json:"port" description:"destination port of this endpoint"`
|
||||
}
|
||||
|
||||
// EndpointsList is a list of endpoints.
|
||||
type EndpointsList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []Endpoints `json:"items"`
|
||||
Items []Endpoints `json:"items" description:"list of endpoints"`
|
||||
}
|
||||
|
||||
// NodeSpec describes the attributes that a node is created with.
|
||||
type NodeSpec struct {
|
||||
// Capacity represents the available resources of a node
|
||||
// see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/resources.md for more details.
|
||||
Capacity ResourceList `json:"capacity,omitempty"`
|
||||
Capacity ResourceList `json:"capacity,omitempty" description:"compute resource capacity of the node; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/resources.md"`
|
||||
// PodCIDR represents the pod IP range assigned to the node
|
||||
PodCIDR string `json:"cidr,omitempty"`
|
||||
PodCIDR string `json:"cidr,omitempty" description:"pod IP range assined to the node"`
|
||||
// External ID of the node assigned by some machine database (e.g. a cloud provider)
|
||||
ExternalID string `json:"externalID,omitempty"`
|
||||
ExternalID string `json:"externalID,omitempty" description:"external ID assigned to the node by some machine database (e.g. a cloud provider)"`
|
||||
}
|
||||
|
||||
// NodeStatus is information about the current status of a node.
|
||||
type NodeStatus struct {
|
||||
// NodePhase is the current lifecycle phase of the node.
|
||||
Phase NodePhase `json:"phase,omitempty"`
|
||||
Phase NodePhase `json:"phase,omitempty" description:"most recently observed lifecycle phase of the node"`
|
||||
// Conditions is an array of current node conditions.
|
||||
Conditions []NodeCondition `json:"conditions,omitempty"`
|
||||
Conditions []NodeCondition `json:"conditions,omitempty" description:"list of node conditions observed"`
|
||||
// Queried from cloud provider, if available.
|
||||
Addresses []NodeAddress `json:"addresses,omitempty"`
|
||||
Addresses []NodeAddress `json:"addresses,omitempty" description:"list of addresses reachable to the node"`
|
||||
}
|
||||
|
||||
type NodePhase string
|
||||
@ -853,12 +854,12 @@ const (
|
||||
)
|
||||
|
||||
type NodeCondition struct {
|
||||
Type NodeConditionType `json:"type"`
|
||||
Status ConditionStatus `json:"status"`
|
||||
LastProbeTime util.Time `json:"lastProbeTime,omitempty"`
|
||||
LastTransitionTime util.Time `json:"lastTransitionTime,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Type NodeConditionType `json:"type" description:"type of node condition, one of Reachable, Ready"`
|
||||
Status ConditionStatus `json:"status" description:"status of the condition, one of Full, None, Unknown"`
|
||||
LastProbeTime util.Time `json:"lastProbeTime,omitempty" description:"last time the condition was probed"`
|
||||
LastTransitionTime util.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transit from one status to another"`
|
||||
Reason string `json:"reason,omitempty" description:"(brief) reason for the condition's last transition"`
|
||||
Message string `json:"message,omitempty" description:"human readable message indicating details about last transition"`
|
||||
}
|
||||
|
||||
type NodeAddressType string
|
||||
@ -892,21 +893,21 @@ type ResourceList map[ResourceName]resource.Quantity
|
||||
// The name of the node according to etcd is in ID.
|
||||
type Node struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the behavior of a node.
|
||||
Spec NodeSpec `json:"spec,omitempty"`
|
||||
Spec NodeSpec `json:"spec,omitempty" description:"specification of a node; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
|
||||
// Status describes the current status of a Node
|
||||
Status NodeStatus `json:"status,omitempty"`
|
||||
Status NodeStatus `json:"status,omitempty" description:"most recently observed status of the node; populated by the system, read-only; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// NodeList is a list of minions.
|
||||
type NodeList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []Node `json:"items"`
|
||||
Items []Node `json:"items" description:"list of nodes"`
|
||||
}
|
||||
|
||||
// NamespaceSpec describes the attributes on a Namespace
|
||||
@ -921,19 +922,19 @@ type NamespaceStatus struct {
|
||||
// Use of multiple namespaces is optional
|
||||
type Namespace struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the behavior of the Namespace.
|
||||
Spec NamespaceSpec `json:"spec,omitempty" description:"spec defines the behavior of the Namespace"`
|
||||
Spec NamespaceSpec `json:"spec,omitempty" description:"spec defines the behavior of the Namespace; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
|
||||
// Status describes the current status of a Namespace
|
||||
Status NamespaceStatus `json:"status,omitempty" description:"status describes the current status of a Namespace"`
|
||||
Status NamespaceStatus `json:"status,omitempty" description:"status describes the current status of a Namespace; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// NamespaceList is a list of Namespaces.
|
||||
type NamespaceList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Items is the list of Namespace objects in the list
|
||||
Items []Namespace `json:"items" description:"items is the list of Namespace objects in the list"`
|
||||
@ -943,35 +944,35 @@ type NamespaceList struct {
|
||||
// required for Bindings.
|
||||
type Binding struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// PodID is a Pod name to be bound to a node.
|
||||
PodID string `json:"podID"`
|
||||
PodID string `json:"podID" description:"name of the pod to be bound to a node"`
|
||||
// Host is the name of a node to bind to.
|
||||
Host string `json:"host"`
|
||||
Host string `json:"host" description:"name of the node to bind to"`
|
||||
}
|
||||
|
||||
// Status is a return value for calls that don't return other objects.
|
||||
type Status struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// One of: "Success" or "Failure"
|
||||
Status string `json:"status,omitempty"`
|
||||
Status string `json:"status,omitempty" description:"status of the operation; either Success, or Failure"`
|
||||
// A human-readable description of the status of this operation.
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string `json:"message,omitempty" description:"human-readable description of the status of this operation"`
|
||||
// A machine-readable description of why this operation is in the
|
||||
// "Failure" status. If this value is empty there
|
||||
// is no information available. A Reason clarifies an HTTP status
|
||||
// code but does not override it.
|
||||
Reason StatusReason `json:"reason,omitempty"`
|
||||
Reason StatusReason `json:"reason,omitempty" description:"machine-readable description of why this operation is in the 'Failure' status; if this value is empty there is no information available; a reason clarifies an HTTP status code but does not override it"`
|
||||
// Extended data associated with the reason. Each reason may define its
|
||||
// own extended details. This field is optional and the data returned
|
||||
// is not guaranteed to conform to any schema except that defined by
|
||||
// the reason type.
|
||||
Details *StatusDetails `json:"details,omitempty"`
|
||||
Details *StatusDetails `json:"details,omitempty" description:"extended data associated with the reason; each reason may define its own extended details; this field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type"`
|
||||
// Suggested HTTP return code for this status, 0 if not set.
|
||||
Code int `json:"code,omitempty"`
|
||||
Code int `json:"code,omitempty" description:"suggested HTTP return code for this status; 0 if not set"`
|
||||
}
|
||||
|
||||
// StatusDetails is a set of additional properties that MAY be set by the
|
||||
@ -983,13 +984,13 @@ type Status struct {
|
||||
type StatusDetails struct {
|
||||
// The ID attribute of the resource associated with the status StatusReason
|
||||
// (when there is a single ID which can be described).
|
||||
ID string `json:"id,omitempty"`
|
||||
ID string `json:"id,omitempty" description:"the ID attribute of the resource associated with the status StatusReason (when there is a single ID which can be described)"`
|
||||
// The kind attribute of the resource associated with the status StatusReason.
|
||||
// On some operations may differ from the requested resource Kind.
|
||||
Kind string `json:"kind,omitempty"`
|
||||
Kind string `json:"kind,omitempty" description:"the kind attribute of the resource associated with the status StatusReason; on some operations may differ from the requested resource Kind"`
|
||||
// The Causes array includes more details associated with the StatusReason
|
||||
// failure. Not all StatusReasons may provide detailed causes.
|
||||
Causes []StatusCause `json:"causes,omitempty"`
|
||||
Causes []StatusCause `json:"causes,omitempty" description:"the Causes array includes more details associated with the StatusReason failure; not all StatusReasons may provide detailed causes"`
|
||||
}
|
||||
|
||||
// Values of Status.Status
|
||||
@ -1064,10 +1065,10 @@ const (
|
||||
type StatusCause struct {
|
||||
// A machine-readable description of the cause of the error. If this value is
|
||||
// empty there is no information available.
|
||||
Type CauseType `json:"reason,omitempty"`
|
||||
Type CauseType `json:"reason,omitempty" description:"machine-readable description of the cause of the error; if this value is empty there is no information available"`
|
||||
// A human-readable description of the cause of the error. This field may be
|
||||
// presented as-is to a reader.
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string `json:"message,omitempty" description:"human-readable description of the cause of the error; this field may be presented as-is to a reader"`
|
||||
// The field of the resource that has caused this error, as named by its JSON
|
||||
// serialization. May include dot and postfix notation for nested attributes.
|
||||
// Arrays are zero-indexed. Fields may appear more than once in an array of
|
||||
@ -1077,7 +1078,7 @@ type StatusCause struct {
|
||||
// Examples:
|
||||
// "name" - the field "name" on the current resource
|
||||
// "items[0].name" - the field "name" on the first array entry in "items"
|
||||
Field string `json:"field,omitempty"`
|
||||
Field string `json:"field,omitempty" description:"field of the resource that has caused this error, as named by its JSON serialization; may include dot and postfix notation for nested attributes; arrays are zero-indexed; fields may appear more than once in an array of causes due to fields having multiple errors"`
|
||||
}
|
||||
|
||||
// CauseType is a machine readable value providing more detail about what
|
||||
@ -1105,11 +1106,11 @@ const (
|
||||
|
||||
// ObjectReference contains enough information to let you inspect or modify the referred object.
|
||||
type ObjectReference struct {
|
||||
Kind string `json:"kind,omitempty"`
|
||||
Namespace string `json:"namespace,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
UID types.UID `json:"uid,omitempty"`
|
||||
APIVersion string `json:"apiVersion,omitempty"`
|
||||
Kind string `json:"kind,omitempty" description:"kind of the referent"`
|
||||
Namespace string `json:"namespace,omitempty" description:"namespace of the referent"`
|
||||
Name string `json:"name,omitempty" description:"name of the referent"`
|
||||
UID types.UID `json:"uid,omitempty" description:"uid of the referent"`
|
||||
APIVersion string `json:"apiVersion,omitempty" description:"API version of the referent"`
|
||||
ResourceVersion string `json:"resourceVersion,omitempty" description:"specific resourceVersion to which this reference is made, if any: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#concurrency-control-and-consistency"`
|
||||
|
||||
// Optional. If referring to a piece of an object instead of an entire object, this string
|
||||
@ -1120,59 +1121,59 @@ type ObjectReference struct {
|
||||
// index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
||||
// referencing a part of an object.
|
||||
// TODO: this design is not final and this field is subject to change in the future.
|
||||
FieldPath string `json:"fieldPath,omitempty"`
|
||||
FieldPath string `json:"fieldPath,omitempty" description:"if referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]"`
|
||||
}
|
||||
|
||||
type EventSource struct {
|
||||
// Component from which the event is generated.
|
||||
Component string `json:"component,omitempty"`
|
||||
Component string `json:"component,omitempty" description:"component that generated the event"`
|
||||
// Host name on which the event is generated.
|
||||
Host string `json:"host,omitempty"`
|
||||
Host string `json:"host,omitempty" description:"name of the host where the event is generated"`
|
||||
}
|
||||
|
||||
// Event is a report of an event somewhere in the cluster.
|
||||
// TODO: Decide whether to store these separately or with the object they apply to.
|
||||
type Event struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata"`
|
||||
ObjectMeta `json:"metadata" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Required. The object that this event is about.
|
||||
InvolvedObject ObjectReference `json:"involvedObject,omitempty"`
|
||||
InvolvedObject ObjectReference `json:"involvedObject,omitempty" description:"object this event is about"`
|
||||
|
||||
// Optional; this should be a short, machine understandable string that gives the reason
|
||||
// for this event being generated.
|
||||
// TODO: provide exact specification for format.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string `json:"reason,omitempty" description:"short, machine understandable string that gives the reason for the transition into the object's current status"`
|
||||
|
||||
// Optional. A human-readable description of the status of this operation.
|
||||
// TODO: decide on maximum length.
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string `json:"message,omitempty" description:"human-readable description of the status of this operation"`
|
||||
|
||||
// Optional. The component reporting this event. Should be a short machine understandable string.
|
||||
Source EventSource `json:"source,omitempty"`
|
||||
Source EventSource `json:"source,omitempty" description:"component reporting this event"`
|
||||
|
||||
// The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
|
||||
FirstTimestamp util.Time `json:"firstTimestamp,omitempty"`
|
||||
FirstTimestamp util.Time `json:"firstTimestamp,omitempty" description:"the time at which the event was first recorded"`
|
||||
|
||||
// The time at which the most recent occurance of this event was recorded.
|
||||
LastTimestamp util.Time `json:"lastTimestamp,omitempty"`
|
||||
LastTimestamp util.Time `json:"lastTimestamp,omitempty" description:"the time at which the most recent occurance of this event was recorded"`
|
||||
|
||||
// The number of times this event has occurred.
|
||||
Count int `json:"count,omitempty"`
|
||||
Count int `json:"count,omitempty" description:"the number of times this event has occurred"`
|
||||
}
|
||||
|
||||
// EventList is a list of events.
|
||||
type EventList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []Event `json:"items"`
|
||||
Items []Event `json:"items" description:"list of events"`
|
||||
}
|
||||
|
||||
// List holds a list of objects, which may not be known by the server.
|
||||
type List struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []runtime.RawExtension `json:"items" description:"list of objects"`
|
||||
}
|
||||
@ -1206,16 +1207,16 @@ type LimitRangeSpec struct {
|
||||
// LimitRange sets resource usage limits for each kind of resource in a Namespace
|
||||
type LimitRange struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the limits enforced
|
||||
Spec LimitRangeSpec `json:"spec,omitempty" description:"spec defines the limits enforced"`
|
||||
Spec LimitRangeSpec `json:"spec,omitempty" description:"spec defines the limits enforced; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// LimitRangeList is a list of LimitRange items.
|
||||
type LimitRangeList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Items is a list of LimitRange objects
|
||||
Items []LimitRange `json:"items" description:"items is a list of LimitRange objects"`
|
||||
@ -1250,29 +1251,29 @@ type ResourceQuotaStatus struct {
|
||||
// ResourceQuota sets aggregate quota restrictions enforced per namespace
|
||||
type ResourceQuota struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Spec defines the desired quota
|
||||
Spec ResourceQuotaSpec `json:"spec,omitempty" description:"spec defines the desired quota"`
|
||||
Spec ResourceQuotaSpec `json:"spec,omitempty" description:"spec defines the desired quota; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
|
||||
// Status defines the actual enforced quota and its current usage
|
||||
Status ResourceQuotaStatus `json:"status,omitempty" description:"status defines the actual enforced quota and current usage"`
|
||||
Status ResourceQuotaStatus `json:"status,omitempty" description:"status defines the actual enforced quota and current usage; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// ResourceQuotaUsage captures system observed quota status per namespace
|
||||
// It is used to enforce atomic updates of a backing ResourceQuota.Status field in storage
|
||||
type ResourceQuotaUsage struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Status defines the actual enforced quota and its current usage
|
||||
Status ResourceQuotaStatus `json:"status,omitempty" description:"status defines the actual enforced quota and current usage"`
|
||||
Status ResourceQuotaStatus `json:"status,omitempty" description:"status defines the actual enforced quota and current usage; https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#spec-and-status"`
|
||||
}
|
||||
|
||||
// ResourceQuotaList is a list of ResourceQuota items
|
||||
type ResourceQuotaList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Items is a list of ResourceQuota objects
|
||||
Items []ResourceQuota `json:"items" description:"items is a list of ResourceQuota objects"`
|
||||
@ -1282,7 +1283,7 @@ type ResourceQuotaList struct {
|
||||
// the Data field must be less than MaxSecretSize bytes.
|
||||
type Secret struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ObjectMeta `json:"metadata,omitempty"`
|
||||
ObjectMeta `json:"metadata,omitempty" description:"standard object metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN.
|
||||
// The serialized form of the secret data is a base64 encoded string,
|
||||
@ -1303,7 +1304,7 @@ const (
|
||||
|
||||
type SecretList struct {
|
||||
TypeMeta `json:",inline"`
|
||||
ListMeta `json:"metadata,omitempty"`
|
||||
ListMeta `json:"metadata,omitempty" description:"standard list metadata; see https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/api-conventions.md#metadata"`
|
||||
|
||||
Items []Secret `json:"items" description:"items is a list of secret objects"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user