Add +optional tag to all fields with omitempty json tag
This commit is contained in:
parent
f85d8f2e66
commit
25afcc5522
@ -29,12 +29,15 @@ type TestType struct {
|
|||||||
// the next tag removes the field from openapi spec. Adding unversioned objectMeta bring in a whole set of
|
// the next tag removes the field from openapi spec. Adding unversioned objectMeta bring in a whole set of
|
||||||
// unversioned objects in the generate file that is not used anywhere other than this test type.
|
// unversioned objects in the generate file that is not used anywhere other than this test type.
|
||||||
// +k8s:openapi-gen=false
|
// +k8s:openapi-gen=false
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
// +optional
|
||||||
Status TestTypeStatus `json:"status,omitempty"`
|
Status TestTypeStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TestTypeList struct {
|
type TestTypeList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Items []TestType `json:"items"`
|
Items []TestType `json:"items"`
|
||||||
|
@ -42,6 +42,7 @@ type ClusterSpec struct {
|
|||||||
// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
|
// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
|
||||||
// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
|
// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
|
||||||
// This can be left empty if the cluster allows insecure access.
|
// This can be left empty if the cluster allows insecure access.
|
||||||
|
// +optional
|
||||||
SecretRef *api.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *api.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,23 +63,30 @@ type ClusterCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status api.ConditionStatus `json:"status"`
|
Status api.ConditionStatus `json:"status"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
|
// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
|
||||||
type ClusterStatus struct {
|
type ClusterStatus struct {
|
||||||
// Conditions is an array of current cluster conditions.
|
// Conditions is an array of current cluster conditions.
|
||||||
|
// +optional
|
||||||
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
||||||
// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
|
// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
|
||||||
// These will always be in the same region.
|
// These will always be in the same region.
|
||||||
|
// +optional
|
||||||
Zones []string `json:"zones,omitempty"`
|
Zones []string `json:"zones,omitempty"`
|
||||||
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
|
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
|
||||||
|
// +optional
|
||||||
Region string `json:"region,omitempty"`
|
Region string `json:"region,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,11 +98,14 @@ type Cluster struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec defines the behavior of the Cluster.
|
// Spec defines the behavior of the Cluster.
|
||||||
|
// +optional
|
||||||
Spec ClusterSpec `json:"spec,omitempty"`
|
Spec ClusterSpec `json:"spec,omitempty"`
|
||||||
// Status describes the current status of a Cluster
|
// Status describes the current status of a Cluster
|
||||||
|
// +optional
|
||||||
Status ClusterStatus `json:"status,omitempty"`
|
Status ClusterStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +114,7 @@ type ClusterList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// List of Cluster objects.
|
// List of Cluster objects.
|
||||||
@ -118,20 +130,24 @@ type FederatedReplicaSetPreferences struct {
|
|||||||
// If set to true then already scheduled and running replicas may be moved to other clusters to
|
// If set to true then already scheduled and running replicas may be moved to other clusters to
|
||||||
// in order to bring cluster replicasets towards a desired state. Otherwise, if set to false,
|
// in order to bring cluster replicasets towards a desired state. Otherwise, if set to false,
|
||||||
// up and running replicas will not be moved.
|
// up and running replicas will not be moved.
|
||||||
|
// +optional
|
||||||
Rebalance bool `json:"rebalance,omitempty"`
|
Rebalance bool `json:"rebalance,omitempty"`
|
||||||
|
|
||||||
// A mapping between cluser names and preferences regarding local replicasets in these clusters.
|
// A mapping between cluser names and preferences regarding local replicasets in these clusters.
|
||||||
// "*" (if provided) applies to all clusters if an explicit mapping is not provided. If there is no
|
// "*" (if provided) applies to all clusters if an explicit mapping is not provided. If there is no
|
||||||
// "*" that clusters without explicit preferences should not have any replicas scheduled.
|
// "*" that clusters without explicit preferences should not have any replicas scheduled.
|
||||||
|
// +optional
|
||||||
Clusters map[string]ClusterReplicaSetPreferences `json:"clusters,omitempty"`
|
Clusters map[string]ClusterReplicaSetPreferences `json:"clusters,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset.
|
// Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset.
|
||||||
type ClusterReplicaSetPreferences struct {
|
type ClusterReplicaSetPreferences struct {
|
||||||
// Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default.
|
// Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default.
|
||||||
|
// +optional
|
||||||
MinReplicas int64 `json:"minReplicas,omitempty"`
|
MinReplicas int64 `json:"minReplicas,omitempty"`
|
||||||
|
|
||||||
// Maximum number of replicas that should be assigned to this Local ReplicaSet. Unbounded if no value provided (default).
|
// Maximum number of replicas that should be assigned to this Local ReplicaSet. Unbounded if no value provided (default).
|
||||||
|
// +optional
|
||||||
MaxReplicas *int64 `json:"maxReplicas,omitempty"`
|
MaxReplicas *int64 `json:"maxReplicas,omitempty"`
|
||||||
|
|
||||||
// A number expressing the preference to put an additional replica to this LocalReplicaSet. 0 by default.
|
// A number expressing the preference to put an additional replica to this LocalReplicaSet. 0 by default.
|
||||||
|
@ -42,6 +42,7 @@ type ClusterSpec struct {
|
|||||||
// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
|
// Admin needs to ensure that the required secret exists. Secret should be in the same namespace where federation control plane is hosted and it should have kubeconfig in its data with key "kubeconfig".
|
||||||
// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
|
// This will later be changed to a reference to secret in federation control plane when the federation control plane supports secrets.
|
||||||
// This can be left empty if the cluster allows insecure access.
|
// This can be left empty if the cluster allows insecure access.
|
||||||
|
// +optional
|
||||||
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,2,opt,name=secretRef"`
|
SecretRef *v1.LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,2,opt,name=secretRef"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,23 +63,30 @@ type ClusterCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
|
// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
|
||||||
type ClusterStatus struct {
|
type ClusterStatus struct {
|
||||||
// Conditions is an array of current cluster conditions.
|
// Conditions is an array of current cluster conditions.
|
||||||
|
// +optional
|
||||||
Conditions []ClusterCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
|
Conditions []ClusterCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
|
||||||
// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
|
// Zones is the list of availability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'.
|
||||||
// These will always be in the same region.
|
// These will always be in the same region.
|
||||||
|
// +optional
|
||||||
Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"`
|
Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"`
|
||||||
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
|
// Region is the name of the region in which all of the nodes in the cluster exist. e.g. 'us-east1'.
|
||||||
|
// +optional
|
||||||
Region string `json:"region,omitempty" protobuf:"bytes,6,opt,name=region"`
|
Region string `json:"region,omitempty" protobuf:"bytes,6,opt,name=region"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,11 +98,14 @@ type Cluster struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec defines the behavior of the Cluster.
|
// Spec defines the behavior of the Cluster.
|
||||||
|
// +optional
|
||||||
Spec ClusterSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ClusterSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
// Status describes the current status of a Cluster
|
// Status describes the current status of a Cluster
|
||||||
|
// +optional
|
||||||
Status ClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +114,7 @@ type ClusterList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// List of Cluster objects.
|
// List of Cluster objects.
|
||||||
|
533
pkg/api/types.go
533
pkg/api/types.go
File diff suppressed because it is too large
Load Diff
@ -36,12 +36,14 @@ type TypeMeta struct {
|
|||||||
// Cannot be updated.
|
// Cannot be updated.
|
||||||
// In CamelCase.
|
// In CamelCase.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
|
||||||
|
|
||||||
// APIVersion defines the versioned schema of this representation of an object.
|
// APIVersion defines the versioned schema of this representation of an object.
|
||||||
// Servers should convert recognized schemas to the latest internal value, and
|
// Servers should convert recognized schemas to the latest internal value, and
|
||||||
// may reject unrecognized values.
|
// may reject unrecognized values.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,6 +53,7 @@ type ListMeta struct {
|
|||||||
// SelfLink is a URL representing this object.
|
// SelfLink is a URL representing this object.
|
||||||
// Populated by the system.
|
// Populated by the system.
|
||||||
// Read-only.
|
// Read-only.
|
||||||
|
// +optional
|
||||||
SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"`
|
SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"`
|
||||||
|
|
||||||
// String that identifies the server's internal version of this object that
|
// String that identifies the server's internal version of this object that
|
||||||
@ -59,6 +62,7 @@ type ListMeta struct {
|
|||||||
// Populated by the system.
|
// Populated by the system.
|
||||||
// Read-only.
|
// Read-only.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency
|
||||||
|
// +optional
|
||||||
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
|
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,25 +80,31 @@ type Status struct {
|
|||||||
TypeMeta `json:",inline"`
|
TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Status of the operation.
|
// Status of the operation.
|
||||||
// One of: "Success" or "Failure".
|
// One of: "Success" or "Failure".
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
|
Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`
|
||||||
// A human-readable description of the status of this operation.
|
// A human-readable description of the status of this operation.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
|
||||||
// A machine-readable description of why this operation is in the
|
// A machine-readable description of why this operation is in the
|
||||||
// "Failure" status. If this value is empty there
|
// "Failure" status. If this value is empty there
|
||||||
// is no information available. A Reason clarifies an HTTP status
|
// is no information available. A Reason clarifies an HTTP status
|
||||||
// code but does not override it.
|
// code but does not override it.
|
||||||
|
// +optional
|
||||||
Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"`
|
Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"`
|
||||||
// Extended data associated with the reason. Each reason may define its
|
// Extended data associated with the reason. Each reason may define its
|
||||||
// own extended details. This field is optional and the data returned
|
// own extended details. This field is optional and the data returned
|
||||||
// is not guaranteed to conform to any schema except that defined by
|
// is not guaranteed to conform to any schema except that defined by
|
||||||
// the reason type.
|
// the reason type.
|
||||||
|
// +optional
|
||||||
Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
|
Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"`
|
||||||
// Suggested HTTP return code for this status, 0 if not set.
|
// Suggested HTTP return code for this status, 0 if not set.
|
||||||
|
// +optional
|
||||||
Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"`
|
Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,17 +117,22 @@ type Status struct {
|
|||||||
type StatusDetails struct {
|
type StatusDetails struct {
|
||||||
// The name attribute of the resource associated with the status StatusReason
|
// The name attribute of the resource associated with the status StatusReason
|
||||||
// (when there is a single name which can be described).
|
// (when there is a single name which can be described).
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||||
// The group attribute of the resource associated with the status StatusReason.
|
// The group attribute of the resource associated with the status StatusReason.
|
||||||
|
// +optional
|
||||||
Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"`
|
Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"`
|
||||||
// The kind attribute of the resource associated with the status StatusReason.
|
// The kind attribute of the resource associated with the status StatusReason.
|
||||||
// On some operations may differ from the requested resource Kind.
|
// On some operations may differ from the requested resource Kind.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
|
Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
|
||||||
// The Causes array includes more details associated with the StatusReason
|
// The Causes array includes more details associated with the StatusReason
|
||||||
// failure. Not all StatusReasons may provide detailed causes.
|
// failure. Not all StatusReasons may provide detailed causes.
|
||||||
|
// +optional
|
||||||
Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
|
Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"`
|
||||||
// If specified, the time in seconds before the operation should be retried.
|
// If specified, the time in seconds before the operation should be retried.
|
||||||
|
// +optional
|
||||||
RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"`
|
RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,9 +272,11 @@ const (
|
|||||||
type StatusCause struct {
|
type StatusCause struct {
|
||||||
// A machine-readable description of the cause of the error. If this value is
|
// A machine-readable description of the cause of the error. If this value is
|
||||||
// empty there is no information available.
|
// empty there is no information available.
|
||||||
|
// +optional
|
||||||
Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"`
|
Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"`
|
||||||
// A human-readable description of the cause of the error. This field may be
|
// A human-readable description of the cause of the error. This field may be
|
||||||
// presented as-is to a reader.
|
// presented as-is to a reader.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
|
||||||
// The field of the resource that has caused this error, as named by its JSON
|
// 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.
|
// serialization. May include dot and postfix notation for nested attributes.
|
||||||
@ -270,6 +287,7 @@ type StatusCause struct {
|
|||||||
// Examples:
|
// Examples:
|
||||||
// "name" - the field "name" on the current resource
|
// "name" - the field "name" on the current resource
|
||||||
// "items[0].name" - the field "name" on the first array entry in "items"
|
// "items[0].name" - the field "name" on the first array entry in "items"
|
||||||
|
// +optional
|
||||||
Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"`
|
Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +354,7 @@ type APIGroup struct {
|
|||||||
Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"`
|
Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"`
|
||||||
// preferredVersion is the version preferred by the API server, which
|
// preferredVersion is the version preferred by the API server, which
|
||||||
// probably is the storage version.
|
// probably is the storage version.
|
||||||
|
// +optional
|
||||||
PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"`
|
PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"`
|
||||||
// a map of client CIDR to server address that is serving this group.
|
// a map of client CIDR to server address that is serving this group.
|
||||||
// This is to help clients reach servers in the most network-efficient way possible.
|
// This is to help clients reach servers in the most network-efficient way possible.
|
||||||
@ -429,8 +448,10 @@ type LabelSelector struct {
|
|||||||
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||||
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||||
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
||||||
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,6 +467,7 @@ type LabelSelectorRequirement struct {
|
|||||||
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||||
// the values array must be empty. This array is replaced during a strategic
|
// the values array must be empty. This array is replaced during a strategic
|
||||||
// merge patch.
|
// merge patch.
|
||||||
|
// +optional
|
||||||
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -26,21 +26,26 @@ type Policy struct {
|
|||||||
// User is the username this rule applies to.
|
// User is the username this rule applies to.
|
||||||
// Either user or group is required to match the request.
|
// Either user or group is required to match the request.
|
||||||
// "*" matches all users.
|
// "*" matches all users.
|
||||||
|
// +optional
|
||||||
User string `json:"user,omitempty"`
|
User string `json:"user,omitempty"`
|
||||||
|
|
||||||
// Group is the group this rule applies to.
|
// Group is the group this rule applies to.
|
||||||
// Either user or group is required to match the request.
|
// Either user or group is required to match the request.
|
||||||
// "*" matches all groups.
|
// "*" matches all groups.
|
||||||
|
// +optional
|
||||||
Group string `json:"group,omitempty"`
|
Group string `json:"group,omitempty"`
|
||||||
|
|
||||||
// Readonly matches readonly requests when true, and all requests when false
|
// Readonly matches readonly requests when true, and all requests when false
|
||||||
|
// +optional
|
||||||
Readonly bool `json:"readonly,omitempty"`
|
Readonly bool `json:"readonly,omitempty"`
|
||||||
|
|
||||||
// Resource is the name of a resource
|
// Resource is the name of a resource
|
||||||
// "*" matches all resources
|
// "*" matches all resources
|
||||||
|
// +optional
|
||||||
Resource string `json:"resource,omitempty"`
|
Resource string `json:"resource,omitempty"`
|
||||||
|
|
||||||
// Namespace is the name of a namespace
|
// Namespace is the name of a namespace
|
||||||
// "*" matches all namespaces (including unnamespaced requests)
|
// "*" matches all namespaces (including unnamespaced requests)
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty"`
|
Namespace string `json:"namespace,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -32,30 +32,37 @@ type PolicySpec struct {
|
|||||||
// User is the username this rule applies to.
|
// User is the username this rule applies to.
|
||||||
// Either user or group is required to match the request.
|
// Either user or group is required to match the request.
|
||||||
// "*" matches all users.
|
// "*" matches all users.
|
||||||
|
// +optional
|
||||||
User string `json:"user,omitempty"`
|
User string `json:"user,omitempty"`
|
||||||
|
|
||||||
// Group is the group this rule applies to.
|
// Group is the group this rule applies to.
|
||||||
// Either user or group is required to match the request.
|
// Either user or group is required to match the request.
|
||||||
// "*" matches all groups.
|
// "*" matches all groups.
|
||||||
|
// +optional
|
||||||
Group string `json:"group,omitempty"`
|
Group string `json:"group,omitempty"`
|
||||||
|
|
||||||
// Readonly matches readonly requests when true, and all requests when false
|
// Readonly matches readonly requests when true, and all requests when false
|
||||||
|
// +optional
|
||||||
Readonly bool `json:"readonly,omitempty"`
|
Readonly bool `json:"readonly,omitempty"`
|
||||||
|
|
||||||
// APIGroup is the name of an API group. APIGroup, Resource, and Namespace are required to match resource requests.
|
// APIGroup is the name of an API group. APIGroup, Resource, and Namespace are required to match resource requests.
|
||||||
// "*" matches all API groups
|
// "*" matches all API groups
|
||||||
|
// +optional
|
||||||
APIGroup string `json:"apiGroup,omitempty"`
|
APIGroup string `json:"apiGroup,omitempty"`
|
||||||
|
|
||||||
// Resource is the name of a resource. APIGroup, Resource, and Namespace are required to match resource requests.
|
// Resource is the name of a resource. APIGroup, Resource, and Namespace are required to match resource requests.
|
||||||
// "*" matches all resources
|
// "*" matches all resources
|
||||||
|
// +optional
|
||||||
Resource string `json:"resource,omitempty"`
|
Resource string `json:"resource,omitempty"`
|
||||||
|
|
||||||
// Namespace is the name of a namespace. APIGroup, Resource, and Namespace are required to match resource requests.
|
// Namespace is the name of a namespace. APIGroup, Resource, and Namespace are required to match resource requests.
|
||||||
// "*" matches all namespaces (including unnamespaced requests)
|
// "*" matches all namespaces (including unnamespaced requests)
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty"`
|
Namespace string `json:"namespace,omitempty"`
|
||||||
|
|
||||||
// NonResourcePath matches non-resource request paths.
|
// NonResourcePath matches non-resource request paths.
|
||||||
// "*" matches all paths
|
// "*" matches all paths
|
||||||
// "/foo/*" matches all subpaths of foo
|
// "/foo/*" matches all subpaths of foo
|
||||||
|
// +optional
|
||||||
NonResourcePath string `json:"nonResourcePath,omitempty"`
|
NonResourcePath string `json:"nonResourcePath,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,16 @@ import (
|
|||||||
// and subject to change without notice.
|
// and subject to change without notice.
|
||||||
type PetSet struct {
|
type PetSet struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec defines the desired identities of pets in this set.
|
// Spec defines the desired identities of pets in this set.
|
||||||
|
// +optional
|
||||||
Spec PetSetSpec `json:"spec,omitempty"`
|
Spec PetSetSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is the current status of Pets in this PetSet. This data
|
// Status is the current status of Pets in this PetSet. This data
|
||||||
// may be out of date by some window of time.
|
// may be out of date by some window of time.
|
||||||
|
// +optional
|
||||||
Status PetSetStatus `json:"status,omitempty"`
|
Status PetSetStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,11 +52,13 @@ type PetSetSpec struct {
|
|||||||
// same Template, but individual replicas also have a consistent identity.
|
// same Template, but individual replicas also have a consistent identity.
|
||||||
// If unspecified, defaults to 1.
|
// If unspecified, defaults to 1.
|
||||||
// TODO: Consider a rename of this field.
|
// TODO: Consider a rename of this field.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty"`
|
Replicas int32 `json:"replicas,omitempty"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the replica count.
|
// Selector is a label query over pods that should match the replica count.
|
||||||
// If empty, defaulted to labels on the pod template.
|
// If empty, defaulted to labels on the pod template.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created if
|
// Template is the object that describes the pod that will be created if
|
||||||
@ -69,6 +74,7 @@ type PetSetSpec struct {
|
|||||||
// container in the template. A claim in this list takes precedence over
|
// container in the template. A claim in this list takes precedence over
|
||||||
// any volumes in the template, with the same name.
|
// any volumes in the template, with the same name.
|
||||||
// TODO: Define the behavior if a claim already exists with the same name.
|
// TODO: Define the behavior if a claim already exists with the same name.
|
||||||
|
// +optional
|
||||||
VolumeClaimTemplates []api.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
|
VolumeClaimTemplates []api.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
|
||||||
|
|
||||||
// ServiceName is the name of the service that governs this PetSet.
|
// ServiceName is the name of the service that governs this PetSet.
|
||||||
@ -82,6 +88,7 @@ type PetSetSpec struct {
|
|||||||
// PetSetStatus represents the current state of a PetSet.
|
// PetSetStatus represents the current state of a PetSet.
|
||||||
type PetSetStatus struct {
|
type PetSetStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// most recent generation observed by this autoscaler.
|
||||||
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||||
|
|
||||||
// Replicas is the number of actual replicas.
|
// Replicas is the number of actual replicas.
|
||||||
@ -91,6 +98,7 @@ type PetSetStatus struct {
|
|||||||
// PetSetList is a collection of PetSets.
|
// PetSetList is a collection of PetSets.
|
||||||
type PetSetList struct {
|
type PetSetList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
Items []PetSet `json:"items"`
|
Items []PetSet `json:"items"`
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,16 @@ import (
|
|||||||
// and subject to change without notice.
|
// and subject to change without notice.
|
||||||
type PetSet struct {
|
type PetSet struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec defines the desired identities of pets in this set.
|
// Spec defines the desired identities of pets in this set.
|
||||||
|
// +optional
|
||||||
Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec PetSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is the current status of Pets in this PetSet. This data
|
// Status is the current status of Pets in this PetSet. This data
|
||||||
// may be out of date by some window of time.
|
// may be out of date by some window of time.
|
||||||
|
// +optional
|
||||||
Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status PetSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,11 +52,13 @@ type PetSetSpec struct {
|
|||||||
// same Template, but individual replicas also have a consistent identity.
|
// same Template, but individual replicas also have a consistent identity.
|
||||||
// If unspecified, defaults to 1.
|
// If unspecified, defaults to 1.
|
||||||
// TODO: Consider a rename of this field.
|
// TODO: Consider a rename of this field.
|
||||||
|
// +optional
|
||||||
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the replica count.
|
// Selector is a label query over pods that should match the replica count.
|
||||||
// If empty, defaulted to labels on the pod template.
|
// If empty, defaulted to labels on the pod template.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created if
|
// Template is the object that describes the pod that will be created if
|
||||||
@ -69,6 +74,7 @@ type PetSetSpec struct {
|
|||||||
// container in the template. A claim in this list takes precedence over
|
// container in the template. A claim in this list takes precedence over
|
||||||
// any volumes in the template, with the same name.
|
// any volumes in the template, with the same name.
|
||||||
// TODO: Define the behavior if a claim already exists with the same name.
|
// TODO: Define the behavior if a claim already exists with the same name.
|
||||||
|
// +optional
|
||||||
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
|
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty" protobuf:"bytes,4,rep,name=volumeClaimTemplates"`
|
||||||
|
|
||||||
// ServiceName is the name of the service that governs this PetSet.
|
// ServiceName is the name of the service that governs this PetSet.
|
||||||
@ -82,6 +88,7 @@ type PetSetSpec struct {
|
|||||||
// PetSetStatus represents the current state of a PetSet.
|
// PetSetStatus represents the current state of a PetSet.
|
||||||
type PetSetStatus struct {
|
type PetSetStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// most recent generation observed by this autoscaler.
|
||||||
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// Replicas is the number of actual replicas.
|
// Replicas is the number of actual replicas.
|
||||||
@ -91,6 +98,7 @@ type PetSetStatus struct {
|
|||||||
// PetSetList is a collection of PetSets.
|
// PetSetList is a collection of PetSets.
|
||||||
type PetSetList struct {
|
type PetSetList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
Items []PetSet `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []PetSet `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
}
|
}
|
||||||
|
@ -32,28 +32,34 @@ import (
|
|||||||
// plugin in the kube-apiserver.
|
// plugin in the kube-apiserver.
|
||||||
type TokenReview struct {
|
type TokenReview struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec holds information about the request being evaluated
|
// Spec holds information about the request being evaluated
|
||||||
Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
Spec TokenReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is filled in by the server and indicates whether the request can be authenticated.
|
// Status is filled in by the server and indicates whether the request can be authenticated.
|
||||||
|
// +optional
|
||||||
Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status TokenReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenReviewSpec is a description of the token authentication request.
|
// TokenReviewSpec is a description of the token authentication request.
|
||||||
type TokenReviewSpec struct {
|
type TokenReviewSpec struct {
|
||||||
// Token is the opaque bearer token.
|
// Token is the opaque bearer token.
|
||||||
|
// +optional
|
||||||
Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
|
Token string `json:"token,omitempty" protobuf:"bytes,1,opt,name=token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenReviewStatus is the result of the token authentication request.
|
// TokenReviewStatus is the result of the token authentication request.
|
||||||
type TokenReviewStatus struct {
|
type TokenReviewStatus struct {
|
||||||
// Authenticated indicates that the token was associated with a known user.
|
// Authenticated indicates that the token was associated with a known user.
|
||||||
|
// +optional
|
||||||
Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
|
Authenticated bool `json:"authenticated,omitempty" protobuf:"varint,1,opt,name=authenticated"`
|
||||||
// User is the UserInfo associated with the provided token.
|
// User is the UserInfo associated with the provided token.
|
||||||
|
// +optional
|
||||||
User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
User UserInfo `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"`
|
||||||
// Error indicates that the token couldn't be checked
|
// Error indicates that the token couldn't be checked
|
||||||
|
// +optional
|
||||||
Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
|
Error string `json:"error,omitempty" protobuf:"bytes,3,opt,name=error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,14 +67,18 @@ type TokenReviewStatus struct {
|
|||||||
// user.Info interface.
|
// user.Info interface.
|
||||||
type UserInfo struct {
|
type UserInfo struct {
|
||||||
// The name that uniquely identifies this user among all active users.
|
// The name that uniquely identifies this user among all active users.
|
||||||
|
// +optional
|
||||||
Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
|
Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
|
||||||
// A unique value that identifies this user across time. If this user is
|
// A unique value that identifies this user across time. If this user is
|
||||||
// deleted and another user by the same name is added, they will have
|
// deleted and another user by the same name is added, they will have
|
||||||
// different UIDs.
|
// different UIDs.
|
||||||
|
// +optional
|
||||||
UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
|
UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
|
||||||
// The names of groups this user is a part of.
|
// The names of groups this user is a part of.
|
||||||
|
// +optional
|
||||||
Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
|
Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"`
|
||||||
// Any additional information provided by the authenticator.
|
// Any additional information provided by the authenticator.
|
||||||
|
// +optional
|
||||||
Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
|
Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,12 +30,14 @@ import (
|
|||||||
// SubjectAccessReview checks whether or not a user or group can perform an action.
|
// SubjectAccessReview checks whether or not a user or group can perform an action.
|
||||||
type SubjectAccessReview struct {
|
type SubjectAccessReview struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec holds information about the request being evaluated
|
// Spec holds information about the request being evaluated
|
||||||
Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||||
|
// +optional
|
||||||
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,12 +50,14 @@ type SubjectAccessReview struct {
|
|||||||
// to check whether they can perform an action
|
// to check whether they can perform an action
|
||||||
type SelfSubjectAccessReview struct {
|
type SelfSubjectAccessReview struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec holds information about the request being evaluated. user and groups must be empty
|
// Spec holds information about the request being evaluated. user and groups must be empty
|
||||||
Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
Spec SelfSubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||||
|
// +optional
|
||||||
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,13 +69,15 @@ type SelfSubjectAccessReview struct {
|
|||||||
// checking.
|
// checking.
|
||||||
type LocalSubjectAccessReview struct {
|
type LocalSubjectAccessReview struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
|
// Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace
|
||||||
// you made the request against. If empty, it is defaulted.
|
// you made the request against. If empty, it is defaulted.
|
||||||
Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
Spec SubjectAccessReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is filled in by the server and indicates whether the request is allowed or not
|
// Status is filled in by the server and indicates whether the request is allowed or not
|
||||||
|
// +optional
|
||||||
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status SubjectAccessReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,26 +87,35 @@ type ResourceAttributes struct {
|
|||||||
// "" (empty) is defaulted for LocalSubjectAccessReviews
|
// "" (empty) is defaulted for LocalSubjectAccessReviews
|
||||||
// "" (empty) is empty for cluster-scoped resources
|
// "" (empty) is empty for cluster-scoped resources
|
||||||
// "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
// "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
|
Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`
|
||||||
// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
// Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
|
||||||
|
// +optional
|
||||||
Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
|
Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
|
||||||
// Group is the API Group of the Resource. "*" means all.
|
// Group is the API Group of the Resource. "*" means all.
|
||||||
|
// +optional
|
||||||
Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"`
|
||||||
// Version is the API Version of the Resource. "*" means all.
|
// Version is the API Version of the Resource. "*" means all.
|
||||||
|
// +optional
|
||||||
Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
|
Version string `json:"version,omitempty" protobuf:"bytes,4,opt,name=version"`
|
||||||
// Resource is one of the existing resource types. "*" means all.
|
// Resource is one of the existing resource types. "*" means all.
|
||||||
|
// +optional
|
||||||
Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
|
Resource string `json:"resource,omitempty" protobuf:"bytes,5,opt,name=resource"`
|
||||||
// Subresource is one of the existing resource types. "" means none.
|
// Subresource is one of the existing resource types. "" means none.
|
||||||
|
// +optional
|
||||||
Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
|
Subresource string `json:"subresource,omitempty" protobuf:"bytes,6,opt,name=subresource"`
|
||||||
// Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
|
// Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all.
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
|
Name string `json:"name,omitempty" protobuf:"bytes,7,opt,name=name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
|
// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface
|
||||||
type NonResourceAttributes struct {
|
type NonResourceAttributes struct {
|
||||||
// Path is the URL path of the request
|
// Path is the URL path of the request
|
||||||
|
// +optional
|
||||||
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
|
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
|
||||||
// Verb is the standard HTTP verb
|
// Verb is the standard HTTP verb
|
||||||
|
// +optional
|
||||||
Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
|
Verb string `json:"verb,omitempty" protobuf:"bytes,2,opt,name=verb"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,17 +123,22 @@ type NonResourceAttributes struct {
|
|||||||
// and NonResourceAuthorizationAttributes must be set
|
// and NonResourceAuthorizationAttributes must be set
|
||||||
type SubjectAccessReviewSpec struct {
|
type SubjectAccessReviewSpec struct {
|
||||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||||
|
// +optional
|
||||||
ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
|
ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
|
||||||
// NonResourceAttributes describes information for a non-resource access request
|
// NonResourceAttributes describes information for a non-resource access request
|
||||||
|
// +optional
|
||||||
NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
|
NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
|
||||||
|
|
||||||
// User is the user you're testing for.
|
// User is the user you're testing for.
|
||||||
// If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
|
// If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups
|
||||||
|
// +optional
|
||||||
User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
|
User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=verb"`
|
||||||
// Groups is the groups you're testing for.
|
// Groups is the groups you're testing for.
|
||||||
|
// +optional
|
||||||
Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"`
|
Groups []string `json:"group,omitempty" protobuf:"bytes,4,rep,name=group"`
|
||||||
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
// Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer
|
||||||
// it needs a reflection here.
|
// it needs a reflection here.
|
||||||
|
// +optional
|
||||||
Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
|
Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,8 +155,10 @@ func (t ExtraValue) String() string {
|
|||||||
// and NonResourceAuthorizationAttributes must be set
|
// and NonResourceAuthorizationAttributes must be set
|
||||||
type SelfSubjectAccessReviewSpec struct {
|
type SelfSubjectAccessReviewSpec struct {
|
||||||
// ResourceAuthorizationAttributes describes information for a resource access request
|
// ResourceAuthorizationAttributes describes information for a resource access request
|
||||||
|
// +optional
|
||||||
ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
|
ResourceAttributes *ResourceAttributes `json:"resourceAttributes,omitempty" protobuf:"bytes,1,opt,name=resourceAttributes"`
|
||||||
// NonResourceAttributes describes information for a non-resource access request
|
// NonResourceAttributes describes information for a non-resource access request
|
||||||
|
// +optional
|
||||||
NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
|
NonResourceAttributes *NonResourceAttributes `json:"nonResourceAttributes,omitempty" protobuf:"bytes,2,opt,name=nonResourceAttributes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,9 +167,11 @@ type SubjectAccessReviewStatus struct {
|
|||||||
// Allowed is required. True if the action would be allowed, false otherwise.
|
// Allowed is required. True if the action would be allowed, false otherwise.
|
||||||
Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
|
Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"`
|
||||||
// Reason is optional. It indicates why a request was allowed or denied.
|
// Reason is optional. It indicates why a request was allowed or denied.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
||||||
// EvaluationError is an indication that some error occurred during the authorization check.
|
// EvaluationError is an indication that some error occurred during the authorization check.
|
||||||
// It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
|
// It is entirely possible to get an error and be able to continue determine authorization status in spite of it.
|
||||||
// For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
|
// For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
|
||||||
|
// +optional
|
||||||
EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
|
EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,3,opt,name=evaluationError"`
|
||||||
}
|
}
|
||||||
|
@ -25,18 +25,22 @@ import (
|
|||||||
type Scale struct {
|
type Scale struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec ScaleSpec `json:"spec,omitempty"`
|
Spec ScaleSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
||||||
|
// +optional
|
||||||
Status ScaleStatus `json:"status,omitempty"`
|
Status ScaleStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleSpec describes the attributes of a scale subresource.
|
// ScaleSpec describes the attributes of a scale subresource.
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// desired number of instances for the scaled object.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty"`
|
Replicas int32 `json:"replicas,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,6 +53,7 @@ type ScaleStatus struct {
|
|||||||
// as the label selector but in the string format to avoid introspection
|
// as the label selector but in the string format to avoid introspection
|
||||||
// by clients. The string will be in the same format as the query-param syntax.
|
// by clients. The string will be in the same format as the query-param syntax.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector string `json:"selector,omitempty"`
|
Selector string `json:"selector,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +64,7 @@ type CrossVersionObjectReference struct {
|
|||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
// API version of the referent
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,21 +74,25 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// and will set the desired number of pods by using its Scale subresource.
|
// and will set the desired number of pods by using its Scale subresource.
|
||||||
ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef"`
|
ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef"`
|
||||||
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
||||||
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty"`
|
MinReplicas *int32 `json:"minReplicas,omitempty"`
|
||||||
// upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinReplicas.
|
// upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas"`
|
||||||
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||||
// if not specified the default autoscaling policy will be used.
|
// if not specified the default autoscaling policy will be used.
|
||||||
|
// +optional
|
||||||
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"`
|
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// current status of a horizontal pod autoscaler
|
// current status of a horizontal pod autoscaler
|
||||||
type HorizontalPodAutoscalerStatus struct {
|
type HorizontalPodAutoscalerStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// most recent generation observed by this autoscaler.
|
||||||
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||||
|
|
||||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
||||||
// used by the autoscaler to control how often the number of pods is changed.
|
// used by the autoscaler to control how often the number of pods is changed.
|
||||||
|
// +optional
|
||||||
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"`
|
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"`
|
||||||
|
|
||||||
// current number of replicas of pods managed by this autoscaler.
|
// current number of replicas of pods managed by this autoscaler.
|
||||||
@ -93,6 +103,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
|
|
||||||
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||||
|
// +optional
|
||||||
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
|
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,18 +112,22 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
// configuration of a horizontal pod autoscaler.
|
// configuration of a horizontal pod autoscaler.
|
||||||
type HorizontalPodAutoscaler struct {
|
type HorizontalPodAutoscaler struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty"`
|
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// current information about the autoscaler.
|
// current information about the autoscaler.
|
||||||
|
// +optional
|
||||||
Status HorizontalPodAutoscalerStatus `json:"status,omitempty"`
|
Status HorizontalPodAutoscalerStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// list of horizontal pod autoscaler objects.
|
||||||
type HorizontalPodAutoscalerList struct {
|
type HorizontalPodAutoscalerList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// list of horizontal pod autoscaler objects.
|
||||||
|
@ -28,6 +28,7 @@ type CrossVersionObjectReference struct {
|
|||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
// API version of the referent
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,21 +38,25 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// and will set the desired number of pods by using its Scale subresource.
|
// and will set the desired number of pods by using its Scale subresource.
|
||||||
ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
|
ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef" protobuf:"bytes,1,opt,name=scaleTargetRef"`
|
||||||
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
||||||
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
||||||
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
||||||
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||||
// if not specified the default autoscaling policy will be used.
|
// if not specified the default autoscaling policy will be used.
|
||||||
|
// +optional
|
||||||
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
|
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// current status of a horizontal pod autoscaler
|
// current status of a horizontal pod autoscaler
|
||||||
type HorizontalPodAutoscalerStatus struct {
|
type HorizontalPodAutoscalerStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// most recent generation observed by this autoscaler.
|
||||||
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
||||||
// used by the autoscaler to control how often the number of pods is changed.
|
// used by the autoscaler to control how often the number of pods is changed.
|
||||||
|
// +optional
|
||||||
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
||||||
|
|
||||||
// current number of replicas of pods managed by this autoscaler.
|
// current number of replicas of pods managed by this autoscaler.
|
||||||
@ -62,6 +67,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
|
|
||||||
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||||
|
// +optional
|
||||||
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,12 +77,15 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
type HorizontalPodAutoscaler struct {
|
type HorizontalPodAutoscaler struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current information about the autoscaler.
|
// current information about the autoscaler.
|
||||||
|
// +optional
|
||||||
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +93,7 @@ type HorizontalPodAutoscaler struct {
|
|||||||
type HorizontalPodAutoscalerList struct {
|
type HorizontalPodAutoscalerList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// list of horizontal pod autoscaler objects.
|
||||||
@ -94,18 +104,22 @@ type HorizontalPodAutoscalerList struct {
|
|||||||
type Scale struct {
|
type Scale struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
||||||
|
// +optional
|
||||||
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleSpec describes the attributes of a scale subresource.
|
// ScaleSpec describes the attributes of a scale subresource.
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// desired number of instances for the scaled object.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,5 +132,6 @@ type ScaleStatus struct {
|
|||||||
// as the label selector but in the string format to avoid introspection
|
// as the label selector but in the string format to avoid introspection
|
||||||
// by clients. The string will be in the same format as the query-param syntax.
|
// by clients. The string will be in the same format as the query-param syntax.
|
||||||
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
Selector string `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||||
}
|
}
|
||||||
|
@ -28,14 +28,17 @@ type Job struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job.
|
// Spec is a structure defining the expected behavior of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty"`
|
Spec JobSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status JobStatus `json:"status,omitempty"`
|
Status JobStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,6 +47,7 @@ type JobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of Job.
|
// Items is the list of Job.
|
||||||
@ -55,10 +59,12 @@ type JobTemplate struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Template defines jobs that will be created from this template
|
// Template defines jobs that will be created from this template
|
||||||
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Template JobTemplateSpec `json:"template,omitempty"`
|
Template JobTemplateSpec `json:"template,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,10 +72,12 @@ type JobTemplate struct {
|
|||||||
type JobTemplateSpec struct {
|
type JobTemplateSpec struct {
|
||||||
// Standard object's metadata of the jobs created from this template.
|
// Standard object's metadata of the jobs created from this template.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the job.
|
// Specification of the desired behavior of the job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty"`
|
Spec JobSpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +88,7 @@ type JobSpec struct {
|
|||||||
// run at any given time. The actual number of pods running in steady state will
|
// run at any given time. The actual number of pods running in steady state will
|
||||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||||
// i.e. when the work left to do is less than max parallelism.
|
// i.e. when the work left to do is less than max parallelism.
|
||||||
|
// +optional
|
||||||
Parallelism *int32 `json:"parallelism,omitempty"`
|
Parallelism *int32 `json:"parallelism,omitempty"`
|
||||||
|
|
||||||
// Completions specifies the desired number of successfully finished pods the
|
// Completions specifies the desired number of successfully finished pods the
|
||||||
@ -87,14 +96,17 @@ type JobSpec struct {
|
|||||||
// pod signals the success of all pods, and allows parallelism to have any positive
|
// pod signals the success of all pods, and allows parallelism to have any positive
|
||||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||||
// pod signals the success of the job.
|
// pod signals the success of the job.
|
||||||
|
// +optional
|
||||||
Completions *int32 `json:"completions,omitempty"`
|
Completions *int32 `json:"completions,omitempty"`
|
||||||
|
|
||||||
// Optional duration in seconds relative to the startTime that the job may be active
|
// Optional duration in seconds relative to the startTime that the job may be active
|
||||||
// before the system tries to terminate it; value must be positive integer
|
// before the system tries to terminate it; value must be positive integer
|
||||||
|
// +optional
|
||||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
|
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the pod count.
|
// Selector is a label query over pods that should match the pod count.
|
||||||
// Normally, the system sets this field for you.
|
// Normally, the system sets this field for you.
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
|
|
||||||
// ManualSelector controls generation of pod labels and pod selectors.
|
// ManualSelector controls generation of pod labels and pod selectors.
|
||||||
@ -106,6 +118,7 @@ type JobSpec struct {
|
|||||||
// and other jobs to not function correctly. However, You may see
|
// and other jobs to not function correctly. However, You may see
|
||||||
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
||||||
// API.
|
// API.
|
||||||
|
// +optional
|
||||||
ManualSelector *bool `json:"manualSelector,omitempty"`
|
ManualSelector *bool `json:"manualSelector,omitempty"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created when
|
// Template is the object that describes the pod that will be created when
|
||||||
@ -117,25 +130,31 @@ type JobSpec struct {
|
|||||||
type JobStatus struct {
|
type JobStatus struct {
|
||||||
|
|
||||||
// Conditions represent the latest available observations of an object's current state.
|
// Conditions represent the latest available observations of an object's current state.
|
||||||
|
// +optional
|
||||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
|
|
||||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||||
// It is not guaranteed to be set in happens-before order across separate operations.
|
// It is not guaranteed to be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
StartTime *unversioned.Time `json:"startTime,omitempty"`
|
StartTime *unversioned.Time `json:"startTime,omitempty"`
|
||||||
|
|
||||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||||
// be set in happens-before order across separate operations.
|
// be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
CompletionTime *unversioned.Time `json:"completionTime,omitempty"`
|
CompletionTime *unversioned.Time `json:"completionTime,omitempty"`
|
||||||
|
|
||||||
// Active is the number of actively running pods.
|
// Active is the number of actively running pods.
|
||||||
|
// +optional
|
||||||
Active int32 `json:"active,omitempty"`
|
Active int32 `json:"active,omitempty"`
|
||||||
|
|
||||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||||
|
// +optional
|
||||||
Succeeded int32 `json:"succeeded,omitempty"`
|
Succeeded int32 `json:"succeeded,omitempty"`
|
||||||
|
|
||||||
// Failed is the number of pods which reached Phase Failed.
|
// Failed is the number of pods which reached Phase Failed.
|
||||||
|
// +optional
|
||||||
Failed int32 `json:"failed,omitempty"`
|
Failed int32 `json:"failed,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,12 +175,16 @@ type JobCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status api.ConditionStatus `json:"status"`
|
Status api.ConditionStatus `json:"status"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,14 +195,17 @@ type ScheduledJob struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec ScheduledJobSpec `json:"spec,omitempty"`
|
Spec ScheduledJobSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status ScheduledJobStatus `json:"status,omitempty"`
|
Status ScheduledJobStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +214,7 @@ type ScheduledJobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of ScheduledJob.
|
// Items is the list of ScheduledJob.
|
||||||
@ -202,13 +229,16 @@ type ScheduledJobSpec struct {
|
|||||||
|
|
||||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||||
// time for any reason. Missed jobs executions will be counted as failed ones.
|
// time for any reason. Missed jobs executions will be counted as failed ones.
|
||||||
|
// +optional
|
||||||
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
|
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
|
||||||
|
|
||||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||||
|
// +optional
|
||||||
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
|
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
|
||||||
|
|
||||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||||
// not apply to already started executions. Defaults to false.
|
// not apply to already started executions. Defaults to false.
|
||||||
|
// +optional
|
||||||
Suspend *bool `json:"suspend,omitempty"`
|
Suspend *bool `json:"suspend,omitempty"`
|
||||||
|
|
||||||
// JobTemplate is the object that describes the job that will be created when
|
// JobTemplate is the object that describes the job that will be created when
|
||||||
@ -237,8 +267,10 @@ const (
|
|||||||
// ScheduledJobStatus represents the current state of a Job.
|
// ScheduledJobStatus represents the current state of a Job.
|
||||||
type ScheduledJobStatus struct {
|
type ScheduledJobStatus struct {
|
||||||
// Active holds pointers to currently running jobs.
|
// Active holds pointers to currently running jobs.
|
||||||
|
// +optional
|
||||||
Active []api.ObjectReference `json:"active,omitempty"`
|
Active []api.ObjectReference `json:"active,omitempty"`
|
||||||
|
|
||||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||||
|
// +optional
|
||||||
LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty"`
|
LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -28,14 +28,17 @@ type Job struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job.
|
// Spec is a structure defining the expected behavior of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,6 +47,7 @@ type JobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of Job.
|
// Items is the list of Job.
|
||||||
@ -58,6 +62,7 @@ type JobSpec struct {
|
|||||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||||
// i.e. when the work left to do is less than max parallelism.
|
// i.e. when the work left to do is less than max parallelism.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||||
|
|
||||||
// Completions specifies the desired number of successfully finished pods the
|
// Completions specifies the desired number of successfully finished pods the
|
||||||
@ -66,15 +71,18 @@ type JobSpec struct {
|
|||||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||||
// pod signals the success of the job.
|
// pod signals the success of the job.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
||||||
|
|
||||||
// Optional duration in seconds relative to the startTime that the job may be active
|
// Optional duration in seconds relative to the startTime that the job may be active
|
||||||
// before the system tries to terminate it; value must be positive integer
|
// before the system tries to terminate it; value must be positive integer
|
||||||
|
// +optional
|
||||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the pod count.
|
// Selector is a label query over pods that should match the pod count.
|
||||||
// Normally, the system sets this field for you.
|
// Normally, the system sets this field for you.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
||||||
|
|
||||||
// ManualSelector controls generation of pod labels and pod selectors.
|
// ManualSelector controls generation of pod labels and pod selectors.
|
||||||
@ -87,6 +95,7 @@ type JobSpec struct {
|
|||||||
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
||||||
// API.
|
// API.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
||||||
|
// +optional
|
||||||
ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
|
ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created when
|
// Template is the object that describes the pod that will be created when
|
||||||
@ -100,25 +109,31 @@ type JobStatus struct {
|
|||||||
|
|
||||||
// Conditions represent the latest available observations of an object's current state.
|
// Conditions represent the latest available observations of an object's current state.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||||
|
|
||||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||||
// It is not guaranteed to be set in happens-before order across separate operations.
|
// It is not guaranteed to be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
||||||
|
|
||||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||||
// be set in happens-before order across separate operations.
|
// be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
||||||
|
|
||||||
// Active is the number of actively running pods.
|
// Active is the number of actively running pods.
|
||||||
|
// +optional
|
||||||
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
||||||
|
|
||||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||||
|
// +optional
|
||||||
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
||||||
|
|
||||||
// Failed is the number of pods which reached Phase Failed.
|
// Failed is the number of pods which reached Phase Failed.
|
||||||
|
// +optional
|
||||||
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,12 +154,16 @@ type JobCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,8 +174,10 @@ type LabelSelector struct {
|
|||||||
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||||
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||||
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
||||||
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,6 +193,7 @@ type LabelSelectorRequirement struct {
|
|||||||
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||||
// the values array must be empty. This array is replaced during a strategic
|
// the values array must be empty. This array is replaced during a strategic
|
||||||
// merge patch.
|
// merge patch.
|
||||||
|
// +optional
|
||||||
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,14 +26,17 @@ type Job struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job.
|
// Spec is a structure defining the expected behavior of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +45,7 @@ type JobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of Job.
|
// Items is the list of Job.
|
||||||
@ -53,10 +57,12 @@ type JobTemplate struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Template defines jobs that will be created from this template
|
// Template defines jobs that will be created from this template
|
||||||
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
|
Template JobTemplateSpec `json:"template,omitempty" protobuf:"bytes,2,opt,name=template"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +70,12 @@ type JobTemplate struct {
|
|||||||
type JobTemplateSpec struct {
|
type JobTemplateSpec struct {
|
||||||
// Standard object's metadata of the jobs created from this template.
|
// Standard object's metadata of the jobs created from this template.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the job.
|
// Specification of the desired behavior of the job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +87,7 @@ type JobSpec struct {
|
|||||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||||
// i.e. when the work left to do is less than max parallelism.
|
// i.e. when the work left to do is less than max parallelism.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||||
|
|
||||||
// Completions specifies the desired number of successfully finished pods the
|
// Completions specifies the desired number of successfully finished pods the
|
||||||
@ -87,15 +96,18 @@ type JobSpec struct {
|
|||||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||||
// pod signals the success of the job.
|
// pod signals the success of the job.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
||||||
|
|
||||||
// Optional duration in seconds relative to the startTime that the job may be active
|
// Optional duration in seconds relative to the startTime that the job may be active
|
||||||
// before the system tries to terminate it; value must be positive integer
|
// before the system tries to terminate it; value must be positive integer
|
||||||
|
// +optional
|
||||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the pod count.
|
// Selector is a label query over pods that should match the pod count.
|
||||||
// Normally, the system sets this field for you.
|
// Normally, the system sets this field for you.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
||||||
|
|
||||||
// ManualSelector controls generation of pod labels and pod selectors.
|
// ManualSelector controls generation of pod labels and pod selectors.
|
||||||
@ -108,6 +120,7 @@ type JobSpec struct {
|
|||||||
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
||||||
// API.
|
// API.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
||||||
|
// +optional
|
||||||
ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
|
ManualSelector *bool `json:"manualSelector,omitempty" protobuf:"varint,5,opt,name=manualSelector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created when
|
// Template is the object that describes the pod that will be created when
|
||||||
@ -121,25 +134,31 @@ type JobStatus struct {
|
|||||||
|
|
||||||
// Conditions represent the latest available observations of an object's current state.
|
// Conditions represent the latest available observations of an object's current state.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||||
|
|
||||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||||
// It is not guaranteed to be set in happens-before order across separate operations.
|
// It is not guaranteed to be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
||||||
|
|
||||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||||
// be set in happens-before order across separate operations.
|
// be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
||||||
|
|
||||||
// Active is the number of actively running pods.
|
// Active is the number of actively running pods.
|
||||||
|
// +optional
|
||||||
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
||||||
|
|
||||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||||
|
// +optional
|
||||||
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
||||||
|
|
||||||
// Failed is the number of pods which reached Phase Failed.
|
// Failed is the number of pods which reached Phase Failed.
|
||||||
|
// +optional
|
||||||
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,12 +179,16 @@ type JobCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,14 +197,17 @@ type ScheduledJob struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
// Spec is a structure defining the expected behavior of a job, including the schedule.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec ScheduledJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ScheduledJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status ScheduledJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ScheduledJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,6 +216,7 @@ type ScheduledJobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of ScheduledJob.
|
// Items is the list of ScheduledJob.
|
||||||
@ -204,13 +231,16 @@ type ScheduledJobSpec struct {
|
|||||||
|
|
||||||
// Optional deadline in seconds for starting the job if it misses scheduled
|
// Optional deadline in seconds for starting the job if it misses scheduled
|
||||||
// time for any reason. Missed jobs executions will be counted as failed ones.
|
// time for any reason. Missed jobs executions will be counted as failed ones.
|
||||||
|
// +optional
|
||||||
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
|
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`
|
||||||
|
|
||||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||||
|
// +optional
|
||||||
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
|
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`
|
||||||
|
|
||||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||||
// not apply to already started executions. Defaults to false.
|
// not apply to already started executions. Defaults to false.
|
||||||
|
// +optional
|
||||||
Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
|
Suspend *bool `json:"suspend,omitempty" protobuf:"varint,4,opt,name=suspend"`
|
||||||
|
|
||||||
// JobTemplate is the object that describes the job that will be created when
|
// JobTemplate is the object that describes the job that will be created when
|
||||||
@ -239,9 +269,11 @@ const (
|
|||||||
// ScheduledJobStatus represents the current state of a Job.
|
// ScheduledJobStatus represents the current state of a Job.
|
||||||
type ScheduledJobStatus struct {
|
type ScheduledJobStatus struct {
|
||||||
// Active holds pointers to currently running jobs.
|
// Active holds pointers to currently running jobs.
|
||||||
|
// +optional
|
||||||
Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
|
Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"`
|
||||||
|
|
||||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||||
|
// +optional
|
||||||
LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
|
LastScheduleTime *unversioned.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,8 +284,10 @@ type LabelSelector struct {
|
|||||||
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||||
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||||
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
||||||
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +303,7 @@ type LabelSelectorRequirement struct {
|
|||||||
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||||
// the values array must be empty. This array is replaced during a strategic
|
// the values array must be empty. This array is replaced during a strategic
|
||||||
// merge patch.
|
// merge patch.
|
||||||
|
// +optional
|
||||||
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,12 +27,15 @@ import (
|
|||||||
// Describes a certificate signing request
|
// Describes a certificate signing request
|
||||||
type CertificateSigningRequest struct {
|
type CertificateSigningRequest struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// The certificate request itself and any additional information.
|
// The certificate request itself and any additional information.
|
||||||
|
// +optional
|
||||||
Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
|
Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Derived information about the request.
|
// Derived information about the request.
|
||||||
|
// +optional
|
||||||
Status CertificateSigningRequestStatus `json:"status,omitempty"`
|
Status CertificateSigningRequestStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,16 +48,21 @@ type CertificateSigningRequestSpec struct {
|
|||||||
|
|
||||||
// Information about the requesting user (if relevant)
|
// Information about the requesting user (if relevant)
|
||||||
// See user.Info interface for details
|
// See user.Info interface for details
|
||||||
Username string `json:"username,omitempty"`
|
// +optional
|
||||||
UID string `json:"uid,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
Groups []string `json:"groups,omitempty"`
|
// +optional
|
||||||
|
UID string `json:"uid,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Groups []string `json:"groups,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CertificateSigningRequestStatus struct {
|
type CertificateSigningRequestStatus struct {
|
||||||
// Conditions applied to the request, such as approval or denial.
|
// Conditions applied to the request, such as approval or denial.
|
||||||
|
// +optional
|
||||||
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"`
|
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"`
|
||||||
|
|
||||||
// If request was approved, the controller will place the issued certificate here.
|
// If request was approved, the controller will place the issued certificate here.
|
||||||
|
// +optional
|
||||||
Certificate []byte `json:"certificate,omitempty"`
|
Certificate []byte `json:"certificate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,16 +78,21 @@ type CertificateSigningRequestCondition struct {
|
|||||||
// request approval state, currently Approved or Denied.
|
// request approval state, currently Approved or Denied.
|
||||||
Type RequestConditionType `json:"type"`
|
Type RequestConditionType `json:"type"`
|
||||||
// brief reason for the request state
|
// brief reason for the request state
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
// human readable message with details about the request state
|
// human readable message with details about the request state
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
// timestamp for the last update to this condition
|
// timestamp for the last update to this condition
|
||||||
|
// +optional
|
||||||
LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"`
|
LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CertificateSigningRequestList struct {
|
type CertificateSigningRequestList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
|
// +optional
|
||||||
Items []CertificateSigningRequest `json:"items,omitempty"`
|
Items []CertificateSigningRequest `json:"items,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,15 @@ import (
|
|||||||
// Describes a certificate signing request
|
// Describes a certificate signing request
|
||||||
type CertificateSigningRequest struct {
|
type CertificateSigningRequest struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// The certificate request itself and any additional information.
|
// The certificate request itself and any additional information.
|
||||||
|
// +optional
|
||||||
Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Derived information about the request.
|
// Derived information about the request.
|
||||||
|
// +optional
|
||||||
Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,16 +48,21 @@ type CertificateSigningRequestSpec struct {
|
|||||||
|
|
||||||
// Information about the requesting user (if relevant)
|
// Information about the requesting user (if relevant)
|
||||||
// See user.Info interface for details
|
// See user.Info interface for details
|
||||||
Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
|
// +optional
|
||||||
UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
|
Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"`
|
||||||
Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
|
// +optional
|
||||||
|
UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"`
|
||||||
|
// +optional
|
||||||
|
Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CertificateSigningRequestStatus struct {
|
type CertificateSigningRequestStatus struct {
|
||||||
// Conditions applied to the request, such as approval or denial.
|
// Conditions applied to the request, such as approval or denial.
|
||||||
|
// +optional
|
||||||
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
|
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
|
||||||
|
|
||||||
// If request was approved, the controller will place the issued certificate here.
|
// If request was approved, the controller will place the issued certificate here.
|
||||||
|
// +optional
|
||||||
Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"`
|
Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,15 +78,19 @@ type CertificateSigningRequestCondition struct {
|
|||||||
// request approval state, currently Approved or Denied.
|
// request approval state, currently Approved or Denied.
|
||||||
Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"`
|
Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"`
|
||||||
// brief reason for the request state
|
// brief reason for the request state
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
||||||
// human readable message with details about the request state
|
// human readable message with details about the request state
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"`
|
||||||
// timestamp for the last update to this condition
|
// timestamp for the last update to this condition
|
||||||
|
// +optional
|
||||||
LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
|
LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CertificateSigningRequestList struct {
|
type CertificateSigningRequestList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []CertificateSigningRequest `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
|
@ -271,25 +271,33 @@ type KubeletConfiguration struct {
|
|||||||
// for additional third party volume plugins
|
// for additional third party volume plugins
|
||||||
VolumePluginDir string `json:"volumePluginDir"`
|
VolumePluginDir string `json:"volumePluginDir"`
|
||||||
// cloudProvider is the provider for cloud services.
|
// cloudProvider is the provider for cloud services.
|
||||||
|
// +optional
|
||||||
CloudProvider string `json:"cloudProvider,omitempty"`
|
CloudProvider string `json:"cloudProvider,omitempty"`
|
||||||
// cloudConfigFile is the path to the cloud provider configuration file.
|
// cloudConfigFile is the path to the cloud provider configuration file.
|
||||||
|
// +optional
|
||||||
CloudConfigFile string `json:"cloudConfigFile,omitempty"`
|
CloudConfigFile string `json:"cloudConfigFile,omitempty"`
|
||||||
// KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
|
// KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
|
||||||
|
// +optional
|
||||||
KubeletCgroups string `json:"kubeletCgroups,omitempty"`
|
KubeletCgroups string `json:"kubeletCgroups,omitempty"`
|
||||||
// Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
|
// Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
|
||||||
// And all Burstable and BestEffort pods are brought up under their
|
// And all Burstable and BestEffort pods are brought up under their
|
||||||
// specific top level QoS cgroup.
|
// specific top level QoS cgroup.
|
||||||
|
// +optional
|
||||||
CgroupsPerQOS bool `json:"cgroupsPerQOS,omitempty"`
|
CgroupsPerQOS bool `json:"cgroupsPerQOS,omitempty"`
|
||||||
// driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd)
|
// driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd)
|
||||||
|
// +optional
|
||||||
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
||||||
// Cgroups that container runtime is expected to be isolated in.
|
// Cgroups that container runtime is expected to be isolated in.
|
||||||
|
// +optional
|
||||||
RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
|
RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
|
||||||
// SystemCgroups is absolute name of cgroups in which to place
|
// SystemCgroups is absolute name of cgroups in which to place
|
||||||
// all non-kernel processes that are not already in a container. Empty
|
// all non-kernel processes that are not already in a container. Empty
|
||||||
// for no container. Rolling back the flag requires a reboot.
|
// for no container. Rolling back the flag requires a reboot.
|
||||||
|
// +optional
|
||||||
SystemCgroups string `json:"systemCgroups,omitempty"`
|
SystemCgroups string `json:"systemCgroups,omitempty"`
|
||||||
// CgroupRoot is the root cgroup to use for pods.
|
// CgroupRoot is the root cgroup to use for pods.
|
||||||
// If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.
|
// If CgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.
|
||||||
|
// +optional
|
||||||
CgroupRoot string `json:"cgroupRoot,omitempty"`
|
CgroupRoot string `json:"cgroupRoot,omitempty"`
|
||||||
// containerRuntime is the container runtime to use.
|
// containerRuntime is the container runtime to use.
|
||||||
ContainerRuntime string `json:"containerRuntime"`
|
ContainerRuntime string `json:"containerRuntime"`
|
||||||
@ -299,14 +307,18 @@ type KubeletConfiguration struct {
|
|||||||
RemoteImageEndpoint string `json:"remoteImageEndpoint"`
|
RemoteImageEndpoint string `json:"remoteImageEndpoint"`
|
||||||
// runtimeRequestTimeout is the timeout for all runtime requests except long running
|
// runtimeRequestTimeout is the timeout for all runtime requests except long running
|
||||||
// requests - pull, logs, exec and attach.
|
// requests - pull, logs, exec and attach.
|
||||||
|
// +optional
|
||||||
RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout,omitempty"`
|
RuntimeRequestTimeout unversioned.Duration `json:"runtimeRequestTimeout,omitempty"`
|
||||||
// rktPath is the path of rkt binary. Leave empty to use the first rkt in
|
// rktPath is the path of rkt binary. Leave empty to use the first rkt in
|
||||||
// $PATH.
|
// $PATH.
|
||||||
|
// +optional
|
||||||
RktPath string `json:"rktPath,omitempty"`
|
RktPath string `json:"rktPath,omitempty"`
|
||||||
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
||||||
|
// +optional
|
||||||
RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
|
RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
|
||||||
// rktStage1Image is the image to use as stage1. Local paths and
|
// rktStage1Image is the image to use as stage1. Local paths and
|
||||||
// http/https URLs are supported.
|
// http/https URLs are supported.
|
||||||
|
// +optional
|
||||||
RktStage1Image string `json:"rktStage1Image,omitempty"`
|
RktStage1Image string `json:"rktStage1Image,omitempty"`
|
||||||
// lockFilePath is the path that kubelet will use to as a lock file.
|
// lockFilePath is the path that kubelet will use to as a lock file.
|
||||||
// It uses this file as a lock to synchronize with other kubelet processes
|
// It uses this file as a lock to synchronize with other kubelet processes
|
||||||
@ -373,9 +385,11 @@ type KubeletConfiguration struct {
|
|||||||
SerializeImagePulls bool `json:"serializeImagePulls"`
|
SerializeImagePulls bool `json:"serializeImagePulls"`
|
||||||
// outOfDiskTransitionFrequency is duration for which the kubelet has to
|
// outOfDiskTransitionFrequency is duration for which the kubelet has to
|
||||||
// wait before transitioning out of out-of-disk node condition status.
|
// wait before transitioning out of out-of-disk node condition status.
|
||||||
|
// +optional
|
||||||
OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency,omitempty"`
|
OutOfDiskTransitionFrequency unversioned.Duration `json:"outOfDiskTransitionFrequency,omitempty"`
|
||||||
// nodeIP is IP address of the node. If set, kubelet will use this IP
|
// nodeIP is IP address of the node. If set, kubelet will use this IP
|
||||||
// address for the node.
|
// address for the node.
|
||||||
|
// +optional
|
||||||
NodeIP string `json:"nodeIP,omitempty"`
|
NodeIP string `json:"nodeIP,omitempty"`
|
||||||
// nodeLabels to add when registering the node in the cluster.
|
// nodeLabels to add when registering the node in the cluster.
|
||||||
NodeLabels map[string]string `json:"nodeLabels"`
|
NodeLabels map[string]string `json:"nodeLabels"`
|
||||||
@ -384,16 +398,22 @@ type KubeletConfiguration struct {
|
|||||||
// enable gathering custom metrics.
|
// enable gathering custom metrics.
|
||||||
EnableCustomMetrics bool `json:"enableCustomMetrics"`
|
EnableCustomMetrics bool `json:"enableCustomMetrics"`
|
||||||
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
|
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
|
||||||
|
// +optional
|
||||||
EvictionHard string `json:"evictionHard,omitempty"`
|
EvictionHard string `json:"evictionHard,omitempty"`
|
||||||
// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
|
// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
|
||||||
|
// +optional
|
||||||
EvictionSoft string `json:"evictionSoft,omitempty"`
|
EvictionSoft string `json:"evictionSoft,omitempty"`
|
||||||
// Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
|
// Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
|
||||||
|
// +optional
|
||||||
EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
|
EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
|
||||||
// Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
|
// Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
|
||||||
|
// +optional
|
||||||
EvictionPressureTransitionPeriod unversioned.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
|
EvictionPressureTransitionPeriod unversioned.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
|
||||||
// Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.
|
// Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.
|
||||||
|
// +optional
|
||||||
EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"`
|
EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"`
|
||||||
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
|
// Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.
|
||||||
|
// +optional
|
||||||
EvictionMinimumReclaim string `json:"evictionMinimumReclaim,omitempty"`
|
EvictionMinimumReclaim string `json:"evictionMinimumReclaim,omitempty"`
|
||||||
// Maximum number of pods per core. Cannot exceed MaxPods
|
// Maximum number of pods per core. Cannot exceed MaxPods
|
||||||
PodsPerCore int32 `json:"podsPerCore"`
|
PodsPerCore int32 `json:"podsPerCore"`
|
||||||
@ -426,9 +446,11 @@ type KubeletConfiguration struct {
|
|||||||
// Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
|
// Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
|
||||||
IPTablesDropBit int32 `json:"iptablesDropBit"`
|
IPTablesDropBit int32 `json:"iptablesDropBit"`
|
||||||
// Whitelist of unsafe sysctls or sysctl patterns (ending in *).
|
// Whitelist of unsafe sysctls or sysctl patterns (ending in *).
|
||||||
|
// +optional
|
||||||
AllowedUnsafeSysctls []string `json:"experimentalAllowedUnsafeSysctls,omitempty"`
|
AllowedUnsafeSysctls []string `json:"experimentalAllowedUnsafeSysctls,omitempty"`
|
||||||
// How to integrate with runtime. If set to cri, kubelet will switch to
|
// How to integrate with runtime. If set to cri, kubelet will switch to
|
||||||
// using the new Container Runtine Interface.
|
// using the new Container Runtine Interface.
|
||||||
|
// +optional
|
||||||
ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
|
ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,8 +343,10 @@ type KubeletConfiguration struct {
|
|||||||
// Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
|
// Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
|
||||||
// And all Burstable and BestEffort pods are brought up under their
|
// And all Burstable and BestEffort pods are brought up under their
|
||||||
// specific top level QoS cgroup.
|
// specific top level QoS cgroup.
|
||||||
|
// +optional
|
||||||
CgroupsPerQOS *bool `json:"cgroupsPerQOS,omitempty"`
|
CgroupsPerQOS *bool `json:"cgroupsPerQOS,omitempty"`
|
||||||
// driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd)
|
// driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd)
|
||||||
|
// +optional
|
||||||
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
||||||
// containerRuntime is the container runtime to use.
|
// containerRuntime is the container runtime to use.
|
||||||
ContainerRuntime string `json:"containerRuntime"`
|
ContainerRuntime string `json:"containerRuntime"`
|
||||||
@ -482,8 +484,10 @@ type KubeletConfiguration struct {
|
|||||||
IPTablesDropBit *int32 `json:"iptablesDropBit"`
|
IPTablesDropBit *int32 `json:"iptablesDropBit"`
|
||||||
// Whitelist of unsafe sysctls or sysctl patterns (ending in *). Use these at your own risk.
|
// Whitelist of unsafe sysctls or sysctl patterns (ending in *). Use these at your own risk.
|
||||||
// Resource isolation might be lacking and pod might influence each other on the same node.
|
// Resource isolation might be lacking and pod might influence each other on the same node.
|
||||||
|
// +optional
|
||||||
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`
|
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`
|
||||||
// How to integrate with runtime. If set to CRI, kubelet will switch to
|
// How to integrate with runtime. If set to CRI, kubelet will switch to
|
||||||
// using the new Container Runtine Interface.
|
// using the new Container Runtine Interface.
|
||||||
|
// +optional
|
||||||
ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
|
ExperimentalRuntimeIntegrationType string `json:"experimentalRuntimeIntegrationType,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@ const (
|
|||||||
// describes the attributes of a scale subresource
|
// describes the attributes of a scale subresource
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// desired number of instances for the scaled object.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty"`
|
Replicas int32 `json:"replicas,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ type ScaleStatus struct {
|
|||||||
|
|
||||||
// label query over pods that should match the replicas count.
|
// label query over pods that should match the replicas count.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,12 +67,15 @@ type ScaleStatus struct {
|
|||||||
type Scale struct {
|
type Scale struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec ScaleSpec `json:"spec,omitempty"`
|
Spec ScaleSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
||||||
|
// +optional
|
||||||
Status ScaleStatus `json:"status,omitempty"`
|
Status ScaleStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,12 +116,15 @@ type ThirdPartyResource struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// Standard object metadata
|
// Standard object metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Description is the description of this object.
|
// Description is the description of this object.
|
||||||
|
// +optional
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
|
|
||||||
// Versions are versions for this third party object
|
// Versions are versions for this third party object
|
||||||
|
// +optional
|
||||||
Versions []APIVersion `json:"versions,omitempty"`
|
Versions []APIVersion `json:"versions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +132,7 @@ type ThirdPartyResourceList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of horizontal pod autoscalers.
|
// Items is the list of horizontal pod autoscalers.
|
||||||
@ -134,6 +143,7 @@ type ThirdPartyResourceList struct {
|
|||||||
// TODO: we should consider merge this struct with GroupVersion in unversioned.go
|
// TODO: we should consider merge this struct with GroupVersion in unversioned.go
|
||||||
type APIVersion struct {
|
type APIVersion struct {
|
||||||
// Name of this version (e.g. 'v1').
|
// Name of this version (e.g. 'v1').
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,9 +151,11 @@ type APIVersion struct {
|
|||||||
type ThirdPartyResourceData struct {
|
type ThirdPartyResourceData struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata.
|
// Standard object metadata.
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Data is the raw JSON data for this data.
|
// Data is the raw JSON data for this data.
|
||||||
|
// +optional
|
||||||
Data []byte `json:"data,omitempty"`
|
Data []byte `json:"data,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,43 +163,53 @@ type ThirdPartyResourceData struct {
|
|||||||
|
|
||||||
type Deployment struct {
|
type Deployment struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the Deployment.
|
// Specification of the desired behavior of the Deployment.
|
||||||
|
// +optional
|
||||||
Spec DeploymentSpec `json:"spec,omitempty"`
|
Spec DeploymentSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Most recently observed status of the Deployment.
|
// Most recently observed status of the Deployment.
|
||||||
|
// +optional
|
||||||
Status DeploymentStatus `json:"status,omitempty"`
|
Status DeploymentStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeploymentSpec struct {
|
type DeploymentSpec struct {
|
||||||
// Number of desired pods. This is a pointer to distinguish between explicit
|
// Number of desired pods. This is a pointer to distinguish between explicit
|
||||||
// zero and not specified. Defaults to 1.
|
// zero and not specified. Defaults to 1.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty"`
|
Replicas int32 `json:"replicas,omitempty"`
|
||||||
|
|
||||||
// Label selector for pods. Existing ReplicaSets whose pods are
|
// Label selector for pods. Existing ReplicaSets whose pods are
|
||||||
// selected by this will be the ones affected by this deployment.
|
// selected by this will be the ones affected by this deployment.
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
|
|
||||||
// Template describes the pods that will be created.
|
// Template describes the pods that will be created.
|
||||||
Template api.PodTemplateSpec `json:"template"`
|
Template api.PodTemplateSpec `json:"template"`
|
||||||
|
|
||||||
// The deployment strategy to use to replace existing pods with new ones.
|
// The deployment strategy to use to replace existing pods with new ones.
|
||||||
|
// +optional
|
||||||
Strategy DeploymentStrategy `json:"strategy,omitempty"`
|
Strategy DeploymentStrategy `json:"strategy,omitempty"`
|
||||||
|
|
||||||
// Minimum number of seconds for which a newly created pod should be ready
|
// Minimum number of seconds for which a newly created pod should be ready
|
||||||
// without any of its container crashing, for it to be considered available.
|
// without any of its container crashing, for it to be considered available.
|
||||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||||
|
// +optional
|
||||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
||||||
|
|
||||||
// The number of old ReplicaSets to retain to allow rollback.
|
// The number of old ReplicaSets to retain to allow rollback.
|
||||||
// This is a pointer to distinguish between explicit zero and not specified.
|
// This is a pointer to distinguish between explicit zero and not specified.
|
||||||
|
// +optional
|
||||||
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
|
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
|
||||||
|
|
||||||
// Indicates that the deployment is paused and will not be processed by the
|
// Indicates that the deployment is paused and will not be processed by the
|
||||||
// deployment controller.
|
// deployment controller.
|
||||||
|
// +optional
|
||||||
Paused bool `json:"paused,omitempty"`
|
Paused bool `json:"paused,omitempty"`
|
||||||
// The config this deployment is rolling back to. Will be cleared after rollback is done.
|
// The config this deployment is rolling back to. Will be cleared after rollback is done.
|
||||||
|
// +optional
|
||||||
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty"`
|
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,6 +219,7 @@ type DeploymentRollback struct {
|
|||||||
// Required: This must match the Name of a deployment.
|
// Required: This must match the Name of a deployment.
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// The annotations to be updated to a deployment
|
// The annotations to be updated to a deployment
|
||||||
|
// +optional
|
||||||
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty"`
|
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty"`
|
||||||
// The config of this deployment rollback.
|
// The config of this deployment rollback.
|
||||||
RollbackTo RollbackConfig `json:"rollbackTo"`
|
RollbackTo RollbackConfig `json:"rollbackTo"`
|
||||||
@ -204,6 +227,7 @@ type DeploymentRollback struct {
|
|||||||
|
|
||||||
type RollbackConfig struct {
|
type RollbackConfig struct {
|
||||||
// The revision to rollback to. If set to 0, rollbck to the last revision.
|
// The revision to rollback to. If set to 0, rollbck to the last revision.
|
||||||
|
// +optional
|
||||||
Revision int64 `json:"revision,omitempty"`
|
Revision int64 `json:"revision,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,6 +240,7 @@ const (
|
|||||||
|
|
||||||
type DeploymentStrategy struct {
|
type DeploymentStrategy struct {
|
||||||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
||||||
|
// +optional
|
||||||
Type DeploymentStrategyType `json:"type,omitempty"`
|
Type DeploymentStrategyType `json:"type,omitempty"`
|
||||||
|
|
||||||
// Rolling update config params. Present only if DeploymentStrategyType =
|
// Rolling update config params. Present only if DeploymentStrategyType =
|
||||||
@ -223,6 +248,7 @@ type DeploymentStrategy struct {
|
|||||||
//---
|
//---
|
||||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||||
// to be.
|
// to be.
|
||||||
|
// +optional
|
||||||
RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
|
RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,6 +274,7 @@ type RollingUpdateDeployment struct {
|
|||||||
// can be scaled down further, followed by scaling up the new RC, ensuring
|
// can be scaled down further, followed by scaling up the new RC, ensuring
|
||||||
// that at least 70% of original number of pods are available at all times
|
// that at least 70% of original number of pods are available at all times
|
||||||
// during the update.
|
// during the update.
|
||||||
|
// +optional
|
||||||
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||||
|
|
||||||
// The maximum number of pods that can be scheduled above the original number of
|
// The maximum number of pods that can be scheduled above the original number of
|
||||||
@ -260,28 +287,35 @@ type RollingUpdateDeployment struct {
|
|||||||
// immediately when the rolling update starts. Once old pods have been killed,
|
// immediately when the rolling update starts. Once old pods have been killed,
|
||||||
// new RC can be scaled up further, ensuring that total number of pods running
|
// new RC can be scaled up further, ensuring that total number of pods running
|
||||||
// at any time during the update is atmost 130% of original pods.
|
// at any time during the update is atmost 130% of original pods.
|
||||||
|
// +optional
|
||||||
MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"`
|
MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeploymentStatus struct {
|
type DeploymentStatus struct {
|
||||||
// The generation observed by the deployment controller.
|
// The generation observed by the deployment controller.
|
||||||
|
// +optional
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||||
|
|
||||||
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty"`
|
Replicas int32 `json:"replicas,omitempty"`
|
||||||
|
|
||||||
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
||||||
|
// +optional
|
||||||
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
|
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
|
||||||
|
|
||||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
||||||
|
// +optional
|
||||||
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
||||||
|
|
||||||
// Total number of unavailable pods targeted by this deployment.
|
// Total number of unavailable pods targeted by this deployment.
|
||||||
|
// +optional
|
||||||
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
|
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeploymentList struct {
|
type DeploymentList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of deployments.
|
// Items is the list of deployments.
|
||||||
@ -292,6 +326,7 @@ type DeploymentList struct {
|
|||||||
/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
|
/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
|
||||||
type DaemonSetUpdateStrategy struct {
|
type DaemonSetUpdateStrategy struct {
|
||||||
// Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
|
// Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
|
||||||
|
// +optional
|
||||||
Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
|
Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
|
||||||
|
|
||||||
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
|
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
|
||||||
@ -299,6 +334,7 @@ type DaemonSetUpdateStrategy struct {
|
|||||||
//---
|
//---
|
||||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||||
// to be. Same as DeploymentStrategy.RollingUpdate.
|
// to be. Same as DeploymentStrategy.RollingUpdate.
|
||||||
|
// +optional
|
||||||
RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
|
RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,12 +360,14 @@ type RollingUpdateDaemonSet struct {
|
|||||||
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
|
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
|
||||||
// 70% of original number of DaemonSet pods are available at all times
|
// 70% of original number of DaemonSet pods are available at all times
|
||||||
// during the update.
|
// during the update.
|
||||||
|
// +optional
|
||||||
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||||
|
|
||||||
// Minimum number of seconds for which a newly created DaemonSet pod should
|
// Minimum number of seconds for which a newly created DaemonSet pod should
|
||||||
// be ready without any of its container crashing, for it to be considered
|
// be ready without any of its container crashing, for it to be considered
|
||||||
// available. Defaults to 0 (pod will be considered available as soon as it
|
// available. Defaults to 0 (pod will be considered available as soon as it
|
||||||
// is ready).
|
// is ready).
|
||||||
|
// +optional
|
||||||
MinReadySeconds int `json:"minReadySeconds,omitempty"`
|
MinReadySeconds int `json:"minReadySeconds,omitempty"`
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -340,6 +378,7 @@ type DaemonSetSpec struct {
|
|||||||
// Must match in order to be controlled.
|
// Must match in order to be controlled.
|
||||||
// If empty, defaulted to labels on Pod template.
|
// If empty, defaulted to labels on Pod template.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created.
|
// Template is the object that describes the pod that will be created.
|
||||||
@ -351,17 +390,19 @@ type DaemonSetSpec struct {
|
|||||||
|
|
||||||
// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
|
// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
|
||||||
/* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
|
/* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
|
||||||
// Update strategy to replace existing DaemonSet pods with new pods.
|
// Update strategy to replace existing DaemonSet pods with new pods.
|
||||||
UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
|
// +optional
|
||||||
|
UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
|
||||||
|
|
||||||
// Label key that is added to DaemonSet pods to distinguish between old and
|
// Label key that is added to DaemonSet pods to distinguish between old and
|
||||||
// new pod templates during DaemonSet update.
|
// new pod templates during DaemonSet update.
|
||||||
// Users can set this to an empty string to indicate that the system should
|
// Users can set this to an empty string to indicate that the system should
|
||||||
// not add any label. If unspecified, system uses
|
// not add any label. If unspecified, system uses
|
||||||
// DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
|
// DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
|
||||||
// Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
|
// Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
|
||||||
// No label is added if this is set to empty string.
|
// No label is added if this is set to empty string.
|
||||||
UniqueLabelKey string `json:"uniqueLabelKey,omitempty"`
|
// +optional
|
||||||
|
UniqueLabelKey string `json:"uniqueLabelKey,omitempty"`
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,10 +439,12 @@ type DaemonSet struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec defines the desired behavior of this daemon set.
|
// Spec defines the desired behavior of this daemon set.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec DaemonSetSpec `json:"spec,omitempty"`
|
Spec DaemonSetSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is the current status of this daemon set. This data may be
|
// Status is the current status of this daemon set. This data may be
|
||||||
@ -409,6 +452,7 @@ type DaemonSet struct {
|
|||||||
// Populated by the system.
|
// Populated by the system.
|
||||||
// Read-only.
|
// Read-only.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status DaemonSetStatus `json:"status,omitempty"`
|
Status DaemonSetStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,6 +461,7 @@ type DaemonSetList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is a list of daemon sets.
|
// Items is a list of daemon sets.
|
||||||
@ -427,6 +472,7 @@ type ThirdPartyResourceDataList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
// Items is a list of third party objects
|
// Items is a list of third party objects
|
||||||
Items []ThirdPartyResourceData `json:"items"`
|
Items []ThirdPartyResourceData `json:"items"`
|
||||||
@ -442,14 +488,17 @@ type Ingress struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec is the desired state of the Ingress.
|
// Spec is the desired state of the Ingress.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec IngressSpec `json:"spec,omitempty"`
|
Spec IngressSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is the current state of the Ingress.
|
// Status is the current state of the Ingress.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status IngressStatus `json:"status,omitempty"`
|
Status IngressStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,6 +507,7 @@ type IngressList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of Ingress.
|
// Items is the list of Ingress.
|
||||||
@ -470,6 +520,7 @@ type IngressSpec struct {
|
|||||||
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
||||||
// is optional to allow the loadbalancer controller or defaulting logic to
|
// is optional to allow the loadbalancer controller or defaulting logic to
|
||||||
// specify a global default.
|
// specify a global default.
|
||||||
|
// +optional
|
||||||
Backend *IngressBackend `json:"backend,omitempty"`
|
Backend *IngressBackend `json:"backend,omitempty"`
|
||||||
|
|
||||||
// TLS configuration. Currently the Ingress only supports a single TLS
|
// TLS configuration. Currently the Ingress only supports a single TLS
|
||||||
@ -477,10 +528,12 @@ type IngressSpec struct {
|
|||||||
// will be multiplexed on the same port according to the hostname specified
|
// will be multiplexed on the same port according to the hostname specified
|
||||||
// through the SNI TLS extension, if the ingress controller fulfilling the
|
// through the SNI TLS extension, if the ingress controller fulfilling the
|
||||||
// ingress supports SNI.
|
// ingress supports SNI.
|
||||||
|
// +optional
|
||||||
TLS []IngressTLS `json:"tls,omitempty"`
|
TLS []IngressTLS `json:"tls,omitempty"`
|
||||||
|
|
||||||
// A list of host rules used to configure the Ingress. If unspecified, or
|
// A list of host rules used to configure the Ingress. If unspecified, or
|
||||||
// no rule matches, all traffic is sent to the default backend.
|
// no rule matches, all traffic is sent to the default backend.
|
||||||
|
// +optional
|
||||||
Rules []IngressRule `json:"rules,omitempty"`
|
Rules []IngressRule `json:"rules,omitempty"`
|
||||||
// TODO: Add the ability to specify load-balancer IP through claims
|
// TODO: Add the ability to specify load-balancer IP through claims
|
||||||
}
|
}
|
||||||
@ -491,12 +544,14 @@ type IngressTLS struct {
|
|||||||
// this list must match the name/s used in the tlsSecret. Defaults to the
|
// this list must match the name/s used in the tlsSecret. Defaults to the
|
||||||
// wildcard host setting for the loadbalancer controller fulfilling this
|
// wildcard host setting for the loadbalancer controller fulfilling this
|
||||||
// Ingress, if left unspecified.
|
// Ingress, if left unspecified.
|
||||||
|
// +optional
|
||||||
Hosts []string `json:"hosts,omitempty"`
|
Hosts []string `json:"hosts,omitempty"`
|
||||||
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
||||||
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
||||||
// If the SNI host in a listener conflicts with the "Host" header field used
|
// If the SNI host in a listener conflicts with the "Host" header field used
|
||||||
// by an IngressRule, the SNI host is used for termination and value of the
|
// by an IngressRule, the SNI host is used for termination and value of the
|
||||||
// Host header is used for routing.
|
// Host header is used for routing.
|
||||||
|
// +optional
|
||||||
SecretName string `json:"secretName,omitempty"`
|
SecretName string `json:"secretName,omitempty"`
|
||||||
// TODO: Consider specifying different modes of termination, protocols etc.
|
// TODO: Consider specifying different modes of termination, protocols etc.
|
||||||
}
|
}
|
||||||
@ -504,6 +559,7 @@ type IngressTLS struct {
|
|||||||
// IngressStatus describe the current state of the Ingress.
|
// IngressStatus describe the current state of the Ingress.
|
||||||
type IngressStatus struct {
|
type IngressStatus struct {
|
||||||
// LoadBalancer contains the current status of the load-balancer.
|
// LoadBalancer contains the current status of the load-balancer.
|
||||||
|
// +optional
|
||||||
LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"`
|
LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,12 +579,14 @@ type IngressRule struct {
|
|||||||
// Incoming requests are matched against the host before the IngressRuleValue.
|
// Incoming requests are matched against the host before the IngressRuleValue.
|
||||||
// If the host is unspecified, the Ingress routes all traffic based on the
|
// If the host is unspecified, the Ingress routes all traffic based on the
|
||||||
// specified IngressRuleValue.
|
// specified IngressRuleValue.
|
||||||
|
// +optional
|
||||||
Host string `json:"host,omitempty"`
|
Host string `json:"host,omitempty"`
|
||||||
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
||||||
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
||||||
// just traffic matching the host to the default backend or all traffic to the
|
// just traffic matching the host to the default backend or all traffic to the
|
||||||
// default backend, is left to the controller fulfilling the Ingress. Http is
|
// default backend, is left to the controller fulfilling the Ingress. Http is
|
||||||
// currently the only supported IngressRuleValue.
|
// currently the only supported IngressRuleValue.
|
||||||
|
// +optional
|
||||||
IngressRuleValue `json:",inline,omitempty"`
|
IngressRuleValue `json:",inline,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -543,6 +601,7 @@ type IngressRuleValue struct {
|
|||||||
// 2. Consider adding fields for ingress-type specific global options
|
// 2. Consider adding fields for ingress-type specific global options
|
||||||
// usable by a loadbalancer, like http keep-alive.
|
// usable by a loadbalancer, like http keep-alive.
|
||||||
|
|
||||||
|
// +optional
|
||||||
HTTP *HTTPIngressRuleValue `json:"http,omitempty"`
|
HTTP *HTTPIngressRuleValue `json:"http,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -568,6 +627,7 @@ type HTTPIngressPath struct {
|
|||||||
// part of a URL as defined by RFC 3986. Paths must begin with
|
// part of a URL as defined by RFC 3986. Paths must begin with
|
||||||
// a '/'. If unspecified, the path defaults to a catch all sending
|
// a '/'. If unspecified, the path defaults to a catch all sending
|
||||||
// traffic to the backend.
|
// traffic to the backend.
|
||||||
|
// +optional
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
|
|
||||||
// Backend defines the referenced service endpoint to which the traffic
|
// Backend defines the referenced service endpoint to which the traffic
|
||||||
@ -589,19 +649,23 @@ type IngressBackend struct {
|
|||||||
// ReplicaSet represents the configuration of a replica set.
|
// ReplicaSet represents the configuration of a replica set.
|
||||||
type ReplicaSet struct {
|
type ReplicaSet struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec defines the desired behavior of this ReplicaSet.
|
// Spec defines the desired behavior of this ReplicaSet.
|
||||||
|
// +optional
|
||||||
Spec ReplicaSetSpec `json:"spec,omitempty"`
|
Spec ReplicaSetSpec `json:"spec,omitempty"`
|
||||||
|
|
||||||
// Status is the current status of this ReplicaSet. This data may be
|
// Status is the current status of this ReplicaSet. This data may be
|
||||||
// out of date by some window of time.
|
// out of date by some window of time.
|
||||||
|
// +optional
|
||||||
Status ReplicaSetStatus `json:"status,omitempty"`
|
Status ReplicaSetStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReplicaSetList is a collection of ReplicaSets.
|
// ReplicaSetList is a collection of ReplicaSets.
|
||||||
type ReplicaSetList struct {
|
type ReplicaSetList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Items []ReplicaSet `json:"items"`
|
Items []ReplicaSet `json:"items"`
|
||||||
@ -617,16 +681,19 @@ type ReplicaSetSpec struct {
|
|||||||
// Minimum number of seconds for which a newly created pod should be ready
|
// Minimum number of seconds for which a newly created pod should be ready
|
||||||
// without any of its container crashing, for it to be considered available.
|
// without any of its container crashing, for it to be considered available.
|
||||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||||
|
// +optional
|
||||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the replica count.
|
// Selector is a label query over pods that should match the replica count.
|
||||||
// Must match in order to be controlled.
|
// Must match in order to be controlled.
|
||||||
// If empty, defaulted to labels on pod template.
|
// If empty, defaulted to labels on pod template.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created if
|
// Template is the object that describes the pod that will be created if
|
||||||
// insufficient replicas are detected.
|
// insufficient replicas are detected.
|
||||||
|
// +optional
|
||||||
Template api.PodTemplateSpec `json:"template,omitempty"`
|
Template api.PodTemplateSpec `json:"template,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -636,18 +703,23 @@ type ReplicaSetStatus struct {
|
|||||||
Replicas int32 `json:"replicas"`
|
Replicas int32 `json:"replicas"`
|
||||||
|
|
||||||
// The number of pods that have labels matching the labels of the pod template of the replicaset.
|
// The number of pods that have labels matching the labels of the pod template of the replicaset.
|
||||||
|
// +optional
|
||||||
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
|
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
|
||||||
|
|
||||||
// The number of ready replicas for this replica set.
|
// The number of ready replicas for this replica set.
|
||||||
|
// +optional
|
||||||
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
|
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
|
||||||
|
|
||||||
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
||||||
|
// +optional
|
||||||
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
||||||
|
|
||||||
// ObservedGeneration is the most recent generation observed by the controller.
|
// ObservedGeneration is the most recent generation observed by the controller.
|
||||||
|
// +optional
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||||
|
|
||||||
// Represents the latest available observations of a replica set's current state.
|
// Represents the latest available observations of a replica set's current state.
|
||||||
|
// +optional
|
||||||
Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -668,12 +740,16 @@ type ReplicaSetCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status api.ConditionStatus `json:"status"`
|
Status api.ConditionStatus `json:"status"`
|
||||||
// Last time we probed the condition.
|
// Last time we probed the condition.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
||||||
// The last time the condition transitioned from one status to another.
|
// The last time the condition transitioned from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
||||||
// The reason for the condition's last transition.
|
// The reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
// A human readable message indicating details about the transition.
|
// A human readable message indicating details about the transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,37 +760,48 @@ type ReplicaSetCondition struct {
|
|||||||
// that will be applied to a pod and container.
|
// that will be applied to a pod and container.
|
||||||
type PodSecurityPolicy struct {
|
type PodSecurityPolicy struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Spec defines the policy enforced.
|
// Spec defines the policy enforced.
|
||||||
|
// +optional
|
||||||
Spec PodSecurityPolicySpec `json:"spec,omitempty"`
|
Spec PodSecurityPolicySpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodSecurityPolicySpec defines the policy enforced.
|
// PodSecurityPolicySpec defines the policy enforced.
|
||||||
type PodSecurityPolicySpec struct {
|
type PodSecurityPolicySpec struct {
|
||||||
// Privileged determines if a pod can request to be run as privileged.
|
// Privileged determines if a pod can request to be run as privileged.
|
||||||
|
// +optional
|
||||||
Privileged bool `json:"privileged,omitempty"`
|
Privileged bool `json:"privileged,omitempty"`
|
||||||
// DefaultAddCapabilities is the default set of capabilities that will be added to the container
|
// DefaultAddCapabilities is the default set of capabilities that will be added to the container
|
||||||
// unless the pod spec specifically drops the capability. You may not list a capability in both
|
// unless the pod spec specifically drops the capability. You may not list a capability in both
|
||||||
// DefaultAddCapabilities and RequiredDropCapabilities.
|
// DefaultAddCapabilities and RequiredDropCapabilities.
|
||||||
|
// +optional
|
||||||
DefaultAddCapabilities []api.Capability `json:"defaultAddCapabilities,omitempty"`
|
DefaultAddCapabilities []api.Capability `json:"defaultAddCapabilities,omitempty"`
|
||||||
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
|
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
|
||||||
// are required to be dropped and cannot be added.
|
// are required to be dropped and cannot be added.
|
||||||
|
// +optional
|
||||||
RequiredDropCapabilities []api.Capability `json:"requiredDropCapabilities,omitempty"`
|
RequiredDropCapabilities []api.Capability `json:"requiredDropCapabilities,omitempty"`
|
||||||
// AllowedCapabilities is a list of capabilities that can be requested to add to the container.
|
// AllowedCapabilities is a list of capabilities that can be requested to add to the container.
|
||||||
// Capabilities in this field may be added at the pod author's discretion.
|
// Capabilities in this field may be added at the pod author's discretion.
|
||||||
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
|
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
|
||||||
|
// +optional
|
||||||
AllowedCapabilities []api.Capability `json:"allowedCapabilities,omitempty"`
|
AllowedCapabilities []api.Capability `json:"allowedCapabilities,omitempty"`
|
||||||
// Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
|
// Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
|
||||||
// may be used.
|
// may be used.
|
||||||
|
// +optional
|
||||||
Volumes []FSType `json:"volumes,omitempty"`
|
Volumes []FSType `json:"volumes,omitempty"`
|
||||||
// HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
|
// HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
|
||||||
|
// +optional
|
||||||
HostNetwork bool `json:"hostNetwork,omitempty"`
|
HostNetwork bool `json:"hostNetwork,omitempty"`
|
||||||
// HostPorts determines which host port ranges are allowed to be exposed.
|
// HostPorts determines which host port ranges are allowed to be exposed.
|
||||||
|
// +optional
|
||||||
HostPorts []HostPortRange `json:"hostPorts,omitempty"`
|
HostPorts []HostPortRange `json:"hostPorts,omitempty"`
|
||||||
// HostPID determines if the policy allows the use of HostPID in the pod spec.
|
// HostPID determines if the policy allows the use of HostPID in the pod spec.
|
||||||
|
// +optional
|
||||||
HostPID bool `json:"hostPID,omitempty"`
|
HostPID bool `json:"hostPID,omitempty"`
|
||||||
// HostIPC determines if the policy allows the use of HostIPC in the pod spec.
|
// HostIPC determines if the policy allows the use of HostIPC in the pod spec.
|
||||||
|
// +optional
|
||||||
HostIPC bool `json:"hostIPC,omitempty"`
|
HostIPC bool `json:"hostIPC,omitempty"`
|
||||||
// SELinux is the strategy that will dictate the allowable labels that may be set.
|
// SELinux is the strategy that will dictate the allowable labels that may be set.
|
||||||
SELinux SELinuxStrategyOptions `json:"seLinux"`
|
SELinux SELinuxStrategyOptions `json:"seLinux"`
|
||||||
@ -729,6 +816,7 @@ type PodSecurityPolicySpec struct {
|
|||||||
// the PSP should deny the pod.
|
// the PSP should deny the pod.
|
||||||
// If set to false the container may run with a read only root file system if it wishes but it
|
// If set to false the container may run with a read only root file system if it wishes but it
|
||||||
// will not be forced to.
|
// will not be forced to.
|
||||||
|
// +optional
|
||||||
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
|
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -776,6 +864,7 @@ type SELinuxStrategyOptions struct {
|
|||||||
Rule SELinuxStrategy `json:"rule"`
|
Rule SELinuxStrategy `json:"rule"`
|
||||||
// seLinuxOptions required to run as; required for MustRunAs
|
// seLinuxOptions required to run as; required for MustRunAs
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
|
// More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
|
||||||
|
// +optional
|
||||||
SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"`
|
SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -795,6 +884,7 @@ type RunAsUserStrategyOptions struct {
|
|||||||
// Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
|
// Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
|
||||||
Rule RunAsUserStrategy `json:"rule"`
|
Rule RunAsUserStrategy `json:"rule"`
|
||||||
// Ranges are the allowed ranges of uids that may be used.
|
// Ranges are the allowed ranges of uids that may be used.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty"`
|
Ranges []IDRange `json:"ranges,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -822,9 +912,11 @@ const (
|
|||||||
// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
|
// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
|
||||||
type FSGroupStrategyOptions struct {
|
type FSGroupStrategyOptions struct {
|
||||||
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
|
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
|
||||||
|
// +optional
|
||||||
Rule FSGroupStrategyType `json:"rule,omitempty"`
|
Rule FSGroupStrategyType `json:"rule,omitempty"`
|
||||||
// Ranges are the allowed ranges of fs groups. If you would like to force a single
|
// Ranges are the allowed ranges of fs groups. If you would like to force a single
|
||||||
// fs group then supply a single range with the same start and end.
|
// fs group then supply a single range with the same start and end.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty"`
|
Ranges []IDRange `json:"ranges,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -842,9 +934,11 @@ const (
|
|||||||
// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
|
// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
|
||||||
type SupplementalGroupsStrategyOptions struct {
|
type SupplementalGroupsStrategyOptions struct {
|
||||||
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
|
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
|
||||||
|
// +optional
|
||||||
Rule SupplementalGroupsStrategyType `json:"rule,omitempty"`
|
Rule SupplementalGroupsStrategyType `json:"rule,omitempty"`
|
||||||
// Ranges are the allowed ranges of supplemental groups. If you would like to force a single
|
// Ranges are the allowed ranges of supplemental groups. If you would like to force a single
|
||||||
// supplemental group then supply a single range with the same start and end.
|
// supplemental group then supply a single range with the same start and end.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty"`
|
Ranges []IDRange `json:"ranges,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -862,6 +956,7 @@ const (
|
|||||||
// PodSecurityPolicyList is a list of PodSecurityPolicy objects.
|
// PodSecurityPolicyList is a list of PodSecurityPolicy objects.
|
||||||
type PodSecurityPolicyList struct {
|
type PodSecurityPolicyList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Items []PodSecurityPolicy `json:"items"`
|
Items []PodSecurityPolicy `json:"items"`
|
||||||
@ -871,9 +966,11 @@ type PodSecurityPolicyList struct {
|
|||||||
|
|
||||||
type NetworkPolicy struct {
|
type NetworkPolicy struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Specification of the desired behavior for this NetworkPolicy.
|
// Specification of the desired behavior for this NetworkPolicy.
|
||||||
|
// +optional
|
||||||
Spec NetworkPolicySpec `json:"spec,omitempty"`
|
Spec NetworkPolicySpec `json:"spec,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -893,6 +990,7 @@ type NetworkPolicySpec struct {
|
|||||||
// If this field is empty then this NetworkPolicy does not affect ingress isolation.
|
// If this field is empty then this NetworkPolicy does not affect ingress isolation.
|
||||||
// If this field is present and contains at least one rule, this policy allows any traffic
|
// If this field is present and contains at least one rule, this policy allows any traffic
|
||||||
// which matches at least one of the ingress rules in this list.
|
// which matches at least one of the ingress rules in this list.
|
||||||
|
// +optional
|
||||||
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"`
|
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -905,6 +1003,7 @@ type NetworkPolicyIngressRule struct {
|
|||||||
// If this field is present and contains at least one item, then this rule allows traffic
|
// If this field is present and contains at least one item, then this rule allows traffic
|
||||||
// only if the traffic matches at least one port in the list.
|
// only if the traffic matches at least one port in the list.
|
||||||
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
||||||
|
// +optional
|
||||||
Ports []NetworkPolicyPort `json:"ports,omitempty"`
|
Ports []NetworkPolicyPort `json:"ports,omitempty"`
|
||||||
|
|
||||||
// List of sources which should be able to access the pods selected for this rule.
|
// List of sources which should be able to access the pods selected for this rule.
|
||||||
@ -914,12 +1013,14 @@ type NetworkPolicyIngressRule struct {
|
|||||||
// If this field is present and contains at least on item, this rule allows traffic only if the
|
// If this field is present and contains at least on item, this rule allows traffic only if the
|
||||||
// traffic matches at least one item in the from list.
|
// traffic matches at least one item in the from list.
|
||||||
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
||||||
|
// +optional
|
||||||
From []NetworkPolicyPeer `json:"from,omitempty"`
|
From []NetworkPolicyPeer `json:"from,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type NetworkPolicyPort struct {
|
type NetworkPolicyPort struct {
|
||||||
// Optional. The protocol (TCP or UDP) which traffic must match.
|
// Optional. The protocol (TCP or UDP) which traffic must match.
|
||||||
// If not specified, this field defaults to TCP.
|
// If not specified, this field defaults to TCP.
|
||||||
|
// +optional
|
||||||
Protocol *api.Protocol `json:"protocol,omitempty"`
|
Protocol *api.Protocol `json:"protocol,omitempty"`
|
||||||
|
|
||||||
// If specified, the port on the given protocol. This can
|
// If specified, the port on the given protocol. This can
|
||||||
@ -927,6 +1028,7 @@ type NetworkPolicyPort struct {
|
|||||||
// this matches all port names and numbers.
|
// this matches all port names and numbers.
|
||||||
// If present, only traffic on the specified protocol AND port
|
// If present, only traffic on the specified protocol AND port
|
||||||
// will be matched.
|
// will be matched.
|
||||||
|
// +optional
|
||||||
Port *intstr.IntOrString `json:"port,omitempty"`
|
Port *intstr.IntOrString `json:"port,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -937,6 +1039,7 @@ type NetworkPolicyPeer struct {
|
|||||||
// This field follows standard label selector semantics.
|
// This field follows standard label selector semantics.
|
||||||
// If not provided, this selector selects no pods.
|
// If not provided, this selector selects no pods.
|
||||||
// If present but empty, this selector selects all pods in this namespace.
|
// If present but empty, this selector selects all pods in this namespace.
|
||||||
|
// +optional
|
||||||
PodSelector *unversioned.LabelSelector `json:"podSelector,omitempty"`
|
PodSelector *unversioned.LabelSelector `json:"podSelector,omitempty"`
|
||||||
|
|
||||||
// Selects Namespaces using cluster scoped-labels. This
|
// Selects Namespaces using cluster scoped-labels. This
|
||||||
@ -944,12 +1047,14 @@ type NetworkPolicyPeer struct {
|
|||||||
// This field follows standard label selector semantics.
|
// This field follows standard label selector semantics.
|
||||||
// If omitted, this selector selects no namespaces.
|
// If omitted, this selector selects no namespaces.
|
||||||
// If present but empty, this selector selects all namespaces.
|
// If present but empty, this selector selects all namespaces.
|
||||||
|
// +optional
|
||||||
NamespaceSelector *unversioned.LabelSelector `json:"namespaceSelector,omitempty"`
|
NamespaceSelector *unversioned.LabelSelector `json:"namespaceSelector,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NetworkPolicyList is a list of NetworkPolicy objects.
|
// NetworkPolicyList is a list of NetworkPolicy objects.
|
||||||
type NetworkPolicyList struct {
|
type NetworkPolicyList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Items []NetworkPolicy `json:"items"`
|
Items []NetworkPolicy `json:"items"`
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
// describes the attributes of a scale subresource
|
// describes the attributes of a scale subresource
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// desired number of instances for the scaled object.
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ type ScaleStatus struct {
|
|||||||
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
|
Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"`
|
||||||
|
|
||||||
// label selector for pods that should match the replicas count. This is a serializated
|
// label selector for pods that should match the replicas count. This is a serializated
|
||||||
@ -43,6 +45,7 @@ type ScaleStatus struct {
|
|||||||
// query-param syntax. If the target type only supports map-based selectors, both this
|
// query-param syntax. If the target type only supports map-based selectors, both this
|
||||||
// field and map-based selector field are populated.
|
// field and map-based selector field are populated.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
|
TargetSelector string `json:"targetSelector,omitempty" protobuf:"bytes,3,opt,name=targetSelector"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,12 +56,15 @@ type ScaleStatus struct {
|
|||||||
type Scale struct {
|
type Scale struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
// current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.
|
||||||
|
// +optional
|
||||||
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,12 +76,16 @@ type ReplicationControllerDummy struct {
|
|||||||
// SubresourceReference contains enough information to let you inspect or modify the referred subresource.
|
// SubresourceReference contains enough information to let you inspect or modify the referred subresource.
|
||||||
type SubresourceReference struct {
|
type SubresourceReference struct {
|
||||||
// Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"`
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
// API version of the referent
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
// Subresource name of the referent
|
// Subresource name of the referent
|
||||||
|
// +optional
|
||||||
Subresource string `json:"subresource,omitempty" protobuf:"bytes,4,opt,name=subresource"`
|
Subresource string `json:"subresource,omitempty" protobuf:"bytes,4,opt,name=subresource"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,21 +124,25 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// and will set the desired number of pods by modifying its spec.
|
// and will set the desired number of pods by modifying its spec.
|
||||||
ScaleRef SubresourceReference `json:"scaleRef" protobuf:"bytes,1,opt,name=scaleRef"`
|
ScaleRef SubresourceReference `json:"scaleRef" protobuf:"bytes,1,opt,name=scaleRef"`
|
||||||
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
||||||
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
||||||
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
||||||
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||||
// if not specified it defaults to the target CPU utilization at 80% of the requested resources.
|
// if not specified it defaults to the target CPU utilization at 80% of the requested resources.
|
||||||
|
// +optional
|
||||||
CPUUtilization *CPUTargetUtilization `json:"cpuUtilization,omitempty" protobuf:"bytes,4,opt,name=cpuUtilization"`
|
CPUUtilization *CPUTargetUtilization `json:"cpuUtilization,omitempty" protobuf:"bytes,4,opt,name=cpuUtilization"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// current status of a horizontal pod autoscaler
|
// current status of a horizontal pod autoscaler
|
||||||
type HorizontalPodAutoscalerStatus struct {
|
type HorizontalPodAutoscalerStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// most recent generation observed by this autoscaler.
|
||||||
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
||||||
// used by the autoscaler to control how often the number of pods is changed.
|
// used by the autoscaler to control how often the number of pods is changed.
|
||||||
|
// +optional
|
||||||
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
||||||
|
|
||||||
// current number of replicas of pods managed by this autoscaler.
|
// current number of replicas of pods managed by this autoscaler.
|
||||||
@ -139,6 +153,7 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
|
|
||||||
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||||
|
// +optional
|
||||||
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,12 +161,15 @@ type HorizontalPodAutoscalerStatus struct {
|
|||||||
type HorizontalPodAutoscaler struct {
|
type HorizontalPodAutoscaler struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
// behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.
|
||||||
|
// +optional
|
||||||
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current information about the autoscaler.
|
// current information about the autoscaler.
|
||||||
|
// +optional
|
||||||
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,6 +177,7 @@ type HorizontalPodAutoscaler struct {
|
|||||||
type HorizontalPodAutoscalerList struct {
|
type HorizontalPodAutoscalerList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// list of horizontal pod autoscaler objects.
|
||||||
@ -174,12 +193,15 @@ type ThirdPartyResource struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// Standard object metadata
|
// Standard object metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Description is the description of this object.
|
// Description is the description of this object.
|
||||||
|
// +optional
|
||||||
Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
|
Description string `json:"description,omitempty" protobuf:"bytes,2,opt,name=description"`
|
||||||
|
|
||||||
// Versions are versions for this third party object
|
// Versions are versions for this third party object
|
||||||
|
// +optional
|
||||||
Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
|
Versions []APIVersion `json:"versions,omitempty" protobuf:"bytes,3,rep,name=versions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,6 +210,7 @@ type ThirdPartyResourceList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of ThirdPartyResources.
|
// Items is the list of ThirdPartyResources.
|
||||||
@ -197,6 +220,7 @@ type ThirdPartyResourceList struct {
|
|||||||
// An APIVersion represents a single concrete version of an object model.
|
// An APIVersion represents a single concrete version of an object model.
|
||||||
type APIVersion struct {
|
type APIVersion struct {
|
||||||
// Name of this version (e.g. 'v1').
|
// Name of this version (e.g. 'v1').
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,9 +228,11 @@ type APIVersion struct {
|
|||||||
type ThirdPartyResourceData struct {
|
type ThirdPartyResourceData struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata.
|
// Standard object metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Data is the raw JSON data for this data.
|
// Data is the raw JSON data for this data.
|
||||||
|
// +optional
|
||||||
Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
|
Data []byte `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,12 +242,15 @@ type ThirdPartyResourceData struct {
|
|||||||
type Deployment struct {
|
type Deployment struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object metadata.
|
// Standard object metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the Deployment.
|
// Specification of the desired behavior of the Deployment.
|
||||||
|
// +optional
|
||||||
Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Most recently observed status of the Deployment.
|
// Most recently observed status of the Deployment.
|
||||||
|
// +optional
|
||||||
Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,31 +258,38 @@ type Deployment struct {
|
|||||||
type DeploymentSpec struct {
|
type DeploymentSpec struct {
|
||||||
// Number of desired pods. This is a pointer to distinguish between explicit
|
// Number of desired pods. This is a pointer to distinguish between explicit
|
||||||
// zero and not specified. Defaults to 1.
|
// zero and not specified. Defaults to 1.
|
||||||
|
// +optional
|
||||||
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// Label selector for pods. Existing ReplicaSets whose pods are
|
// Label selector for pods. Existing ReplicaSets whose pods are
|
||||||
// selected by this will be the ones affected by this deployment.
|
// selected by this will be the ones affected by this deployment.
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||||
|
|
||||||
// Template describes the pods that will be created.
|
// Template describes the pods that will be created.
|
||||||
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
|
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
|
||||||
|
|
||||||
// The deployment strategy to use to replace existing pods with new ones.
|
// The deployment strategy to use to replace existing pods with new ones.
|
||||||
|
// +optional
|
||||||
Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
|
Strategy DeploymentStrategy `json:"strategy,omitempty" protobuf:"bytes,4,opt,name=strategy"`
|
||||||
|
|
||||||
// Minimum number of seconds for which a newly created pod should be ready
|
// Minimum number of seconds for which a newly created pod should be ready
|
||||||
// without any of its container crashing, for it to be considered available.
|
// without any of its container crashing, for it to be considered available.
|
||||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||||
|
// +optional
|
||||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
|
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,5,opt,name=minReadySeconds"`
|
||||||
|
|
||||||
// The number of old ReplicaSets to retain to allow rollback.
|
// The number of old ReplicaSets to retain to allow rollback.
|
||||||
// This is a pointer to distinguish between explicit zero and not specified.
|
// This is a pointer to distinguish between explicit zero and not specified.
|
||||||
|
// +optional
|
||||||
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
|
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,6,opt,name=revisionHistoryLimit"`
|
||||||
|
|
||||||
// Indicates that the deployment is paused and will not be processed by the
|
// Indicates that the deployment is paused and will not be processed by the
|
||||||
// deployment controller.
|
// deployment controller.
|
||||||
|
// +optional
|
||||||
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
|
Paused bool `json:"paused,omitempty" protobuf:"varint,7,opt,name=paused"`
|
||||||
// The config this deployment is rolling back to. Will be cleared after rollback is done.
|
// The config this deployment is rolling back to. Will be cleared after rollback is done.
|
||||||
|
// +optional
|
||||||
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
|
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty" protobuf:"bytes,8,opt,name=rollbackTo"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,6 +299,7 @@ type DeploymentRollback struct {
|
|||||||
// Required: This must match the Name of a deployment.
|
// Required: This must match the Name of a deployment.
|
||||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||||
// The annotations to be updated to a deployment
|
// The annotations to be updated to a deployment
|
||||||
|
// +optional
|
||||||
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
|
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"`
|
||||||
// The config of this deployment rollback.
|
// The config of this deployment rollback.
|
||||||
RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
|
RollbackTo RollbackConfig `json:"rollbackTo" protobuf:"bytes,3,opt,name=rollbackTo"`
|
||||||
@ -270,6 +307,7 @@ type DeploymentRollback struct {
|
|||||||
|
|
||||||
type RollbackConfig struct {
|
type RollbackConfig struct {
|
||||||
// The revision to rollback to. If set to 0, rollbck to the last revision.
|
// The revision to rollback to. If set to 0, rollbck to the last revision.
|
||||||
|
// +optional
|
||||||
Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
|
Revision int64 `json:"revision,omitempty" protobuf:"varint,1,opt,name=revision"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,6 +321,7 @@ const (
|
|||||||
// DeploymentStrategy describes how to replace existing pods with new ones.
|
// DeploymentStrategy describes how to replace existing pods with new ones.
|
||||||
type DeploymentStrategy struct {
|
type DeploymentStrategy struct {
|
||||||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
||||||
|
// +optional
|
||||||
Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
|
Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"`
|
||||||
|
|
||||||
// Rolling update config params. Present only if DeploymentStrategyType =
|
// Rolling update config params. Present only if DeploymentStrategyType =
|
||||||
@ -290,6 +329,7 @@ type DeploymentStrategy struct {
|
|||||||
//---
|
//---
|
||||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||||
// to be.
|
// to be.
|
||||||
|
// +optional
|
||||||
RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
|
RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" protobuf:"bytes,2,opt,name=rollingUpdate"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,6 +355,7 @@ type RollingUpdateDeployment struct {
|
|||||||
// can be scaled down further, followed by scaling up the new RC, ensuring
|
// can be scaled down further, followed by scaling up the new RC, ensuring
|
||||||
// that the total number of pods available at all times during the update is at
|
// that the total number of pods available at all times during the update is at
|
||||||
// least 70% of desired pods.
|
// least 70% of desired pods.
|
||||||
|
// +optional
|
||||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
|
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,1,opt,name=maxUnavailable"`
|
||||||
|
|
||||||
// The maximum number of pods that can be scheduled above the desired number of
|
// The maximum number of pods that can be scheduled above the desired number of
|
||||||
@ -328,24 +369,30 @@ type RollingUpdateDeployment struct {
|
|||||||
// 130% of desired pods. Once old pods have been killed,
|
// 130% of desired pods. Once old pods have been killed,
|
||||||
// new RC can be scaled up further, ensuring that total number of pods running
|
// new RC can be scaled up further, ensuring that total number of pods running
|
||||||
// at any time during the update is atmost 130% of desired pods.
|
// at any time during the update is atmost 130% of desired pods.
|
||||||
|
// +optional
|
||||||
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeploymentStatus is the most recently observed status of the Deployment.
|
// DeploymentStatus is the most recently observed status of the Deployment.
|
||||||
type DeploymentStatus struct {
|
type DeploymentStatus struct {
|
||||||
// The generation observed by the deployment controller.
|
// The generation observed by the deployment controller.
|
||||||
|
// +optional
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
||||||
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
|
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
|
||||||
|
|
||||||
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
||||||
|
// +optional
|
||||||
UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
|
UpdatedReplicas int32 `json:"updatedReplicas,omitempty" protobuf:"varint,3,opt,name=updatedReplicas"`
|
||||||
|
|
||||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
||||||
|
// +optional
|
||||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
|
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"`
|
||||||
|
|
||||||
// Total number of unavailable pods targeted by this deployment.
|
// Total number of unavailable pods targeted by this deployment.
|
||||||
|
// +optional
|
||||||
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
|
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,6 +400,7 @@ type DeploymentStatus struct {
|
|||||||
type DeploymentList struct {
|
type DeploymentList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of Deployments.
|
// Items is the list of Deployments.
|
||||||
@ -363,6 +411,7 @@ type DeploymentList struct {
|
|||||||
/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
|
/* Commenting out for v1.2. We are planning to bring these types back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting the types out.
|
||||||
type DaemonSetUpdateStrategy struct {
|
type DaemonSetUpdateStrategy struct {
|
||||||
// Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
|
// Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
|
||||||
|
// +optional
|
||||||
Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
|
Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
|
||||||
|
|
||||||
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
|
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
|
||||||
@ -370,6 +419,7 @@ type DaemonSetUpdateStrategy struct {
|
|||||||
//---
|
//---
|
||||||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||||
// to be. Same as DeploymentStrategy.RollingUpdate.
|
// to be. Same as DeploymentStrategy.RollingUpdate.
|
||||||
|
// +optional
|
||||||
RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
|
RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,12 +445,14 @@ type RollingUpdateDaemonSet struct {
|
|||||||
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
|
// it then proceeds onto other DaemonSet pods, thus ensuring that at least
|
||||||
// 70% of original number of DaemonSet pods are available at all times
|
// 70% of original number of DaemonSet pods are available at all times
|
||||||
// during the update.
|
// during the update.
|
||||||
|
// +optional
|
||||||
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||||
|
|
||||||
// Minimum number of seconds for which a newly created DaemonSet pod should
|
// Minimum number of seconds for which a newly created DaemonSet pod should
|
||||||
// be ready without any of its container crashing, for it to be considered
|
// be ready without any of its container crashing, for it to be considered
|
||||||
// available. Defaults to 0 (pod will be considered available as soon as it
|
// available. Defaults to 0 (pod will be considered available as soon as it
|
||||||
// is ready).
|
// is ready).
|
||||||
|
// +optional
|
||||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -411,6 +463,7 @@ type DaemonSetSpec struct {
|
|||||||
// Must match in order to be controlled.
|
// Must match in order to be controlled.
|
||||||
// If empty, defaulted to labels on Pod template.
|
// If empty, defaulted to labels on Pod template.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created.
|
// Template is the object that describes the pod that will be created.
|
||||||
@ -422,17 +475,19 @@ type DaemonSetSpec struct {
|
|||||||
|
|
||||||
// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
|
// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
|
||||||
/* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
|
/* Commenting out for v1.2. We are planning to bring these fields back with a more robust DaemonSet update implementation in v1.3, hence not deleting but just commenting these fields out.
|
||||||
// Update strategy to replace existing DaemonSet pods with new pods.
|
// Update strategy to replace existing DaemonSet pods with new pods.
|
||||||
UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
|
// +optional
|
||||||
|
UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
|
||||||
|
|
||||||
// Label key that is added to DaemonSet pods to distinguish between old and
|
// Label key that is added to DaemonSet pods to distinguish between old and
|
||||||
// new pod templates during DaemonSet update.
|
// new pod templates during DaemonSet update.
|
||||||
// Users can set this to an empty string to indicate that the system should
|
// Users can set this to an empty string to indicate that the system should
|
||||||
// not add any label. If unspecified, system uses
|
// not add any label. If unspecified, system uses
|
||||||
// DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
|
// DefaultDaemonSetUniqueLabelKey("daemonset.kubernetes.io/podTemplateHash").
|
||||||
// Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
|
// Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
|
||||||
// No label is added if this is set to empty string.
|
// No label is added if this is set to empty string.
|
||||||
UniqueLabelKey *string `json:"uniqueLabelKey,omitempty"`
|
// +optional
|
||||||
|
UniqueLabelKey *string `json:"uniqueLabelKey,omitempty"`
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,10 +527,12 @@ type DaemonSet struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec defines the desired behavior of this daemon set.
|
// Spec defines the desired behavior of this daemon set.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is the current status of this daemon set. This data may be
|
// Status is the current status of this daemon set. This data may be
|
||||||
@ -483,6 +540,7 @@ type DaemonSet struct {
|
|||||||
// Populated by the system.
|
// Populated by the system.
|
||||||
// Read-only.
|
// Read-only.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,6 +549,7 @@ type DaemonSetList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of daemon sets.
|
// Items is a list of daemon sets.
|
||||||
@ -502,6 +561,7 @@ type ThirdPartyResourceDataList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of ThirdpartyResourceData.
|
// Items is the list of ThirdpartyResourceData.
|
||||||
@ -515,14 +575,17 @@ type Job struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec is a structure defining the expected behavior of a job.
|
// Spec is a structure defining the expected behavior of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec JobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is a structure describing current status of a job.
|
// Status is a structure describing current status of a job.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status JobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,6 +594,7 @@ type JobList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of Job.
|
// Items is the list of Job.
|
||||||
@ -545,6 +609,7 @@ type JobSpec struct {
|
|||||||
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
|
||||||
// i.e. when the work left to do is less than max parallelism.
|
// i.e. when the work left to do is less than max parallelism.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
Parallelism *int32 `json:"parallelism,omitempty" protobuf:"varint,1,opt,name=parallelism"`
|
||||||
|
|
||||||
// Completions specifies the desired number of successfully finished pods the
|
// Completions specifies the desired number of successfully finished pods the
|
||||||
@ -553,15 +618,18 @@ type JobSpec struct {
|
|||||||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||||
// pod signals the success of the job.
|
// pod signals the success of the job.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
Completions *int32 `json:"completions,omitempty" protobuf:"varint,2,opt,name=completions"`
|
||||||
|
|
||||||
// Optional duration in seconds relative to the startTime that the job may be active
|
// Optional duration in seconds relative to the startTime that the job may be active
|
||||||
// before the system tries to terminate it; value must be positive integer
|
// before the system tries to terminate it; value must be positive integer
|
||||||
|
// +optional
|
||||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,3,opt,name=activeDeadlineSeconds"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the pod count.
|
// Selector is a label query over pods that should match the pod count.
|
||||||
// Normally, the system sets this field for you.
|
// Normally, the system sets this field for you.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"`
|
||||||
|
|
||||||
// AutoSelector controls generation of pod labels and pod selectors.
|
// AutoSelector controls generation of pod labels and pod selectors.
|
||||||
@ -569,6 +637,7 @@ type JobSpec struct {
|
|||||||
// to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite
|
// to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite
|
||||||
// meaning as, ManualSelector.
|
// meaning as, ManualSelector.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
// More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md
|
||||||
|
// +optional
|
||||||
AutoSelector *bool `json:"autoSelector,omitempty" protobuf:"varint,5,opt,name=autoSelector"`
|
AutoSelector *bool `json:"autoSelector,omitempty" protobuf:"varint,5,opt,name=autoSelector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created when
|
// Template is the object that describes the pod that will be created when
|
||||||
@ -582,25 +651,31 @@ type JobStatus struct {
|
|||||||
|
|
||||||
// Conditions represent the latest available observations of an object's current state.
|
// Conditions represent the latest available observations of an object's current state.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/jobs
|
// More info: http://kubernetes.io/docs/user-guide/jobs
|
||||||
|
// +optional
|
||||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
|
||||||
|
|
||||||
// StartTime represents time when the job was acknowledged by the Job Manager.
|
// StartTime represents time when the job was acknowledged by the Job Manager.
|
||||||
// It is not guaranteed to be set in happens-before order across separate operations.
|
// It is not guaranteed to be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
StartTime *unversioned.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"`
|
||||||
|
|
||||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||||
// be set in happens-before order across separate operations.
|
// be set in happens-before order across separate operations.
|
||||||
// It is represented in RFC3339 form and is in UTC.
|
// It is represented in RFC3339 form and is in UTC.
|
||||||
|
// +optional
|
||||||
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
CompletionTime *unversioned.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"`
|
||||||
|
|
||||||
// Active is the number of actively running pods.
|
// Active is the number of actively running pods.
|
||||||
|
// +optional
|
||||||
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"`
|
||||||
|
|
||||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||||
|
// +optional
|
||||||
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
Succeeded int32 `json:"succeeded,omitempty" protobuf:"varint,5,opt,name=succeeded"`
|
||||||
|
|
||||||
// Failed is the number of pods which reached Phase Failed.
|
// Failed is the number of pods which reached Phase Failed.
|
||||||
|
// +optional
|
||||||
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
Failed int32 `json:"failed,omitempty" protobuf:"varint,6,opt,name=failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,12 +696,16 @@ type JobCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||||
// Last time the condition was checked.
|
// Last time the condition was checked.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||||
// Last time the condition transit from one status to another.
|
// Last time the condition transit from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||||
// (brief) reason for the condition's last transition.
|
// (brief) reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||||
// Human readable message indicating details about last transition.
|
// Human readable message indicating details about last transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,14 +719,17 @@ type Ingress struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec is the desired state of the Ingress.
|
// Spec is the desired state of the Ingress.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec IngressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is the current state of the Ingress.
|
// Status is the current state of the Ingress.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status IngressStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,6 +738,7 @@ type IngressList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of Ingress.
|
// Items is the list of Ingress.
|
||||||
@ -668,6 +751,7 @@ type IngressSpec struct {
|
|||||||
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
// rule. At least one of 'backend' or 'rules' must be specified. This field
|
||||||
// is optional to allow the loadbalancer controller or defaulting logic to
|
// is optional to allow the loadbalancer controller or defaulting logic to
|
||||||
// specify a global default.
|
// specify a global default.
|
||||||
|
// +optional
|
||||||
Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
|
Backend *IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"`
|
||||||
|
|
||||||
// TLS configuration. Currently the Ingress only supports a single TLS
|
// TLS configuration. Currently the Ingress only supports a single TLS
|
||||||
@ -675,10 +759,12 @@ type IngressSpec struct {
|
|||||||
// will be multiplexed on the same port according to the hostname specified
|
// will be multiplexed on the same port according to the hostname specified
|
||||||
// through the SNI TLS extension, if the ingress controller fulfilling the
|
// through the SNI TLS extension, if the ingress controller fulfilling the
|
||||||
// ingress supports SNI.
|
// ingress supports SNI.
|
||||||
|
// +optional
|
||||||
TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
|
TLS []IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"`
|
||||||
|
|
||||||
// A list of host rules used to configure the Ingress. If unspecified, or
|
// A list of host rules used to configure the Ingress. If unspecified, or
|
||||||
// no rule matches, all traffic is sent to the default backend.
|
// no rule matches, all traffic is sent to the default backend.
|
||||||
|
// +optional
|
||||||
Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
|
Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"`
|
||||||
// TODO: Add the ability to specify load-balancer IP through claims
|
// TODO: Add the ability to specify load-balancer IP through claims
|
||||||
}
|
}
|
||||||
@ -689,12 +775,14 @@ type IngressTLS struct {
|
|||||||
// this list must match the name/s used in the tlsSecret. Defaults to the
|
// this list must match the name/s used in the tlsSecret. Defaults to the
|
||||||
// wildcard host setting for the loadbalancer controller fulfilling this
|
// wildcard host setting for the loadbalancer controller fulfilling this
|
||||||
// Ingress, if left unspecified.
|
// Ingress, if left unspecified.
|
||||||
|
// +optional
|
||||||
Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
|
Hosts []string `json:"hosts,omitempty" protobuf:"bytes,1,rep,name=hosts"`
|
||||||
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
// SecretName is the name of the secret used to terminate SSL traffic on 443.
|
||||||
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
// Field is left optional to allow SSL routing based on SNI hostname alone.
|
||||||
// If the SNI host in a listener conflicts with the "Host" header field used
|
// If the SNI host in a listener conflicts with the "Host" header field used
|
||||||
// by an IngressRule, the SNI host is used for termination and value of the
|
// by an IngressRule, the SNI host is used for termination and value of the
|
||||||
// Host header is used for routing.
|
// Host header is used for routing.
|
||||||
|
// +optional
|
||||||
SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
|
SecretName string `json:"secretName,omitempty" protobuf:"bytes,2,opt,name=secretName"`
|
||||||
// TODO: Consider specifying different modes of termination, protocols etc.
|
// TODO: Consider specifying different modes of termination, protocols etc.
|
||||||
}
|
}
|
||||||
@ -702,6 +790,7 @@ type IngressTLS struct {
|
|||||||
// IngressStatus describe the current state of the Ingress.
|
// IngressStatus describe the current state of the Ingress.
|
||||||
type IngressStatus struct {
|
type IngressStatus struct {
|
||||||
// LoadBalancer contains the current status of the load-balancer.
|
// LoadBalancer contains the current status of the load-balancer.
|
||||||
|
// +optional
|
||||||
LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
|
LoadBalancer v1.LoadBalancerStatus `json:"loadBalancer,omitempty" protobuf:"bytes,1,opt,name=loadBalancer"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -721,12 +810,14 @@ type IngressRule struct {
|
|||||||
// Incoming requests are matched against the host before the IngressRuleValue.
|
// Incoming requests are matched against the host before the IngressRuleValue.
|
||||||
// If the host is unspecified, the Ingress routes all traffic based on the
|
// If the host is unspecified, the Ingress routes all traffic based on the
|
||||||
// specified IngressRuleValue.
|
// specified IngressRuleValue.
|
||||||
|
// +optional
|
||||||
Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
|
Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
|
||||||
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
||||||
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
// If unspecified, the rule defaults to a http catch-all. Whether that sends
|
||||||
// just traffic matching the host to the default backend or all traffic to the
|
// just traffic matching the host to the default backend or all traffic to the
|
||||||
// default backend, is left to the controller fulfilling the Ingress. Http is
|
// default backend, is left to the controller fulfilling the Ingress. Http is
|
||||||
// currently the only supported IngressRuleValue.
|
// currently the only supported IngressRuleValue.
|
||||||
|
// +optional
|
||||||
IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
|
IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -741,6 +832,7 @@ type IngressRuleValue struct {
|
|||||||
// 2. Consider adding fields for ingress-type specific global options
|
// 2. Consider adding fields for ingress-type specific global options
|
||||||
// usable by a loadbalancer, like http keep-alive.
|
// usable by a loadbalancer, like http keep-alive.
|
||||||
|
|
||||||
|
// +optional
|
||||||
HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
|
HTTP *HTTPIngressRuleValue `json:"http,omitempty" protobuf:"bytes,1,opt,name=http"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -766,6 +858,7 @@ type HTTPIngressPath struct {
|
|||||||
// part of a URL as defined by RFC 3986. Paths must begin with
|
// part of a URL as defined by RFC 3986. Paths must begin with
|
||||||
// a '/'. If unspecified, the path defaults to a catch all sending
|
// a '/'. If unspecified, the path defaults to a catch all sending
|
||||||
// traffic to the backend.
|
// traffic to the backend.
|
||||||
|
// +optional
|
||||||
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
|
Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
|
||||||
|
|
||||||
// Backend defines the referenced service endpoint to which the traffic
|
// Backend defines the referenced service endpoint to which the traffic
|
||||||
@ -798,8 +891,10 @@ type LabelSelector struct {
|
|||||||
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
|
||||||
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
// map is equivalent to an element of matchExpressions, whose key field is "key", the
|
||||||
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
// operator is "In", and the values array contains only "value". The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"`
|
||||||
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
// matchExpressions is a list of label selector requirements. The requirements are ANDed.
|
||||||
|
// +optional
|
||||||
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -815,6 +910,7 @@ type LabelSelectorRequirement struct {
|
|||||||
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
// the values array must be non-empty. If the operator is Exists or DoesNotExist,
|
||||||
// the values array must be empty. This array is replaced during a strategic
|
// the values array must be empty. This array is replaced during a strategic
|
||||||
// merge patch.
|
// merge patch.
|
||||||
|
// +optional
|
||||||
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -837,10 +933,12 @@ type ReplicaSet struct {
|
|||||||
// If the Labels of a ReplicaSet are empty, they are defaulted to
|
// If the Labels of a ReplicaSet are empty, they are defaulted to
|
||||||
// be the same as the Pod(s) that the ReplicaSet manages.
|
// be the same as the Pod(s) that the ReplicaSet manages.
|
||||||
// Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec defines the specification of the desired behavior of the ReplicaSet.
|
// Spec defines the specification of the desired behavior of the ReplicaSet.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ReplicaSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is the most recently observed status of the ReplicaSet.
|
// Status is the most recently observed status of the ReplicaSet.
|
||||||
@ -848,6 +946,7 @@ type ReplicaSet struct {
|
|||||||
// Populated by the system.
|
// Populated by the system.
|
||||||
// Read-only.
|
// Read-only.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||||
|
// +optional
|
||||||
Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ReplicaSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -856,6 +955,7 @@ type ReplicaSetList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// List of ReplicaSets.
|
// List of ReplicaSets.
|
||||||
@ -869,22 +969,26 @@ type ReplicaSetSpec struct {
|
|||||||
// This is a pointer to distinguish between explicit zero and unspecified.
|
// This is a pointer to distinguish between explicit zero and unspecified.
|
||||||
// Defaults to 1.
|
// Defaults to 1.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller
|
// More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller
|
||||||
|
// +optional
|
||||||
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// Minimum number of seconds for which a newly created pod should be ready
|
// Minimum number of seconds for which a newly created pod should be ready
|
||||||
// without any of its container crashing, for it to be considered available.
|
// without any of its container crashing, for it to be considered available.
|
||||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||||
|
// +optional
|
||||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
|
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`
|
||||||
|
|
||||||
// Selector is a label query over pods that should match the replica count.
|
// Selector is a label query over pods that should match the replica count.
|
||||||
// If the selector is empty, it is defaulted to the labels present on the pod template.
|
// If the selector is empty, it is defaulted to the labels present on the pod template.
|
||||||
// Label keys and values that must match in order to be controlled by this replica set.
|
// Label keys and values that must match in order to be controlled by this replica set.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
// +optional
|
||||||
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
Selector *LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||||
|
|
||||||
// Template is the object that describes the pod that will be created if
|
// Template is the object that describes the pod that will be created if
|
||||||
// insufficient replicas are detected.
|
// insufficient replicas are detected.
|
||||||
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
|
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
|
||||||
|
// +optional
|
||||||
Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
|
Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -895,18 +999,23 @@ type ReplicaSetStatus struct {
|
|||||||
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// The number of pods that have labels matching the labels of the pod template of the replicaset.
|
// The number of pods that have labels matching the labels of the pod template of the replicaset.
|
||||||
|
// +optional
|
||||||
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
|
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty" protobuf:"varint,2,opt,name=fullyLabeledReplicas"`
|
||||||
|
|
||||||
// The number of ready replicas for this replica set.
|
// The number of ready replicas for this replica set.
|
||||||
|
// +optional
|
||||||
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
|
ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,4,opt,name=readyReplicas"`
|
||||||
|
|
||||||
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
||||||
|
// +optional
|
||||||
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
|
AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,5,opt,name=availableReplicas"`
|
||||||
|
|
||||||
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
// ObservedGeneration reflects the generation of the most recently observed ReplicaSet.
|
||||||
|
// +optional
|
||||||
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
|
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// Represents the latest available observations of a replica set's current state.
|
// Represents the latest available observations of a replica set's current state.
|
||||||
|
// +optional
|
||||||
Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -927,12 +1036,16 @@ type ReplicaSetCondition struct {
|
|||||||
// Status of the condition, one of True, False, Unknown.
|
// Status of the condition, one of True, False, Unknown.
|
||||||
Status v1.ConditionStatus `json:"status"`
|
Status v1.ConditionStatus `json:"status"`
|
||||||
// Last time we probed the condition.
|
// Last time we probed the condition.
|
||||||
|
// +optional
|
||||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"`
|
||||||
// The last time the condition transitioned from one status to another.
|
// The last time the condition transitioned from one status to another.
|
||||||
|
// +optional
|
||||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"`
|
||||||
// The reason for the condition's last transition.
|
// The reason for the condition's last transition.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
// A human readable message indicating details about the transition.
|
// A human readable message indicating details about the transition.
|
||||||
|
// +optional
|
||||||
Message string `json:"message,omitempty"`
|
Message string `json:"message,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -945,37 +1058,48 @@ type PodSecurityPolicy struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// spec defines the policy enforced.
|
// spec defines the policy enforced.
|
||||||
|
// +optional
|
||||||
Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pod Security Policy Spec defines the policy enforced.
|
// Pod Security Policy Spec defines the policy enforced.
|
||||||
type PodSecurityPolicySpec struct {
|
type PodSecurityPolicySpec struct {
|
||||||
// privileged determines if a pod can request to be run as privileged.
|
// privileged determines if a pod can request to be run as privileged.
|
||||||
|
// +optional
|
||||||
Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
|
Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"`
|
||||||
// DefaultAddCapabilities is the default set of capabilities that will be added to the container
|
// DefaultAddCapabilities is the default set of capabilities that will be added to the container
|
||||||
// unless the pod spec specifically drops the capability. You may not list a capabiility in both
|
// unless the pod spec specifically drops the capability. You may not list a capabiility in both
|
||||||
// DefaultAddCapabilities and RequiredDropCapabilities.
|
// DefaultAddCapabilities and RequiredDropCapabilities.
|
||||||
|
// +optional
|
||||||
DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
||||||
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
|
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
|
||||||
// are required to be dropped and cannot be added.
|
// are required to be dropped and cannot be added.
|
||||||
|
// +optional
|
||||||
RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
||||||
// AllowedCapabilities is a list of capabilities that can be requested to add to the container.
|
// AllowedCapabilities is a list of capabilities that can be requested to add to the container.
|
||||||
// Capabilities in this field may be added at the pod author's discretion.
|
// Capabilities in this field may be added at the pod author's discretion.
|
||||||
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
|
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
|
||||||
|
// +optional
|
||||||
AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/kubernetes/pkg/api/v1.Capability"`
|
||||||
// volumes is a white list of allowed volume plugins. Empty indicates that all plugins
|
// volumes is a white list of allowed volume plugins. Empty indicates that all plugins
|
||||||
// may be used.
|
// may be used.
|
||||||
|
// +optional
|
||||||
Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
|
Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"`
|
||||||
// hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
|
// hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
|
||||||
|
// +optional
|
||||||
HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
|
HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"`
|
||||||
// hostPorts determines which host port ranges are allowed to be exposed.
|
// hostPorts determines which host port ranges are allowed to be exposed.
|
||||||
|
// +optional
|
||||||
HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
|
HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"`
|
||||||
// hostPID determines if the policy allows the use of HostPID in the pod spec.
|
// hostPID determines if the policy allows the use of HostPID in the pod spec.
|
||||||
|
// +optional
|
||||||
HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
|
HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"`
|
||||||
// hostIPC determines if the policy allows the use of HostIPC in the pod spec.
|
// hostIPC determines if the policy allows the use of HostIPC in the pod spec.
|
||||||
|
// +optional
|
||||||
HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
|
HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"`
|
||||||
// seLinux is the strategy that will dictate the allowable labels that may be set.
|
// seLinux is the strategy that will dictate the allowable labels that may be set.
|
||||||
SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
|
SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"`
|
||||||
@ -990,6 +1114,7 @@ type PodSecurityPolicySpec struct {
|
|||||||
// the PSP should deny the pod.
|
// the PSP should deny the pod.
|
||||||
// If set to false the container may run with a read only root file system if it wishes but it
|
// If set to false the container may run with a read only root file system if it wishes but it
|
||||||
// will not be forced to.
|
// will not be forced to.
|
||||||
|
// +optional
|
||||||
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
|
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1036,6 +1161,7 @@ type SELinuxStrategyOptions struct {
|
|||||||
Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
|
Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"`
|
||||||
// seLinuxOptions required to run as; required for MustRunAs
|
// seLinuxOptions required to run as; required for MustRunAs
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
|
// More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
|
||||||
|
// +optional
|
||||||
SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
|
SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1055,6 +1181,7 @@ type RunAsUserStrategyOptions struct {
|
|||||||
// Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
|
// Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
|
||||||
Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
|
Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"`
|
||||||
// Ranges are the allowed ranges of uids that may be used.
|
// Ranges are the allowed ranges of uids that may be used.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1082,9 +1209,11 @@ const (
|
|||||||
// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
|
// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
|
||||||
type FSGroupStrategyOptions struct {
|
type FSGroupStrategyOptions struct {
|
||||||
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
|
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
|
||||||
|
// +optional
|
||||||
Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
|
Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"`
|
||||||
// Ranges are the allowed ranges of fs groups. If you would like to force a single
|
// Ranges are the allowed ranges of fs groups. If you would like to force a single
|
||||||
// fs group then supply a single range with the same start and end.
|
// fs group then supply a single range with the same start and end.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1102,9 +1231,11 @@ const (
|
|||||||
// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
|
// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
|
||||||
type SupplementalGroupsStrategyOptions struct {
|
type SupplementalGroupsStrategyOptions struct {
|
||||||
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
|
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
|
||||||
|
// +optional
|
||||||
Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
|
Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"`
|
||||||
// Ranges are the allowed ranges of supplemental groups. If you would like to force a single
|
// Ranges are the allowed ranges of supplemental groups. If you would like to force a single
|
||||||
// supplemental group then supply a single range with the same start and end.
|
// supplemental group then supply a single range with the same start and end.
|
||||||
|
// +optional
|
||||||
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,6 +1255,7 @@ type PodSecurityPolicyList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of schema objects.
|
// Items is a list of schema objects.
|
||||||
@ -1134,9 +1266,11 @@ type NetworkPolicy struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Specification of the desired behavior for this NetworkPolicy.
|
// Specification of the desired behavior for this NetworkPolicy.
|
||||||
|
// +optional
|
||||||
Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1156,6 +1290,7 @@ type NetworkPolicySpec struct {
|
|||||||
// If this field is empty then this NetworkPolicy does not affect ingress isolation.
|
// If this field is empty then this NetworkPolicy does not affect ingress isolation.
|
||||||
// If this field is present and contains at least one rule, this policy allows any traffic
|
// If this field is present and contains at least one rule, this policy allows any traffic
|
||||||
// which matches at least one of the ingress rules in this list.
|
// which matches at least one of the ingress rules in this list.
|
||||||
|
// +optional
|
||||||
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
|
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,2,rep,name=ingress"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1168,6 +1303,7 @@ type NetworkPolicyIngressRule struct {
|
|||||||
// If this field is present and contains at least one item, then this rule allows traffic
|
// If this field is present and contains at least one item, then this rule allows traffic
|
||||||
// only if the traffic matches at least one port in the list.
|
// only if the traffic matches at least one port in the list.
|
||||||
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
||||||
|
// +optional
|
||||||
Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
Ports []NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`
|
||||||
|
|
||||||
// List of sources which should be able to access the pods selected for this rule.
|
// List of sources which should be able to access the pods selected for this rule.
|
||||||
@ -1177,12 +1313,14 @@ type NetworkPolicyIngressRule struct {
|
|||||||
// If this field is present and contains at least on item, this rule allows traffic only if the
|
// If this field is present and contains at least on item, this rule allows traffic only if the
|
||||||
// traffic matches at least one item in the from list.
|
// traffic matches at least one item in the from list.
|
||||||
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
// TODO: Update this to be a pointer to slice as soon as auto-generation supports it.
|
||||||
|
// +optional
|
||||||
From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
|
From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type NetworkPolicyPort struct {
|
type NetworkPolicyPort struct {
|
||||||
// Optional. The protocol (TCP or UDP) which traffic must match.
|
// Optional. The protocol (TCP or UDP) which traffic must match.
|
||||||
// If not specified, this field defaults to TCP.
|
// If not specified, this field defaults to TCP.
|
||||||
|
// +optional
|
||||||
Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
|
Protocol *v1.Protocol `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol,casttype=k8s.io/kubernetes/pkg/api/v1.Protocol"`
|
||||||
|
|
||||||
// If specified, the port on the given protocol. This can
|
// If specified, the port on the given protocol. This can
|
||||||
@ -1190,6 +1328,7 @@ type NetworkPolicyPort struct {
|
|||||||
// this matches all port names and numbers.
|
// this matches all port names and numbers.
|
||||||
// If present, only traffic on the specified protocol AND port
|
// If present, only traffic on the specified protocol AND port
|
||||||
// will be matched.
|
// will be matched.
|
||||||
|
// +optional
|
||||||
Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
|
Port *intstr.IntOrString `json:"port,omitempty" protobuf:"bytes,2,opt,name=port"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1200,6 +1339,7 @@ type NetworkPolicyPeer struct {
|
|||||||
// This field follows standard label selector semantics.
|
// This field follows standard label selector semantics.
|
||||||
// If not provided, this selector selects no pods.
|
// If not provided, this selector selects no pods.
|
||||||
// If present but empty, this selector selects all pods in this namespace.
|
// If present but empty, this selector selects all pods in this namespace.
|
||||||
|
// +optional
|
||||||
PodSelector *LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
|
PodSelector *LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"`
|
||||||
|
|
||||||
// Selects Namespaces using cluster scoped-labels. This
|
// Selects Namespaces using cluster scoped-labels. This
|
||||||
@ -1207,6 +1347,7 @@ type NetworkPolicyPeer struct {
|
|||||||
// This field follows standard label selector semantics.
|
// This field follows standard label selector semantics.
|
||||||
// If omitted, this selector selects no namespaces.
|
// If omitted, this selector selects no namespaces.
|
||||||
// If present but empty, this selector selects all namespaces.
|
// If present but empty, this selector selects all namespaces.
|
||||||
|
// +optional
|
||||||
NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
|
NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1215,6 +1356,7 @@ type NetworkPolicyList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata.
|
// Standard list metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of schema objects.
|
// Items is a list of schema objects.
|
||||||
|
@ -28,30 +28,36 @@ import (
|
|||||||
// ImageReview checks if the set of images in a pod are allowed.
|
// ImageReview checks if the set of images in a pod are allowed.
|
||||||
type ImageReview struct {
|
type ImageReview struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Spec holds information about the pod being evaluated
|
// Spec holds information about the pod being evaluated
|
||||||
Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// Status is filled in by the backend and indicates whether the pod should be allowed.
|
// Status is filled in by the backend and indicates whether the pod should be allowed.
|
||||||
|
// +optional
|
||||||
Status ImageReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ImageReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImageReviewSpec is a description of the pod creation request.
|
// ImageReviewSpec is a description of the pod creation request.
|
||||||
type ImageReviewSpec struct {
|
type ImageReviewSpec struct {
|
||||||
// Containers is a list of a subset of the information in each container of the Pod being created.
|
// Containers is a list of a subset of the information in each container of the Pod being created.
|
||||||
|
// +optional
|
||||||
Containers []ImageReviewContainerSpec `json:"containers,omitempty" protobuf:"bytes,1,rep,name=containers"`
|
Containers []ImageReviewContainerSpec `json:"containers,omitempty" protobuf:"bytes,1,rep,name=containers"`
|
||||||
// Annotations is a list of key-value pairs extracted from the Pod's annotations.
|
// Annotations is a list of key-value pairs extracted from the Pod's annotations.
|
||||||
// It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
|
// It only includes keys which match the pattern `*.image-policy.k8s.io/*`.
|
||||||
// It is up to each webhook backend to determine how to interpret these annotations, if at all.
|
// It is up to each webhook backend to determine how to interpret these annotations, if at all.
|
||||||
|
// +optional
|
||||||
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"`
|
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"`
|
||||||
// Namespace is the namespace the pod is being created in.
|
// Namespace is the namespace the pod is being created in.
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
|
Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImageReviewContainerSpec is a description of a container within the pod creation request.
|
// ImageReviewContainerSpec is a description of a container within the pod creation request.
|
||||||
type ImageReviewContainerSpec struct {
|
type ImageReviewContainerSpec struct {
|
||||||
// This can be in the form image:tag or image@SHA:012345679abcdef.
|
// This can be in the form image:tag or image@SHA:012345679abcdef.
|
||||||
|
// +optional
|
||||||
Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"`
|
Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"`
|
||||||
// In future, we may add command line overrides, exec health check command lines, and so on.
|
// In future, we may add command line overrides, exec health check command lines, and so on.
|
||||||
}
|
}
|
||||||
@ -63,5 +69,6 @@ type ImageReviewStatus struct {
|
|||||||
// Reason should be empty unless Allowed is false in which case it
|
// Reason should be empty unless Allowed is false in which case it
|
||||||
// may contain a short description of what is wrong. Kubernetes
|
// may contain a short description of what is wrong. Kubernetes
|
||||||
// may truncate excessively long errors when displaying to the user.
|
// may truncate excessively long errors when displaying to the user.
|
||||||
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"`
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,12 @@ type PodDisruptionBudgetSpec struct {
|
|||||||
// "selector" will still be available after the eviction, i.e. even in the
|
// "selector" will still be available after the eviction, i.e. even in the
|
||||||
// absence of the evicted pod. So for example you can prevent all voluntary
|
// absence of the evicted pod. So for example you can prevent all voluntary
|
||||||
// evictions by specifying "100%".
|
// evictions by specifying "100%".
|
||||||
|
// +optional
|
||||||
MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"`
|
MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"`
|
||||||
|
|
||||||
// Label query over pods whose evictions are managed by the disruption
|
// Label query over pods whose evictions are managed by the disruption
|
||||||
// budget.
|
// budget.
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,17 +58,21 @@ type PodDisruptionBudgetStatus struct {
|
|||||||
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
|
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
|
||||||
type PodDisruptionBudget struct {
|
type PodDisruptionBudget struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the PodDisruptionBudget.
|
// Specification of the desired behavior of the PodDisruptionBudget.
|
||||||
|
// +optional
|
||||||
Spec PodDisruptionBudgetSpec `json:"spec,omitempty"`
|
Spec PodDisruptionBudgetSpec `json:"spec,omitempty"`
|
||||||
// Most recently observed status of the PodDisruptionBudget.
|
// Most recently observed status of the PodDisruptionBudget.
|
||||||
|
// +optional
|
||||||
Status PodDisruptionBudgetStatus `json:"status,omitempty"`
|
Status PodDisruptionBudgetStatus `json:"status,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
|
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
|
||||||
type PodDisruptionBudgetList struct {
|
type PodDisruptionBudgetList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
Items []PodDisruptionBudget `json:"items"`
|
Items []PodDisruptionBudget `json:"items"`
|
||||||
}
|
}
|
||||||
@ -78,8 +84,10 @@ type Eviction struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// ObjectMeta describes the pod that is being evicted.
|
// ObjectMeta describes the pod that is being evicted.
|
||||||
|
// +optional
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// DeleteOptions may be provided
|
// DeleteOptions may be provided
|
||||||
|
// +optional
|
||||||
DeleteOptions *api.DeleteOptions `json:"deleteOptions,omitempty"`
|
DeleteOptions *api.DeleteOptions `json:"deleteOptions,omitempty"`
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,12 @@ type PodDisruptionBudgetSpec struct {
|
|||||||
// "selector" will still be available after the eviction, i.e. even in the
|
// "selector" will still be available after the eviction, i.e. even in the
|
||||||
// absence of the evicted pod. So for example you can prevent all voluntary
|
// absence of the evicted pod. So for example you can prevent all voluntary
|
||||||
// evictions by specifying "100%".
|
// evictions by specifying "100%".
|
||||||
|
// +optional
|
||||||
MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
|
MinAvailable intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"`
|
||||||
|
|
||||||
// Label query over pods whose evictions are managed by the disruption
|
// Label query over pods whose evictions are managed by the disruption
|
||||||
// budget.
|
// budget.
|
||||||
|
// +optional
|
||||||
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
Selector *unversioned.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,17 +58,21 @@ type PodDisruptionBudgetStatus struct {
|
|||||||
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
|
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
|
||||||
type PodDisruptionBudget struct {
|
type PodDisruptionBudget struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Specification of the desired behavior of the PodDisruptionBudget.
|
// Specification of the desired behavior of the PodDisruptionBudget.
|
||||||
|
// +optional
|
||||||
Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
// Most recently observed status of the PodDisruptionBudget.
|
// Most recently observed status of the PodDisruptionBudget.
|
||||||
|
// +optional
|
||||||
Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
|
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
|
||||||
type PodDisruptionBudgetList struct {
|
type PodDisruptionBudgetList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
}
|
}
|
||||||
@ -78,8 +84,10 @@ type Eviction struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
|
||||||
// ObjectMeta describes the pod that is being evicted.
|
// ObjectMeta describes the pod that is being evicted.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// DeleteOptions may be provided
|
// DeleteOptions may be provided
|
||||||
|
// +optional
|
||||||
DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
|
DeleteOptions *v1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
|
||||||
}
|
}
|
||||||
|
@ -34,20 +34,25 @@ type PolicyRule struct {
|
|||||||
Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
|
Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"`
|
||||||
// AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
|
// AttributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports.
|
||||||
// If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
|
// If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.
|
||||||
|
// +optional
|
||||||
AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"`
|
AttributeRestrictions runtime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"`
|
||||||
|
|
||||||
// APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
|
// APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
|
||||||
// the enumerated resources in any API group will be allowed.
|
// the enumerated resources in any API group will be allowed.
|
||||||
|
// +optional
|
||||||
APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
|
APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"`
|
||||||
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
|
// Resources is a list of resources this rule applies to. ResourceAll represents all resources.
|
||||||
|
// +optional
|
||||||
Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
|
Resources []string `json:"resources,omitempty" protobuf:"bytes,4,rep,name=resources"`
|
||||||
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
// ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.
|
||||||
|
// +optional
|
||||||
ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
|
ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"`
|
||||||
|
|
||||||
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
|
// NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
|
||||||
// This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
|
// This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.
|
||||||
// Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
|
// Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
|
||||||
// Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
|
// Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
|
||||||
|
// +optional
|
||||||
NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
|
NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,11 +63,13 @@ type Subject struct {
|
|||||||
// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
|
// If the Authorizer does not recognized the kind value, the Authorizer should report an error.
|
||||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
// APIVersion holds the API group and version of the referenced object.
|
// APIVersion holds the API group and version of the referenced object.
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt.name=apiVersion"`
|
||||||
// Name of the object being referenced.
|
// Name of the object being referenced.
|
||||||
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
|
||||||
// Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
|
// Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty
|
||||||
// the Authorizer should report an error.
|
// the Authorizer should report an error.
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,6 +89,7 @@ type RoleRef struct {
|
|||||||
type Role struct {
|
type Role struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Rules holds all the PolicyRules for this Role
|
// Rules holds all the PolicyRules for this Role
|
||||||
@ -96,6 +104,7 @@ type Role struct {
|
|||||||
type RoleBinding struct {
|
type RoleBinding struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Subjects holds references to the objects the role applies to.
|
// Subjects holds references to the objects the role applies to.
|
||||||
@ -110,6 +119,7 @@ type RoleBinding struct {
|
|||||||
type RoleBindingList struct {
|
type RoleBindingList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of RoleBindings
|
// Items is a list of RoleBindings
|
||||||
@ -120,6 +130,7 @@ type RoleBindingList struct {
|
|||||||
type RoleList struct {
|
type RoleList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of Roles
|
// Items is a list of Roles
|
||||||
@ -133,6 +144,7 @@ type RoleList struct {
|
|||||||
type ClusterRole struct {
|
type ClusterRole struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Rules holds all the PolicyRules for this ClusterRole
|
// Rules holds all the PolicyRules for this ClusterRole
|
||||||
@ -147,6 +159,7 @@ type ClusterRole struct {
|
|||||||
type ClusterRoleBinding struct {
|
type ClusterRoleBinding struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Subjects holds references to the objects the role applies to.
|
// Subjects holds references to the objects the role applies to.
|
||||||
@ -161,6 +174,7 @@ type ClusterRoleBinding struct {
|
|||||||
type ClusterRoleBindingList struct {
|
type ClusterRoleBindingList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of ClusterRoleBindings
|
// Items is a list of ClusterRoleBindings
|
||||||
@ -171,6 +185,7 @@ type ClusterRoleBindingList struct {
|
|||||||
type ClusterRoleList struct {
|
type ClusterRoleList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is a list of ClusterRoles
|
// Items is a list of ClusterRoles
|
||||||
|
@ -32,7 +32,8 @@ import (
|
|||||||
// The name of a StorageClass object is significant, and is how users can request a particular class.
|
// The name of a StorageClass object is significant, and is how users can request a particular class.
|
||||||
type StorageClass struct {
|
type StorageClass struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// provisioner is the driver expected to handle this StorageClass.
|
// provisioner is the driver expected to handle this StorageClass.
|
||||||
// This is an optionally-prefixed name, like a label key.
|
// This is an optionally-prefixed name, like a label key.
|
||||||
@ -45,6 +46,7 @@ type StorageClass struct {
|
|||||||
// to the provisioner. The only validation done on keys is that they are
|
// to the provisioner. The only validation done on keys is that they are
|
||||||
// not empty. The maximum number of parameters is
|
// not empty. The maximum number of parameters is
|
||||||
// 512, with a cumulative max size of 256K
|
// 512, with a cumulative max size of 256K
|
||||||
|
// +optional
|
||||||
Parameters map[string]string `json:"parameters,omitempty"`
|
Parameters map[string]string `json:"parameters,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,6 +55,7 @@ type StorageClassList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
// Items is the list of StorageClasses
|
// Items is the list of StorageClasses
|
||||||
|
@ -33,6 +33,7 @@ type StorageClass struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard object's metadata.
|
// Standard object's metadata.
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Provisioner indicates the type of the provisioner.
|
// Provisioner indicates the type of the provisioner.
|
||||||
@ -40,6 +41,7 @@ type StorageClass struct {
|
|||||||
|
|
||||||
// Parameters holds the parameters for the provisioner that should
|
// Parameters holds the parameters for the provisioner that should
|
||||||
// create volumes of this storage class.
|
// create volumes of this storage class.
|
||||||
|
// +optional
|
||||||
Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
|
Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +50,7 @@ type StorageClassList struct {
|
|||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
// Standard list metadata
|
// Standard list metadata
|
||||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// Items is the list of StorageClasses
|
// Items is the list of StorageClasses
|
||||||
|
@ -24,8 +24,10 @@ import (
|
|||||||
type Simple struct {
|
type Simple struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata"`
|
api.ObjectMeta `json:"metadata"`
|
||||||
Other string `json:"other,omitempty"`
|
// +optional
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Other string `json:"other,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (obj *Simple) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
func (obj *Simple) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||||
@ -33,8 +35,10 @@ func (obj *Simple) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta
|
|||||||
type SimpleRoot struct {
|
type SimpleRoot struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata"`
|
api.ObjectMeta `json:"metadata"`
|
||||||
Other string `json:"other,omitempty"`
|
// +optional
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Other string `json:"other,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (obj *SimpleRoot) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
func (obj *SimpleRoot) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||||
@ -58,7 +62,8 @@ func (obj *SimpleGetOptions) GetObjectKind() unversioned.ObjectKind { return &ob
|
|||||||
type SimpleList struct {
|
type SimpleList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
unversioned.ListMeta `json:"metadata,inline"`
|
unversioned.ListMeta `json:"metadata,inline"`
|
||||||
Items []Simple `json:"items,omitempty"`
|
// +optional
|
||||||
|
Items []Simple `json:"items,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (obj *SimpleList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
func (obj *SimpleList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||||
|
@ -46,11 +46,16 @@ type Server struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ServerStatus struct {
|
type ServerStatus struct {
|
||||||
Component string `json:"component,omitempty"`
|
// +optional
|
||||||
Health string `json:"health,omitempty"`
|
Component string `json:"component,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Health string `json:"health,omitempty"`
|
||||||
|
// +optional
|
||||||
HealthCode probe.Result `json:"healthCode,omitempty"`
|
HealthCode probe.Result `json:"healthCode,omitempty"`
|
||||||
Msg string `json:"msg,omitempty"`
|
// +optional
|
||||||
Err string `json:"err,omitempty"`
|
Msg string `json:"msg,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Err string `json:"err,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (server *Server) DoServerCheck(prober httpprober.HTTPProber) (probe.Result, string, error) {
|
func (server *Server) DoServerCheck(prober httpprober.HTTPProber) (probe.Result, string, error) {
|
||||||
|
@ -28,12 +28,14 @@ import (
|
|||||||
type Config struct {
|
type Config struct {
|
||||||
// Legacy field from pkg/api/types.go TypeMeta.
|
// Legacy field from pkg/api/types.go TypeMeta.
|
||||||
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
|
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
|
||||||
|
// +optional
|
||||||
Kind string `json:"kind,omitempty"`
|
Kind string `json:"kind,omitempty"`
|
||||||
// DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
// DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
||||||
// Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
|
// Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
|
||||||
// a single value for the cluster version.
|
// a single value for the cluster version.
|
||||||
// This field isn't really needed anyway, so we are deprecating it without replacement.
|
// This field isn't really needed anyway, so we are deprecating it without replacement.
|
||||||
// It will be ignored if it is present.
|
// It will be ignored if it is present.
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty"`
|
APIVersion string `json:"apiVersion,omitempty"`
|
||||||
// Preferences holds general information to be use for cli interactions
|
// Preferences holds general information to be use for cli interactions
|
||||||
Preferences Preferences `json:"preferences"`
|
Preferences Preferences `json:"preferences"`
|
||||||
@ -46,13 +48,16 @@ type Config struct {
|
|||||||
// CurrentContext is the name of the context that you would like to use by default
|
// CurrentContext is the name of the context that you would like to use by default
|
||||||
CurrentContext string `json:"current-context"`
|
CurrentContext string `json:"current-context"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
|
// IMPORTANT if you add fields to this struct, please update IsConfigEmpty()
|
||||||
type Preferences struct {
|
type Preferences struct {
|
||||||
|
// +optional
|
||||||
Colors bool `json:"colors,omitempty"`
|
Colors bool `json:"colors,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,14 +68,19 @@ type Cluster struct {
|
|||||||
// Server is the address of the kubernetes cluster (https://hostname:port).
|
// Server is the address of the kubernetes cluster (https://hostname:port).
|
||||||
Server string `json:"server"`
|
Server string `json:"server"`
|
||||||
// APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
// APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"api-version,omitempty"`
|
APIVersion string `json:"api-version,omitempty"`
|
||||||
// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
|
// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
|
||||||
|
// +optional
|
||||||
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
|
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
|
||||||
// CertificateAuthority is the path to a cert file for the certificate authority.
|
// CertificateAuthority is the path to a cert file for the certificate authority.
|
||||||
|
// +optional
|
||||||
CertificateAuthority string `json:"certificate-authority,omitempty"`
|
CertificateAuthority string `json:"certificate-authority,omitempty"`
|
||||||
// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
|
// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
|
||||||
|
// +optional
|
||||||
CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
|
CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,26 +89,37 @@ type AuthInfo struct {
|
|||||||
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
|
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
|
||||||
LocationOfOrigin string
|
LocationOfOrigin string
|
||||||
// ClientCertificate is the path to a client cert file for TLS.
|
// ClientCertificate is the path to a client cert file for TLS.
|
||||||
|
// +optional
|
||||||
ClientCertificate string `json:"client-certificate,omitempty"`
|
ClientCertificate string `json:"client-certificate,omitempty"`
|
||||||
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
|
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
|
||||||
|
// +optional
|
||||||
ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
|
ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
|
||||||
// ClientKey is the path to a client key file for TLS.
|
// ClientKey is the path to a client key file for TLS.
|
||||||
|
// +optional
|
||||||
ClientKey string `json:"client-key,omitempty"`
|
ClientKey string `json:"client-key,omitempty"`
|
||||||
// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
|
// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
|
||||||
|
// +optional
|
||||||
ClientKeyData []byte `json:"client-key-data,omitempty"`
|
ClientKeyData []byte `json:"client-key-data,omitempty"`
|
||||||
// Token is the bearer token for authentication to the kubernetes cluster.
|
// Token is the bearer token for authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Token string `json:"token,omitempty"`
|
Token string `json:"token,omitempty"`
|
||||||
// TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
|
// TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
|
||||||
|
// +optional
|
||||||
TokenFile string `json:"tokenFile,omitempty"`
|
TokenFile string `json:"tokenFile,omitempty"`
|
||||||
// Impersonate is the username to act-as.
|
// Impersonate is the username to act-as.
|
||||||
|
// +optional
|
||||||
Impersonate string `json:"act-as,omitempty"`
|
Impersonate string `json:"act-as,omitempty"`
|
||||||
// Username is the username for basic authentication to the kubernetes cluster.
|
// Username is the username for basic authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Username string `json:"username,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
// Password is the password for basic authentication to the kubernetes cluster.
|
// Password is the password for basic authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Password string `json:"password,omitempty"`
|
Password string `json:"password,omitempty"`
|
||||||
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
|
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
|
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,14 +132,17 @@ type Context struct {
|
|||||||
// AuthInfo is the name of the authInfo for this context
|
// AuthInfo is the name of the authInfo for this context
|
||||||
AuthInfo string `json:"user"`
|
AuthInfo string `json:"user"`
|
||||||
// Namespace is the default namespace to use on unspecified requests
|
// Namespace is the default namespace to use on unspecified requests
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty"`
|
Namespace string `json:"namespace,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
Extensions map[string]runtime.Object `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthProviderConfig holds the configuration for a specified auth provider.
|
// AuthProviderConfig holds the configuration for a specified auth provider.
|
||||||
type AuthProviderConfig struct {
|
type AuthProviderConfig struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
// +optional
|
||||||
Config map[string]string `json:"config,omitempty"`
|
Config map[string]string `json:"config,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,12 +27,14 @@ import (
|
|||||||
type Config struct {
|
type Config struct {
|
||||||
// Legacy field from pkg/api/types.go TypeMeta.
|
// Legacy field from pkg/api/types.go TypeMeta.
|
||||||
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
|
// TODO(jlowdermilk): remove this after eliminating downstream dependencies.
|
||||||
|
// +optional
|
||||||
Kind string `json:"kind,omitempty"`
|
Kind string `json:"kind,omitempty"`
|
||||||
// DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
// DEPRECATED: APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
||||||
// Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
|
// Because a cluster can run multiple API groups and potentially multiple versions of each, it no longer makes sense to specify
|
||||||
// a single value for the cluster version.
|
// a single value for the cluster version.
|
||||||
// This field isn't really needed anyway, so we are deprecating it without replacement.
|
// This field isn't really needed anyway, so we are deprecating it without replacement.
|
||||||
// It will be ignored if it is present.
|
// It will be ignored if it is present.
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty"`
|
APIVersion string `json:"apiVersion,omitempty"`
|
||||||
// Preferences holds general information to be use for cli interactions
|
// Preferences holds general information to be use for cli interactions
|
||||||
Preferences Preferences `json:"preferences"`
|
Preferences Preferences `json:"preferences"`
|
||||||
@ -45,12 +47,15 @@ type Config struct {
|
|||||||
// CurrentContext is the name of the context that you would like to use by default
|
// CurrentContext is the name of the context that you would like to use by default
|
||||||
CurrentContext string `json:"current-context"`
|
CurrentContext string `json:"current-context"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions []NamedExtension `json:"extensions,omitempty"`
|
Extensions []NamedExtension `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Preferences struct {
|
type Preferences struct {
|
||||||
|
// +optional
|
||||||
Colors bool `json:"colors,omitempty"`
|
Colors bool `json:"colors,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions []NamedExtension `json:"extensions,omitempty"`
|
Extensions []NamedExtension `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,40 +64,56 @@ type Cluster struct {
|
|||||||
// Server is the address of the kubernetes cluster (https://hostname:port).
|
// Server is the address of the kubernetes cluster (https://hostname:port).
|
||||||
Server string `json:"server"`
|
Server string `json:"server"`
|
||||||
// APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
// APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc).
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"api-version,omitempty"`
|
APIVersion string `json:"api-version,omitempty"`
|
||||||
// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
|
// InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.
|
||||||
|
// +optional
|
||||||
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
|
InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"`
|
||||||
// CertificateAuthority is the path to a cert file for the certificate authority.
|
// CertificateAuthority is the path to a cert file for the certificate authority.
|
||||||
|
// +optional
|
||||||
CertificateAuthority string `json:"certificate-authority,omitempty"`
|
CertificateAuthority string `json:"certificate-authority,omitempty"`
|
||||||
// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
|
// CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority
|
||||||
|
// +optional
|
||||||
CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
|
CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions []NamedExtension `json:"extensions,omitempty"`
|
Extensions []NamedExtension `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
|
// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
|
||||||
type AuthInfo struct {
|
type AuthInfo struct {
|
||||||
// ClientCertificate is the path to a client cert file for TLS.
|
// ClientCertificate is the path to a client cert file for TLS.
|
||||||
|
// +optional
|
||||||
ClientCertificate string `json:"client-certificate,omitempty"`
|
ClientCertificate string `json:"client-certificate,omitempty"`
|
||||||
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
|
// ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate
|
||||||
|
// +optional
|
||||||
ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
|
ClientCertificateData []byte `json:"client-certificate-data,omitempty"`
|
||||||
// ClientKey is the path to a client key file for TLS.
|
// ClientKey is the path to a client key file for TLS.
|
||||||
|
// +optional
|
||||||
ClientKey string `json:"client-key,omitempty"`
|
ClientKey string `json:"client-key,omitempty"`
|
||||||
// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
|
// ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey
|
||||||
|
// +optional
|
||||||
ClientKeyData []byte `json:"client-key-data,omitempty"`
|
ClientKeyData []byte `json:"client-key-data,omitempty"`
|
||||||
// Token is the bearer token for authentication to the kubernetes cluster.
|
// Token is the bearer token for authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Token string `json:"token,omitempty"`
|
Token string `json:"token,omitempty"`
|
||||||
// TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
|
// TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence.
|
||||||
|
// +optional
|
||||||
TokenFile string `json:"tokenFile,omitempty"`
|
TokenFile string `json:"tokenFile,omitempty"`
|
||||||
// Impersonate is the username to imperonate. The name matches the flag.
|
// Impersonate is the username to imperonate. The name matches the flag.
|
||||||
|
// +optional
|
||||||
Impersonate string `json:"as,omitempty"`
|
Impersonate string `json:"as,omitempty"`
|
||||||
// Username is the username for basic authentication to the kubernetes cluster.
|
// Username is the username for basic authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Username string `json:"username,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
// Password is the password for basic authentication to the kubernetes cluster.
|
// Password is the password for basic authentication to the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
Password string `json:"password,omitempty"`
|
Password string `json:"password,omitempty"`
|
||||||
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
|
// AuthProvider specifies a custom authentication plugin for the kubernetes cluster.
|
||||||
|
// +optional
|
||||||
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
|
AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions []NamedExtension `json:"extensions,omitempty"`
|
Extensions []NamedExtension `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,8 +124,10 @@ type Context struct {
|
|||||||
// AuthInfo is the name of the authInfo for this context
|
// AuthInfo is the name of the authInfo for this context
|
||||||
AuthInfo string `json:"user"`
|
AuthInfo string `json:"user"`
|
||||||
// Namespace is the default namespace to use on unspecified requests
|
// Namespace is the default namespace to use on unspecified requests
|
||||||
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty"`
|
Namespace string `json:"namespace,omitempty"`
|
||||||
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
// Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields
|
||||||
|
// +optional
|
||||||
Extensions []NamedExtension `json:"extensions,omitempty"`
|
Extensions []NamedExtension `json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ import (
|
|||||||
// TODO: enable meta-only decoding for protobuf.
|
// TODO: enable meta-only decoding for protobuf.
|
||||||
type MetadataOnlyObject struct {
|
type MetadataOnlyObject struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
v1.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
|
v1.ObjectMeta `json:"metadata,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of
|
// MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of
|
||||||
@ -34,6 +35,7 @@ type MetadataOnlyObject struct {
|
|||||||
// TODO: enable meta-only decoding for protobuf.
|
// TODO: enable meta-only decoding for protobuf.
|
||||||
type MetadataOnlyObjectList struct {
|
type MetadataOnlyObjectList struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
|
// +optional
|
||||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
|
||||||
Items []MetadataOnlyObject `json:"items"`
|
Items []MetadataOnlyObject `json:"items"`
|
||||||
|
@ -33,7 +33,8 @@ import (
|
|||||||
// DockerConfigJson represents ~/.docker/config.json file info
|
// DockerConfigJson represents ~/.docker/config.json file info
|
||||||
// see https://github.com/docker/docker/pull/12009
|
// see https://github.com/docker/docker/pull/12009
|
||||||
type DockerConfigJson struct {
|
type DockerConfigJson struct {
|
||||||
Auths DockerConfig `json:"auths"`
|
Auths DockerConfig `json:"auths"`
|
||||||
|
// +optional
|
||||||
HttpHeaders map[string]string `json:"HttpHeaders,omitempty"`
|
HttpHeaders map[string]string `json:"HttpHeaders,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,10 +226,14 @@ func readDockerConfigJsonFileFromBytes(contents []byte) (cfg DockerConfig, err e
|
|||||||
// dockerConfigEntryWithAuth is used solely for deserializing the Auth field
|
// dockerConfigEntryWithAuth is used solely for deserializing the Auth field
|
||||||
// into a dockerConfigEntry during JSON deserialization.
|
// into a dockerConfigEntry during JSON deserialization.
|
||||||
type dockerConfigEntryWithAuth struct {
|
type dockerConfigEntryWithAuth struct {
|
||||||
|
// +optional
|
||||||
Username string `json:"username,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
|
// +optional
|
||||||
Password string `json:"password,omitempty"`
|
Password string `json:"password,omitempty"`
|
||||||
Email string `json:"email,omitempty"`
|
// +optional
|
||||||
Auth string `json:"auth,omitempty"`
|
Email string `json:"email,omitempty"`
|
||||||
|
// +optional
|
||||||
|
Auth string `json:"auth,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error {
|
func (ident *DockerConfigEntry) UnmarshalJSON(data []byte) error {
|
||||||
|
@ -23,11 +23,12 @@ import (
|
|||||||
|
|
||||||
type TestStruct struct {
|
type TestStruct struct {
|
||||||
unversioned.TypeMeta `json:",inline"`
|
unversioned.TypeMeta `json:",inline"`
|
||||||
api.ObjectMeta `json:"metadata,omitempty"`
|
// +optional
|
||||||
Key string `json:"Key"`
|
api.ObjectMeta `json:"metadata,omitempty"`
|
||||||
Map map[string]int `json:"Map"`
|
Key string `json:"Key"`
|
||||||
StringList []string `json:"StringList"`
|
Map map[string]int `json:"Map"`
|
||||||
IntList []int `json:"IntList"`
|
StringList []string `json:"StringList"`
|
||||||
|
IntList []int `json:"IntList"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (obj *TestStruct) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
func (obj *TestStruct) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||||
|
@ -34,19 +34,25 @@ type NodeStats struct {
|
|||||||
NodeName string `json:"nodeName"`
|
NodeName string `json:"nodeName"`
|
||||||
// Stats of system daemons tracked as raw containers.
|
// Stats of system daemons tracked as raw containers.
|
||||||
// The system containers are named according to the SystemContainer* constants.
|
// The system containers are named according to the SystemContainer* constants.
|
||||||
|
// +optional
|
||||||
SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
SystemContainers []ContainerStats `json:"systemContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||||
// The time at which data collection for the node-scoped (i.e. aggregate) stats was (re)started.
|
// The time at which data collection for the node-scoped (i.e. aggregate) stats was (re)started.
|
||||||
StartTime unversioned.Time `json:"startTime"`
|
StartTime unversioned.Time `json:"startTime"`
|
||||||
// Stats pertaining to CPU resources.
|
// Stats pertaining to CPU resources.
|
||||||
|
// +optional
|
||||||
CPU *CPUStats `json:"cpu,omitempty"`
|
CPU *CPUStats `json:"cpu,omitempty"`
|
||||||
// Stats pertaining to memory (RAM) resources.
|
// Stats pertaining to memory (RAM) resources.
|
||||||
|
// +optional
|
||||||
Memory *MemoryStats `json:"memory,omitempty"`
|
Memory *MemoryStats `json:"memory,omitempty"`
|
||||||
// Stats pertaining to network resources.
|
// Stats pertaining to network resources.
|
||||||
|
// +optional
|
||||||
Network *NetworkStats `json:"network,omitempty"`
|
Network *NetworkStats `json:"network,omitempty"`
|
||||||
// Stats pertaining to total usage of filesystem resources on the rootfs used by node k8s components.
|
// Stats pertaining to total usage of filesystem resources on the rootfs used by node k8s components.
|
||||||
// NodeFs.Used is the total bytes used on the filesystem.
|
// NodeFs.Used is the total bytes used on the filesystem.
|
||||||
|
// +optional
|
||||||
Fs *FsStats `json:"fs,omitempty"`
|
Fs *FsStats `json:"fs,omitempty"`
|
||||||
// Stats about the underlying container runtime.
|
// Stats about the underlying container runtime.
|
||||||
|
// +optional
|
||||||
Runtime *RuntimeStats `json:"runtime,omitempty"`
|
Runtime *RuntimeStats `json:"runtime,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +61,7 @@ type RuntimeStats struct {
|
|||||||
// Stats about the underlying filesystem where container images are stored.
|
// Stats about the underlying filesystem where container images are stored.
|
||||||
// This filesystem could be the same as the primary (root) filesystem.
|
// This filesystem could be the same as the primary (root) filesystem.
|
||||||
// Usage here refers to the total number of bytes occupied by images on the filesystem.
|
// Usage here refers to the total number of bytes occupied by images on the filesystem.
|
||||||
|
// +optional
|
||||||
ImageFs *FsStats `json:"imageFs,omitempty"`
|
ImageFs *FsStats `json:"imageFs,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,9 +83,11 @@ type PodStats struct {
|
|||||||
// Stats of containers in the measured pod.
|
// Stats of containers in the measured pod.
|
||||||
Containers []ContainerStats `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
|
Containers []ContainerStats `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
|
||||||
// Stats pertaining to network resources.
|
// Stats pertaining to network resources.
|
||||||
|
// +optional
|
||||||
Network *NetworkStats `json:"network,omitempty"`
|
Network *NetworkStats `json:"network,omitempty"`
|
||||||
// Stats pertaining to volume usage of filesystem resources.
|
// Stats pertaining to volume usage of filesystem resources.
|
||||||
// VolumeStats.UsedBytes is the number of bytes used by the Volume
|
// VolumeStats.UsedBytes is the number of bytes used by the Volume
|
||||||
|
// +optional
|
||||||
VolumeStats []VolumeStats `json:"volume,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
VolumeStats []VolumeStats `json:"volume,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,14 +98,18 @@ type ContainerStats struct {
|
|||||||
// The time at which data collection for this container was (re)started.
|
// The time at which data collection for this container was (re)started.
|
||||||
StartTime unversioned.Time `json:"startTime"`
|
StartTime unversioned.Time `json:"startTime"`
|
||||||
// Stats pertaining to CPU resources.
|
// Stats pertaining to CPU resources.
|
||||||
|
// +optional
|
||||||
CPU *CPUStats `json:"cpu,omitempty"`
|
CPU *CPUStats `json:"cpu,omitempty"`
|
||||||
// Stats pertaining to memory (RAM) resources.
|
// Stats pertaining to memory (RAM) resources.
|
||||||
|
// +optional
|
||||||
Memory *MemoryStats `json:"memory,omitempty"`
|
Memory *MemoryStats `json:"memory,omitempty"`
|
||||||
// Stats pertaining to container rootfs usage of filesystem resources.
|
// Stats pertaining to container rootfs usage of filesystem resources.
|
||||||
// Rootfs.UsedBytes is the number of bytes used for the container write layer.
|
// Rootfs.UsedBytes is the number of bytes used for the container write layer.
|
||||||
|
// +optional
|
||||||
Rootfs *FsStats `json:"rootfs,omitempty"`
|
Rootfs *FsStats `json:"rootfs,omitempty"`
|
||||||
// Stats pertaining to container logs usage of filesystem resources.
|
// Stats pertaining to container logs usage of filesystem resources.
|
||||||
// Logs.UsedBytes is the number of bytes used for the container logs.
|
// Logs.UsedBytes is the number of bytes used for the container logs.
|
||||||
|
// +optional
|
||||||
Logs *FsStats `json:"logs,omitempty"`
|
Logs *FsStats `json:"logs,omitempty"`
|
||||||
// User defined metrics that are exposed by containers in the pod. Typically, we expect only one container in the pod to be exposing user defined metrics. In the event of multiple containers exposing metrics, they will be combined here.
|
// User defined metrics that are exposed by containers in the pod. Typically, we expect only one container in the pod to be exposing user defined metrics. In the event of multiple containers exposing metrics, they will be combined here.
|
||||||
UserDefinedMetrics []UserDefinedMetric `json:"userDefinedMetrics,omitmepty" patchStrategy:"merge" patchMergeKey:"name"`
|
UserDefinedMetrics []UserDefinedMetric `json:"userDefinedMetrics,omitmepty" patchStrategy:"merge" patchMergeKey:"name"`
|
||||||
@ -114,12 +127,16 @@ type NetworkStats struct {
|
|||||||
// The time at which these stats were updated.
|
// The time at which these stats were updated.
|
||||||
Time unversioned.Time `json:"time"`
|
Time unversioned.Time `json:"time"`
|
||||||
// Cumulative count of bytes received.
|
// Cumulative count of bytes received.
|
||||||
|
// +optional
|
||||||
RxBytes *uint64 `json:"rxBytes,omitempty"`
|
RxBytes *uint64 `json:"rxBytes,omitempty"`
|
||||||
// Cumulative count of receive errors encountered.
|
// Cumulative count of receive errors encountered.
|
||||||
|
// +optional
|
||||||
RxErrors *uint64 `json:"rxErrors,omitempty"`
|
RxErrors *uint64 `json:"rxErrors,omitempty"`
|
||||||
// Cumulative count of bytes transmitted.
|
// Cumulative count of bytes transmitted.
|
||||||
|
// +optional
|
||||||
TxBytes *uint64 `json:"txBytes,omitempty"`
|
TxBytes *uint64 `json:"txBytes,omitempty"`
|
||||||
// Cumulative count of transmit errors encountered.
|
// Cumulative count of transmit errors encountered.
|
||||||
|
// +optional
|
||||||
TxErrors *uint64 `json:"txErrors,omitempty"`
|
TxErrors *uint64 `json:"txErrors,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,8 +146,10 @@ type CPUStats struct {
|
|||||||
Time unversioned.Time `json:"time"`
|
Time unversioned.Time `json:"time"`
|
||||||
// Total CPU usage (sum of all cores) averaged over the sample window.
|
// Total CPU usage (sum of all cores) averaged over the sample window.
|
||||||
// The "core" unit can be interpreted as CPU core-nanoseconds per second.
|
// The "core" unit can be interpreted as CPU core-nanoseconds per second.
|
||||||
|
// +optional
|
||||||
UsageNanoCores *uint64 `json:"usageNanoCores,omitempty"`
|
UsageNanoCores *uint64 `json:"usageNanoCores,omitempty"`
|
||||||
// Cumulative CPU usage (sum of all cores) since object creation.
|
// Cumulative CPU usage (sum of all cores) since object creation.
|
||||||
|
// +optional
|
||||||
UsageCoreNanoSeconds *uint64 `json:"usageCoreNanoSeconds,omitempty"`
|
UsageCoreNanoSeconds *uint64 `json:"usageCoreNanoSeconds,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,18 +159,24 @@ type MemoryStats struct {
|
|||||||
Time unversioned.Time `json:"time"`
|
Time unversioned.Time `json:"time"`
|
||||||
// Available memory for use. This is defined as the memory limit - workingSetBytes.
|
// Available memory for use. This is defined as the memory limit - workingSetBytes.
|
||||||
// If memory limit is undefined, the available bytes is omitted.
|
// If memory limit is undefined, the available bytes is omitted.
|
||||||
|
// +optional
|
||||||
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
||||||
// Total memory in use. This includes all memory regardless of when it was accessed.
|
// Total memory in use. This includes all memory regardless of when it was accessed.
|
||||||
|
// +optional
|
||||||
UsageBytes *uint64 `json:"usageBytes,omitempty"`
|
UsageBytes *uint64 `json:"usageBytes,omitempty"`
|
||||||
// The amount of working set memory. This includes recently accessed memory,
|
// The amount of working set memory. This includes recently accessed memory,
|
||||||
// dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes
|
// dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes
|
||||||
|
// +optional
|
||||||
WorkingSetBytes *uint64 `json:"workingSetBytes,omitempty"`
|
WorkingSetBytes *uint64 `json:"workingSetBytes,omitempty"`
|
||||||
// The amount of anonymous and swap cache memory (includes transparent
|
// The amount of anonymous and swap cache memory (includes transparent
|
||||||
// hugepages).
|
// hugepages).
|
||||||
|
// +optional
|
||||||
RSSBytes *uint64 `json:"rssBytes,omitempty"`
|
RSSBytes *uint64 `json:"rssBytes,omitempty"`
|
||||||
// Cumulative number of minor page faults.
|
// Cumulative number of minor page faults.
|
||||||
|
// +optional
|
||||||
PageFaults *uint64 `json:"pageFaults,omitempty"`
|
PageFaults *uint64 `json:"pageFaults,omitempty"`
|
||||||
// Cumulative number of major page faults.
|
// Cumulative number of major page faults.
|
||||||
|
// +optional
|
||||||
MajorPageFaults *uint64 `json:"majorPageFaults,omitempty"`
|
MajorPageFaults *uint64 `json:"majorPageFaults,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,22 +185,28 @@ type VolumeStats struct {
|
|||||||
// Embedded FsStats
|
// Embedded FsStats
|
||||||
FsStats
|
FsStats
|
||||||
// Name is the name given to the Volume
|
// Name is the name given to the Volume
|
||||||
|
// +optional
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FsStats contains data about filesystem usage.
|
// FsStats contains data about filesystem usage.
|
||||||
type FsStats struct {
|
type FsStats struct {
|
||||||
// AvailableBytes represents the storage space available (bytes) for the filesystem.
|
// AvailableBytes represents the storage space available (bytes) for the filesystem.
|
||||||
|
// +optional
|
||||||
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
AvailableBytes *uint64 `json:"availableBytes,omitempty"`
|
||||||
// CapacityBytes represents the total capacity (bytes) of the filesystems underlying storage.
|
// CapacityBytes represents the total capacity (bytes) of the filesystems underlying storage.
|
||||||
|
// +optional
|
||||||
CapacityBytes *uint64 `json:"capacityBytes,omitempty"`
|
CapacityBytes *uint64 `json:"capacityBytes,omitempty"`
|
||||||
// UsedBytes represents the bytes used for a specific task on the filesystem.
|
// UsedBytes represents the bytes used for a specific task on the filesystem.
|
||||||
// This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes.
|
// This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes.
|
||||||
// e.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem.
|
// e.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem.
|
||||||
|
// +optional
|
||||||
UsedBytes *uint64 `json:"usedBytes,omitempty"`
|
UsedBytes *uint64 `json:"usedBytes,omitempty"`
|
||||||
// InodesFree represents the free inodes in the filesystem.
|
// InodesFree represents the free inodes in the filesystem.
|
||||||
|
// +optional
|
||||||
InodesFree *uint64 `json:"inodesFree,omitempty"`
|
InodesFree *uint64 `json:"inodesFree,omitempty"`
|
||||||
// Inodes represents the total inodes in the filesystem.
|
// Inodes represents the total inodes in the filesystem.
|
||||||
|
// +optional
|
||||||
Inodes *uint64 `json:"inodes,omitempty"`
|
Inodes *uint64 `json:"inodes,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,6 +236,7 @@ type UserDefinedMetricDescriptor struct {
|
|||||||
Units string `json:"units"`
|
Units string `json:"units"`
|
||||||
|
|
||||||
// Metadata labels associated with this metric.
|
// Metadata labels associated with this metric.
|
||||||
|
// +optional
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,23 +88,28 @@ func CreateHandlers(provider StatsProvider, summaryProvider SummaryProvider) *re
|
|||||||
type StatsRequest struct {
|
type StatsRequest struct {
|
||||||
// The name of the container for which to request stats.
|
// The name of the container for which to request stats.
|
||||||
// Default: /
|
// Default: /
|
||||||
|
// +optional
|
||||||
ContainerName string `json:"containerName,omitempty"`
|
ContainerName string `json:"containerName,omitempty"`
|
||||||
|
|
||||||
// Max number of stats to return.
|
// Max number of stats to return.
|
||||||
// If start and end time are specified this limit is ignored.
|
// If start and end time are specified this limit is ignored.
|
||||||
// Default: 60
|
// Default: 60
|
||||||
|
// +optional
|
||||||
NumStats int `json:"num_stats,omitempty"`
|
NumStats int `json:"num_stats,omitempty"`
|
||||||
|
|
||||||
// Start time for which to query information.
|
// Start time for which to query information.
|
||||||
// If omitted, the beginning of time is assumed.
|
// If omitted, the beginning of time is assumed.
|
||||||
|
// +optional
|
||||||
Start time.Time `json:"start,omitempty"`
|
Start time.Time `json:"start,omitempty"`
|
||||||
|
|
||||||
// End time for which to query information.
|
// End time for which to query information.
|
||||||
// If omitted, current time is assumed.
|
// If omitted, current time is assumed.
|
||||||
|
// +optional
|
||||||
End time.Time `json:"end,omitempty"`
|
End time.Time `json:"end,omitempty"`
|
||||||
|
|
||||||
// Whether to also include information from subcontainers.
|
// Whether to also include information from subcontainers.
|
||||||
// Default: false.
|
// Default: false.
|
||||||
|
// +optional
|
||||||
Subcontainers bool `json:"subcontainers,omitempty"`
|
Subcontainers bool `json:"subcontainers,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,10 +522,13 @@ func (t *thirdPartyResourceDataEncoder) Encode(obj runtime.Object, stream io.Wri
|
|||||||
}
|
}
|
||||||
|
|
||||||
encMap := struct {
|
encMap := struct {
|
||||||
Kind string `json:"kind,omitempty"`
|
// +optional
|
||||||
Items []json.RawMessage `json:"items"`
|
Kind string `json:"kind,omitempty"`
|
||||||
Metadata unversioned.ListMeta `json:"metadata,omitempty"`
|
Items []json.RawMessage `json:"items"`
|
||||||
APIVersion string `json:"apiVersion,omitempty"`
|
// +optional
|
||||||
|
Metadata unversioned.ListMeta `json:"metadata,omitempty"`
|
||||||
|
// +optional
|
||||||
|
APIVersion string `json:"apiVersion,omitempty"`
|
||||||
}{
|
}{
|
||||||
Kind: t.gvk.Kind + "List",
|
Kind: t.gvk.Kind + "List",
|
||||||
Items: listItems,
|
Items: listItems,
|
||||||
|
@ -47,8 +47,10 @@ type SimpleMetaFactory struct {
|
|||||||
// encoding of an object, or an error.
|
// encoding of an object, or an error.
|
||||||
func (SimpleMetaFactory) Interpret(data []byte) (*unversioned.GroupVersionKind, error) {
|
func (SimpleMetaFactory) Interpret(data []byte) (*unversioned.GroupVersionKind, error) {
|
||||||
findKind := struct {
|
findKind := struct {
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty"`
|
APIVersion string `json:"apiVersion,omitempty"`
|
||||||
Kind string `json:"kind,omitempty"`
|
// +optional
|
||||||
|
Kind string `json:"kind,omitempty"`
|
||||||
}{}
|
}{}
|
||||||
if err := json.Unmarshal(data, &findKind); err != nil {
|
if err := json.Unmarshal(data, &findKind); err != nil {
|
||||||
return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
|
return nil, fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
|
||||||
|
@ -34,8 +34,10 @@ package runtime
|
|||||||
// +protobuf=true
|
// +protobuf=true
|
||||||
// +k8s:openapi-gen=true
|
// +k8s:openapi-gen=true
|
||||||
type TypeMeta struct {
|
type TypeMeta struct {
|
||||||
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"`
|
||||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
// +optional
|
||||||
|
Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -82,6 +82,7 @@ type UpdateFunc func(input runtime.Object, res ResponseMeta) (output runtime.Obj
|
|||||||
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
|
// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
|
||||||
type Preconditions struct {
|
type Preconditions struct {
|
||||||
// Specifies the target UID.
|
// Specifies the target UID.
|
||||||
|
// +optional
|
||||||
UID *types.UID `json:"uid,omitempty"`
|
UID *types.UID `json:"uid,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,11 +31,13 @@ import (
|
|||||||
// in the schema.
|
// in the schema.
|
||||||
type WatchEvent struct {
|
type WatchEvent struct {
|
||||||
// The type of the watch event; added, modified, deleted, or error.
|
// The type of the watch event; added, modified, deleted, or error.
|
||||||
|
// +optional
|
||||||
Type watch.EventType `json:"type,omitempty" description:"the type of watch event; may be ADDED, MODIFIED, DELETED, or ERROR"`
|
Type watch.EventType `json:"type,omitempty" description:"the type of watch event; may be ADDED, MODIFIED, DELETED, or ERROR"`
|
||||||
|
|
||||||
// For added or modified objects, this is the new object; for deleted objects,
|
// For added or modified objects, this is the new object; for deleted objects,
|
||||||
// it's the state of the object immediately prior to its deletion.
|
// it's the state of the object immediately prior to its deletion.
|
||||||
// For errors, it's an api.Status.
|
// For errors, it's an api.Status.
|
||||||
|
// +optional
|
||||||
Object runtime.RawExtension `json:"object,omitempty" description:"the object being watched; will match the type of the resource endpoint or be a Status object if the type is ERROR"`
|
Object runtime.RawExtension `json:"object,omitempty" description:"the object being watched; will match the type of the resource endpoint or be a Status object if the type is ERROR"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user