mirror of https://github.com/k3s-io/k3s
Remove json serialization annotations from internal types
parent
59cfdfb8db
commit
d5afb71cf4
|
@ -86,6 +86,6 @@ type NodeConfiguration struct {
|
|||
type ClusterInfo struct {
|
||||
metav1.TypeMeta
|
||||
// TODO(phase1+) this may become simply `api.Config`
|
||||
CertificateAuthorities []string `json:"certificateAuthorities"`
|
||||
Endpoints []string `json:"endpoints"`
|
||||
CertificateAuthorities []string
|
||||
Endpoints []string
|
||||
}
|
||||
|
|
|
@ -24,16 +24,16 @@ import (
|
|||
// +genclient=true
|
||||
|
||||
type TestType struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
Status TestTypeStatus `json:"status,omitempty"`
|
||||
metav1.TypeMeta
|
||||
api.ObjectMeta
|
||||
Status TestTypeStatus
|
||||
}
|
||||
|
||||
type TestTypeList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.TypeMeta
|
||||
metav1.ListMeta
|
||||
|
||||
Items []TestType `json:"items"`
|
||||
Items []TestType
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
|
|
|
@ -24,10 +24,10 @@ import (
|
|||
// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
|
||||
type ServerAddressByClientCIDR struct {
|
||||
// The CIDR with which clients can match their IP to figure out the server address that they should use.
|
||||
ClientCIDR string `json:"clientCIDR" protobuf:"bytes,1,opt,name=clientCIDR"`
|
||||
ClientCIDR string
|
||||
// Address of this server, suitable for a client that matches the above CIDR.
|
||||
// This can be a hostname, hostname:port, IP or IP:port.
|
||||
ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"`
|
||||
ServerAddress string
|
||||
}
|
||||
|
||||
// ClusterSpec describes the attributes of a kubernetes cluster.
|
||||
|
@ -36,14 +36,14 @@ type ClusterSpec struct {
|
|||
// This is to help clients reach servers in the most network-efficient way possible.
|
||||
// Clients can use the appropriate server address as per the CIDR that they match.
|
||||
// In case of multiple matches, clients should use the longest matching CIDR.
|
||||
ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" patchStrategy:"merge" patchMergeKey:"clientCIDR"`
|
||||
ServerAddressByClientCIDRs []ServerAddressByClientCIDR
|
||||
// Name of the secret containing kubeconfig to access this cluster.
|
||||
// The secret is read from the kubernetes cluster that is hosting federation control plane.
|
||||
// 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 can be left empty if the cluster allows insecure access.
|
||||
// +optional
|
||||
SecretRef *api.LocalObjectReference `json:"secretRef,omitempty"`
|
||||
SecretRef *api.LocalObjectReference
|
||||
}
|
||||
|
||||
type ClusterConditionType string
|
||||
|
@ -59,35 +59,35 @@ const (
|
|||
// ClusterCondition describes current state of a cluster.
|
||||
type ClusterCondition struct {
|
||||
// Type of cluster condition, Complete or Failed.
|
||||
Type ClusterConditionType `json:"type"`
|
||||
Type ClusterConditionType
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status api.ConditionStatus `json:"status"`
|
||||
Status api.ConditionStatus
|
||||
// Last time the condition was checked.
|
||||
// +optional
|
||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
|
||||
LastProbeTime metav1.Time
|
||||
// Last time the condition transit from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
LastTransitionTime metav1.Time
|
||||
// (brief) reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string
|
||||
// Human readable message indicating details about last transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string
|
||||
}
|
||||
|
||||
// ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally.
|
||||
type ClusterStatus struct {
|
||||
// Conditions is an array of current cluster conditions.
|
||||
// +optional
|
||||
Conditions []ClusterCondition `json:"conditions,omitempty"`
|
||||
Conditions []ClusterCondition
|
||||
// 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.
|
||||
// +optional
|
||||
Zones []string `json:"zones,omitempty"`
|
||||
Zones []string
|
||||
// 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
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -95,30 +95,30 @@ type ClusterStatus struct {
|
|||
|
||||
// Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation.
|
||||
type Cluster struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec defines the behavior of the Cluster.
|
||||
// +optional
|
||||
Spec ClusterSpec `json:"spec,omitempty"`
|
||||
Spec ClusterSpec
|
||||
// Status describes the current status of a Cluster
|
||||
// +optional
|
||||
Status ClusterStatus `json:"status,omitempty"`
|
||||
Status ClusterStatus
|
||||
}
|
||||
|
||||
// A list of all the kubernetes clusters registered to the federation
|
||||
type ClusterList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// List of Cluster objects.
|
||||
Items []Cluster `json:"items"`
|
||||
Items []Cluster
|
||||
}
|
||||
|
||||
// Temporary/alpha structures to support custom replica assignments within FederatedReplicaSet.
|
||||
|
@ -131,24 +131,24 @@ type FederatedReplicaSetPreferences struct {
|
|||
// in order to bring cluster replicasets towards a desired state. Otherwise, if set to false,
|
||||
// up and running replicas will not be moved.
|
||||
// +optional
|
||||
Rebalance bool `json:"rebalance,omitempty"`
|
||||
Rebalance bool
|
||||
|
||||
// A mapping between cluster names and preferences regarding local ReplicaSet in these clusters.
|
||||
// "*" (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.
|
||||
// +optional
|
||||
Clusters map[string]ClusterReplicaSetPreferences `json:"clusters,omitempty"`
|
||||
Clusters map[string]ClusterReplicaSetPreferences
|
||||
}
|
||||
|
||||
// Preferences regarding number of replicas assigned to a cluster replicaset within a federated replicaset.
|
||||
type ClusterReplicaSetPreferences struct {
|
||||
// Minimum number of replicas that should be assigned to this Local ReplicaSet. 0 by default.
|
||||
// +optional
|
||||
MinReplicas int64 `json:"minReplicas,omitempty"`
|
||||
MinReplicas int64
|
||||
|
||||
// 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
|
||||
|
||||
// A number expressing the preference to put an additional replica to this LocalReplicaSet. 0 by default.
|
||||
Weight int64
|
||||
|
|
1156
pkg/api/types.go
1156
pkg/api/types.go
File diff suppressed because it is too large
Load Diff
|
@ -30,18 +30,18 @@ import (
|
|||
// The StatefulSet guarantees that a given network identity will always
|
||||
// map to the same storage identity.
|
||||
type StatefulSet struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec defines the desired identities of pods in this set.
|
||||
// +optional
|
||||
Spec StatefulSetSpec `json:"spec,omitempty"`
|
||||
Spec StatefulSetSpec
|
||||
|
||||
// Status is the current status of Pods in this StatefulSet. This data
|
||||
// may be out of date by some window of time.
|
||||
// +optional
|
||||
Status StatefulSetStatus `json:"status,omitempty"`
|
||||
Status StatefulSetStatus
|
||||
}
|
||||
|
||||
// A StatefulSetSpec is the specification of a StatefulSet.
|
||||
|
@ -52,19 +52,19 @@ type StatefulSetSpec struct {
|
|||
// If unspecified, defaults to 1.
|
||||
// TODO: Consider a rename of this field.
|
||||
// +optional
|
||||
Replicas int32 `json:"replicas,omitempty"`
|
||||
Replicas int32
|
||||
|
||||
// Selector is a label query over pods that should match the replica count.
|
||||
// If empty, defaulted to labels on the pod template.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected. Each pod stamped out by the StatefulSet
|
||||
// will fulfill this Template, but have a unique identity from the rest
|
||||
// of the StatefulSet.
|
||||
Template api.PodTemplateSpec `json:"template"`
|
||||
Template api.PodTemplateSpec
|
||||
|
||||
// VolumeClaimTemplates is a list of claims that pods are allowed to reference.
|
||||
// The StatefulSet controller is responsible for mapping network identities to
|
||||
|
@ -74,30 +74,30 @@ type StatefulSetSpec struct {
|
|||
// any volumes in the template, 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
|
||||
|
||||
// ServiceName is the name of the service that governs this StatefulSet.
|
||||
// This service must exist before the StatefulSet, and is responsible for
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
ServiceName string `json:"serviceName"`
|
||||
ServiceName string
|
||||
}
|
||||
|
||||
// StatefulSetStatus represents the current state of a StatefulSet.
|
||||
type StatefulSetStatus struct {
|
||||
// most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
ObservedGeneration *int64
|
||||
|
||||
// Replicas is the number of actual replicas.
|
||||
Replicas int32 `json:"replicas"`
|
||||
Replicas int32
|
||||
}
|
||||
|
||||
// StatefulSetList is a collection of StatefulSets.
|
||||
type StatefulSetList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []StatefulSet `json:"items"`
|
||||
metav1.ListMeta
|
||||
Items []StatefulSet
|
||||
}
|
||||
|
|
|
@ -23,113 +23,113 @@ import (
|
|||
|
||||
// Scale represents a scaling request for a resource.
|
||||
type Scale struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// 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
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource.
|
||||
type ScaleSpec struct {
|
||||
// desired number of instances for the scaled object.
|
||||
// +optional
|
||||
Replicas int32 `json:"replicas,omitempty"`
|
||||
Replicas int32
|
||||
}
|
||||
|
||||
// ScaleStatus represents the current status of a scale subresource.
|
||||
type ScaleStatus struct {
|
||||
// actual number of observed instances of the scaled object.
|
||||
Replicas int32 `json:"replicas"`
|
||||
Replicas int32
|
||||
|
||||
// label query over pods that should match the replicas count. This is same
|
||||
// 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.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector string `json:"selector,omitempty"`
|
||||
Selector string
|
||||
}
|
||||
|
||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||
type CrossVersionObjectReference struct {
|
||||
// Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds"
|
||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||
Kind string
|
||||
// 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
|
||||
// API version of the referent
|
||||
// +optional
|
||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||
APIVersion string
|
||||
}
|
||||
|
||||
// specification of a horizontal pod autoscaler.
|
||||
type HorizontalPodAutoscalerSpec struct {
|
||||
// reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption
|
||||
// and will set the desired number of pods by using its Scale subresource.
|
||||
ScaleTargetRef CrossVersionObjectReference `json:"scaleTargetRef"`
|
||||
ScaleTargetRef CrossVersionObjectReference
|
||||
// lower limit for the number of pods that can be set by the autoscaler, default 1.
|
||||
// +optional
|
||||
MinReplicas *int32 `json:"minReplicas,omitempty"`
|
||||
MinReplicas *int32
|
||||
// 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
|
||||
// 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.
|
||||
// +optional
|
||||
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty"`
|
||||
TargetCPUUtilizationPercentage *int32
|
||||
}
|
||||
|
||||
// current status of a horizontal pod autoscaler
|
||||
type HorizontalPodAutoscalerStatus struct {
|
||||
// most recent generation observed by this autoscaler.
|
||||
// +optional
|
||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
|
||||
ObservedGeneration *int64
|
||||
|
||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
||||
// used by the autoscaler to control how often the number of pods is changed.
|
||||
// +optional
|
||||
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty"`
|
||||
LastScaleTime *metav1.Time
|
||||
|
||||
// current number of replicas of pods managed by this autoscaler.
|
||||
CurrentReplicas int32 `json:"currentReplicas"`
|
||||
CurrentReplicas int32
|
||||
|
||||
// desired number of replicas of pods managed by this autoscaler.
|
||||
DesiredReplicas int32 `json:"desiredReplicas"`
|
||||
DesiredReplicas int32
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
|
||||
CurrentCPUUtilizationPercentage *int32
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// configuration of a horizontal pod autoscaler.
|
||||
type HorizontalPodAutoscaler struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// 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
|
||||
|
||||
// current information about the autoscaler.
|
||||
// +optional
|
||||
Status HorizontalPodAutoscalerStatus `json:"status,omitempty"`
|
||||
Status HorizontalPodAutoscalerStatus
|
||||
}
|
||||
|
||||
// list of horizontal pod autoscaler objects.
|
||||
type HorizontalPodAutoscalerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// list of horizontal pod autoscaler objects.
|
||||
Items []HorizontalPodAutoscaler `json:"items"`
|
||||
Items []HorizontalPodAutoscaler
|
||||
}
|
||||
|
|
|
@ -25,47 +25,47 @@ import (
|
|||
|
||||
// Job represents the configuration of a single job.
|
||||
type Job struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// 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
|
||||
// +optional
|
||||
Spec JobSpec `json:"spec,omitempty"`
|
||||
Spec JobSpec
|
||||
|
||||
// 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
|
||||
// +optional
|
||||
Status JobStatus `json:"status,omitempty"`
|
||||
Status JobStatus
|
||||
}
|
||||
|
||||
// JobList is a collection of jobs.
|
||||
type JobList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of Job.
|
||||
Items []Job `json:"items"`
|
||||
Items []Job
|
||||
}
|
||||
|
||||
// JobTemplate describes a template for creating copies of a predefined pod.
|
||||
type JobTemplate struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Template defines jobs that will be created from this template
|
||||
// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Template JobTemplateSpec `json:"template,omitempty"`
|
||||
Template JobTemplateSpec
|
||||
}
|
||||
|
||||
// JobTemplateSpec describes the data a Job should have when created from a template
|
||||
|
@ -73,12 +73,12 @@ type JobTemplateSpec struct {
|
|||
// Standard object's metadata of the jobs created from this template.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Specification of the desired behavior of the job.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec JobSpec `json:"spec,omitempty"`
|
||||
Spec JobSpec
|
||||
}
|
||||
|
||||
// JobSpec describes how the job execution will look like.
|
||||
|
@ -89,7 +89,7 @@ type JobSpec struct {
|
|||
// 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.
|
||||
// +optional
|
||||
Parallelism *int32 `json:"parallelism,omitempty"`
|
||||
Parallelism *int32
|
||||
|
||||
// Completions specifies the desired number of successfully finished pods the
|
||||
// job should be run with. Setting to nil means that the success of any
|
||||
|
@ -97,17 +97,17 @@ type JobSpec struct {
|
|||
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
|
||||
// pod signals the success of the job.
|
||||
// +optional
|
||||
Completions *int32 `json:"completions,omitempty"`
|
||||
Completions *int32
|
||||
|
||||
// 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
|
||||
// +optional
|
||||
ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
|
||||
ActiveDeadlineSeconds *int64
|
||||
|
||||
// Selector is a label query over pods that should match the pod count.
|
||||
// Normally, the system sets this field for you.
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// ManualSelector controls generation of pod labels and pod selectors.
|
||||
// Leave `manualSelector` unset unless you are certain what you are doing.
|
||||
|
@ -119,11 +119,11 @@ type JobSpec struct {
|
|||
// `manualSelector=true` in jobs that were created with the old `extensions/v1beta1`
|
||||
// API.
|
||||
// +optional
|
||||
ManualSelector *bool `json:"manualSelector,omitempty"`
|
||||
ManualSelector *bool
|
||||
|
||||
// Template is the object that describes the pod that will be created when
|
||||
// executing a job.
|
||||
Template api.PodTemplateSpec `json:"template"`
|
||||
Template api.PodTemplateSpec
|
||||
}
|
||||
|
||||
// JobStatus represents the current state of a Job.
|
||||
|
@ -131,31 +131,31 @@ type JobStatus struct {
|
|||
|
||||
// Conditions represent the latest available observations of an object's current state.
|
||||
// +optional
|
||||
Conditions []JobCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||
Conditions []JobCondition
|
||||
|
||||
// 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 represented in RFC3339 form and is in UTC.
|
||||
// +optional
|
||||
StartTime *metav1.Time `json:"startTime,omitempty"`
|
||||
StartTime *metav1.Time
|
||||
|
||||
// CompletionTime represents time when the job was completed. It is not guaranteed to
|
||||
// be set in happens-before order across separate operations.
|
||||
// It is represented in RFC3339 form and is in UTC.
|
||||
// +optional
|
||||
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
|
||||
CompletionTime *metav1.Time
|
||||
|
||||
// Active is the number of actively running pods.
|
||||
// +optional
|
||||
Active int32 `json:"active,omitempty"`
|
||||
Active int32
|
||||
|
||||
// Succeeded is the number of pods which reached Phase Succeeded.
|
||||
// +optional
|
||||
Succeeded int32 `json:"succeeded,omitempty"`
|
||||
Succeeded int32
|
||||
|
||||
// Failed is the number of pods which reached Phase Failed.
|
||||
// +optional
|
||||
Failed int32 `json:"failed,omitempty"`
|
||||
Failed int32
|
||||
}
|
||||
|
||||
type JobConditionType string
|
||||
|
@ -171,79 +171,79 @@ const (
|
|||
// JobCondition describes current state of a job.
|
||||
type JobCondition struct {
|
||||
// Type of job condition, Complete or Failed.
|
||||
Type JobConditionType `json:"type"`
|
||||
Type JobConditionType
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status api.ConditionStatus `json:"status"`
|
||||
Status api.ConditionStatus
|
||||
// Last time the condition was checked.
|
||||
// +optional
|
||||
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
|
||||
LastProbeTime metav1.Time
|
||||
// Last time the condition transit from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
LastTransitionTime metav1.Time
|
||||
// (brief) reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string
|
||||
// Human readable message indicating details about last transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// CronJob represents the configuration of a single cron job.
|
||||
type CronJob struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// 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
|
||||
// +optional
|
||||
Spec CronJobSpec `json:"spec,omitempty"`
|
||||
Spec CronJobSpec
|
||||
|
||||
// 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
|
||||
// +optional
|
||||
Status CronJobStatus `json:"status,omitempty"`
|
||||
Status CronJobStatus
|
||||
}
|
||||
|
||||
// CronJobList is a collection of cron jobs.
|
||||
type CronJobList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of CronJob.
|
||||
Items []CronJob `json:"items"`
|
||||
Items []CronJob
|
||||
}
|
||||
|
||||
// CronJobSpec describes how the job execution will look like and when it will actually run.
|
||||
type CronJobSpec struct {
|
||||
|
||||
// Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
|
||||
Schedule string `json:"schedule"`
|
||||
Schedule string
|
||||
|
||||
// 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.
|
||||
// +optional
|
||||
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
|
||||
StartingDeadlineSeconds *int64
|
||||
|
||||
// ConcurrencyPolicy specifies how to treat concurrent executions of a Job.
|
||||
// +optional
|
||||
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
|
||||
ConcurrencyPolicy ConcurrencyPolicy
|
||||
|
||||
// Suspend flag tells the controller to suspend subsequent executions, it does
|
||||
// not apply to already started executions. Defaults to false.
|
||||
// +optional
|
||||
Suspend *bool `json:"suspend,omitempty"`
|
||||
Suspend *bool
|
||||
|
||||
// JobTemplate is the object that describes the job that will be created when
|
||||
// executing a CronJob.
|
||||
JobTemplate JobTemplateSpec `json:"jobTemplate"`
|
||||
JobTemplate JobTemplateSpec
|
||||
}
|
||||
|
||||
// ConcurrencyPolicy describes how the job will be handled.
|
||||
|
@ -268,9 +268,9 @@ const (
|
|||
type CronJobStatus struct {
|
||||
// Active holds pointers to currently running jobs.
|
||||
// +optional
|
||||
Active []api.ObjectReference `json:"active,omitempty"`
|
||||
Active []api.ObjectReference
|
||||
|
||||
// LastScheduleTime keeps information of when was the last time the job was successfully scheduled.
|
||||
// +optional
|
||||
LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
|
||||
LastScheduleTime *metav1.Time
|
||||
}
|
||||
|
|
|
@ -26,17 +26,17 @@ import (
|
|||
|
||||
// Describes a certificate signing request
|
||||
type CertificateSigningRequest struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// The certificate request itself and any additional information.
|
||||
// +optional
|
||||
Spec CertificateSigningRequestSpec `json:"spec,omitempty"`
|
||||
Spec CertificateSigningRequestSpec
|
||||
|
||||
// Derived information about the request.
|
||||
// +optional
|
||||
Status CertificateSigningRequestStatus `json:"status,omitempty"`
|
||||
Status CertificateSigningRequestStatus
|
||||
}
|
||||
|
||||
// This information is immutable after the request is created. Only the Request
|
||||
|
@ -44,26 +44,26 @@ type CertificateSigningRequest struct {
|
|||
// Kubernetes and cannot be modified by users.
|
||||
type CertificateSigningRequestSpec struct {
|
||||
// Base64-encoded PKCS#10 CSR data
|
||||
Request []byte `json:"request"`
|
||||
Request []byte
|
||||
|
||||
// Information about the requesting user (if relevant)
|
||||
// See user.Info interface for details
|
||||
// +optional
|
||||
Username string `json:"username,omitempty"`
|
||||
Username string
|
||||
// +optional
|
||||
UID string `json:"uid,omitempty"`
|
||||
UID string
|
||||
// +optional
|
||||
Groups []string `json:"groups,omitempty"`
|
||||
Groups []string
|
||||
}
|
||||
|
||||
type CertificateSigningRequestStatus struct {
|
||||
// Conditions applied to the request, such as approval or denial.
|
||||
// +optional
|
||||
Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"`
|
||||
Conditions []CertificateSigningRequestCondition
|
||||
|
||||
// If request was approved, the controller will place the issued certificate here.
|
||||
// +optional
|
||||
Certificate []byte `json:"certificate,omitempty"`
|
||||
Certificate []byte
|
||||
}
|
||||
|
||||
type RequestConditionType string
|
||||
|
@ -76,23 +76,23 @@ const (
|
|||
|
||||
type CertificateSigningRequestCondition struct {
|
||||
// request approval state, currently Approved or Denied.
|
||||
Type RequestConditionType `json:"type"`
|
||||
Type RequestConditionType
|
||||
// brief reason for the request state
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string
|
||||
// human readable message with details about the request state
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string
|
||||
// timestamp for the last update to this condition
|
||||
// +optional
|
||||
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
LastUpdateTime metav1.Time
|
||||
}
|
||||
|
||||
type CertificateSigningRequestList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// +optional
|
||||
Items []CertificateSigningRequest `json:"items,omitempty"`
|
||||
Items []CertificateSigningRequest
|
||||
}
|
||||
|
|
|
@ -27,64 +27,64 @@ type KubeProxyConfiguration struct {
|
|||
|
||||
// bindAddress is the IP address for the proxy server to serve on (set to 0.0.0.0
|
||||
// for all interfaces)
|
||||
BindAddress string `json:"bindAddress"`
|
||||
BindAddress string
|
||||
// clusterCIDR is the CIDR range of the pods in the cluster. It is used to
|
||||
// bridge traffic coming from outside of the cluster. If not provided,
|
||||
// no off-cluster bridging will be performed.
|
||||
ClusterCIDR string `json:"clusterCIDR"`
|
||||
ClusterCIDR string
|
||||
// healthzBindAddress is the IP address for the health check server to serve on,
|
||||
// defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
|
||||
HealthzBindAddress string `json:"healthzBindAddress"`
|
||||
HealthzBindAddress string
|
||||
// healthzPort is the port to bind the health check server. Use 0 to disable.
|
||||
HealthzPort int32 `json:"healthzPort"`
|
||||
HealthzPort int32
|
||||
// hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
|
||||
HostnameOverride string `json:"hostnameOverride"`
|
||||
HostnameOverride string
|
||||
// iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT if using
|
||||
// the pure iptables proxy mode. Values must be within the range [0, 31].
|
||||
IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
|
||||
IPTablesMasqueradeBit *int32
|
||||
// iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
|
||||
// '2h22m'). Must be greater than 0.
|
||||
IPTablesSyncPeriod metav1.Duration `json:"iptablesSyncPeriodSeconds"`
|
||||
IPTablesSyncPeriod metav1.Duration
|
||||
// iptablesMinSyncPeriod is the minimum period that iptables rules are refreshed (e.g. '5s', '1m',
|
||||
// '2h22m').
|
||||
IPTablesMinSyncPeriod metav1.Duration `json:"iptablesMinSyncPeriodSeconds"`
|
||||
IPTablesMinSyncPeriod metav1.Duration
|
||||
// kubeconfigPath is the path to the kubeconfig file with authorization information (the
|
||||
// master location is set by the master flag).
|
||||
KubeconfigPath string `json:"kubeconfigPath"`
|
||||
KubeconfigPath string
|
||||
// masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.
|
||||
MasqueradeAll bool `json:"masqueradeAll"`
|
||||
MasqueradeAll bool
|
||||
// master is the address of the Kubernetes API server (overrides any value in kubeconfig)
|
||||
Master string `json:"master"`
|
||||
Master string
|
||||
// oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
|
||||
// the range [-1000, 1000]
|
||||
OOMScoreAdj *int32 `json:"oomScoreAdj"`
|
||||
OOMScoreAdj *int32
|
||||
// mode specifies which proxy mode to use.
|
||||
Mode ProxyMode `json:"mode"`
|
||||
Mode ProxyMode
|
||||
// portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
|
||||
// in order to proxy service traffic. If unspecified (0-0) then ports will be randomly chosen.
|
||||
PortRange string `json:"portRange"`
|
||||
PortRange string
|
||||
// resourceContainer is the absolute name of the resource-only container to create and run
|
||||
// the Kube-proxy in (Default: /kube-proxy).
|
||||
ResourceContainer string `json:"resourceContainer"`
|
||||
ResourceContainer string
|
||||
// udpIdleTimeout is how long an idle UDP connection will be kept open (e.g. '250ms', '2s').
|
||||
// Must be greater than 0. Only applicable for proxyMode=userspace.
|
||||
UDPIdleTimeout metav1.Duration `json:"udpTimeoutMilliseconds"`
|
||||
UDPIdleTimeout metav1.Duration
|
||||
// conntrackMax is the maximum number of NAT connections to track (0 to
|
||||
// leave as-is). This takes precedence over conntrackMaxPerCore and conntrackMin.
|
||||
ConntrackMax int32 `json:"conntrackMax"`
|
||||
ConntrackMax int32
|
||||
// conntrackMaxPerCore is the maximum number of NAT connections to track
|
||||
// per CPU core (0 to leave the limit as-is and ignore conntrackMin).
|
||||
ConntrackMaxPerCore int32 `json:"conntrackMaxPerCore"`
|
||||
ConntrackMaxPerCore int32
|
||||
// conntrackMin is the minimum value of connect-tracking records to allocate,
|
||||
// regardless of conntrackMaxPerCore (set conntrackMaxPerCore=0 to leave the limit as-is).
|
||||
ConntrackMin int32 `json:"conntrackMin"`
|
||||
ConntrackMin int32
|
||||
// conntrackTCPEstablishedTimeout is how long an idle TCP connection will be kept open
|
||||
// (e.g. '2s'). Must be greater than 0.
|
||||
ConntrackTCPEstablishedTimeout metav1.Duration `json:"conntrackTCPEstablishedTimeout"`
|
||||
ConntrackTCPEstablishedTimeout metav1.Duration
|
||||
// conntrackTCPCloseWaitTimeout is how long an idle conntrack entry
|
||||
// in CLOSE_WAIT state will remain in the conntrack
|
||||
// table. (e.g. '60s'). Must be greater than 0 to set.
|
||||
ConntrackTCPCloseWaitTimeout metav1.Duration `json:"conntrackTCPCloseWaitTimeout"`
|
||||
ConntrackTCPCloseWaitTimeout metav1.Duration
|
||||
}
|
||||
|
||||
// Currently two modes of proxying are available: 'userspace' (older, stable) or 'iptables'
|
||||
|
@ -124,229 +124,229 @@ type KubeletConfiguration struct {
|
|||
|
||||
// podManifestPath is the path to the directory containing pod manifests to
|
||||
// run, or the path to a single manifest file
|
||||
PodManifestPath string `json:"podManifestPath"`
|
||||
PodManifestPath string
|
||||
// syncFrequency is the max period between synchronizing running
|
||||
// containers and config
|
||||
SyncFrequency metav1.Duration `json:"syncFrequency"`
|
||||
SyncFrequency metav1.Duration
|
||||
// fileCheckFrequency is the duration between checking config files for
|
||||
// new data
|
||||
FileCheckFrequency metav1.Duration `json:"fileCheckFrequency"`
|
||||
FileCheckFrequency metav1.Duration
|
||||
// httpCheckFrequency is the duration between checking http for new data
|
||||
HTTPCheckFrequency metav1.Duration `json:"httpCheckFrequency"`
|
||||
HTTPCheckFrequency metav1.Duration
|
||||
// manifestURL is the URL for accessing the container manifest
|
||||
ManifestURL string `json:"manifestURL"`
|
||||
ManifestURL string
|
||||
// manifestURLHeader is the HTTP header to use when accessing the manifest
|
||||
// URL, with the key separated from the value with a ':', as in 'key:value'
|
||||
ManifestURLHeader string `json:"manifestURLHeader"`
|
||||
ManifestURLHeader string
|
||||
// enableServer enables the Kubelet's server
|
||||
EnableServer bool `json:"enableServer"`
|
||||
EnableServer bool
|
||||
// address is the IP address for the Kubelet to serve on (set to 0.0.0.0
|
||||
// for all interfaces)
|
||||
Address string `json:"address"`
|
||||
Address string
|
||||
// port is the port for the Kubelet to serve on.
|
||||
Port int32 `json:"port"`
|
||||
Port int32
|
||||
// readOnlyPort is the read-only port for the Kubelet to serve on with
|
||||
// no authentication/authorization (set to 0 to disable)
|
||||
ReadOnlyPort int32 `json:"readOnlyPort"`
|
||||
ReadOnlyPort int32
|
||||
// tlsCertFile is the file containing x509 Certificate for HTTPS. (CA cert,
|
||||
// if any, concatenated after server cert). If tlsCertFile and
|
||||
// tlsPrivateKeyFile are not provided, a self-signed certificate
|
||||
// and key are generated for the public address and saved to the directory
|
||||
// passed to certDir.
|
||||
TLSCertFile string `json:"tlsCertFile"`
|
||||
TLSCertFile string
|
||||
// tlsPrivateKeyFile is the ile containing x509 private key matching
|
||||
// tlsCertFile.
|
||||
TLSPrivateKeyFile string `json:"tlsPrivateKeyFile"`
|
||||
TLSPrivateKeyFile string
|
||||
// certDirectory is the directory where the TLS certs are located (by
|
||||
// default /var/run/kubernetes). If tlsCertFile and tlsPrivateKeyFile
|
||||
// are provided, this flag will be ignored.
|
||||
CertDirectory string `json:"certDirectory"`
|
||||
CertDirectory string
|
||||
// authentication specifies how requests to the Kubelet's server are authenticated
|
||||
Authentication KubeletAuthentication `json:"authentication"`
|
||||
Authentication KubeletAuthentication
|
||||
// authorization specifies how requests to the Kubelet's server are authorized
|
||||
Authorization KubeletAuthorization `json:"authorization"`
|
||||
Authorization KubeletAuthorization
|
||||
// hostnameOverride is the hostname used to identify the kubelet instead
|
||||
// of the actual hostname.
|
||||
HostnameOverride string `json:"hostnameOverride"`
|
||||
HostnameOverride string
|
||||
// podInfraContainerImage is the image whose network/ipc namespaces
|
||||
// containers in each pod will use.
|
||||
PodInfraContainerImage string `json:"podInfraContainerImage"`
|
||||
PodInfraContainerImage string
|
||||
// dockerEndpoint is the path to the docker endpoint to communicate with.
|
||||
DockerEndpoint string `json:"dockerEndpoint"`
|
||||
DockerEndpoint string
|
||||
// rootDirectory is the directory path to place kubelet files (volume
|
||||
// mounts,etc).
|
||||
RootDirectory string `json:"rootDirectory"`
|
||||
RootDirectory string
|
||||
// seccompProfileRoot is the directory path for seccomp profiles.
|
||||
SeccompProfileRoot string `json:"seccompProfileRoot"`
|
||||
SeccompProfileRoot string
|
||||
// allowPrivileged enables containers to request privileged mode.
|
||||
// Defaults to false.
|
||||
AllowPrivileged bool `json:"allowPrivileged"`
|
||||
AllowPrivileged bool
|
||||
// hostNetworkSources is a comma-separated list of sources from which the
|
||||
// Kubelet allows pods to use of host network. Defaults to "*". Valid
|
||||
// options are "file", "http", "api", and "*" (all sources).
|
||||
HostNetworkSources []string `json:"hostNetworkSources"`
|
||||
HostNetworkSources []string
|
||||
// hostPIDSources is a comma-separated list of sources from which the
|
||||
// Kubelet allows pods to use the host pid namespace. Defaults to "*".
|
||||
HostPIDSources []string `json:"hostPIDSources"`
|
||||
HostPIDSources []string
|
||||
// hostIPCSources is a comma-separated list of sources from which the
|
||||
// Kubelet allows pods to use the host ipc namespace. Defaults to "*".
|
||||
HostIPCSources []string `json:"hostIPCSources"`
|
||||
HostIPCSources []string
|
||||
// registryPullQPS is the limit of registry pulls per second. If 0,
|
||||
// unlimited. Set to 0 for no limit. Defaults to 5.0.
|
||||
RegistryPullQPS int32 `json:"registryPullQPS"`
|
||||
RegistryPullQPS int32
|
||||
// registryBurst is the maximum size of a bursty pulls, temporarily allows
|
||||
// pulls to burst to this number, while still not exceeding registryQps.
|
||||
// Only used if registryQPS > 0.
|
||||
RegistryBurst int32 `json:"registryBurst"`
|
||||
RegistryBurst int32
|
||||
// eventRecordQPS is the maximum event creations per second. If 0, there
|
||||
// is no limit enforced.
|
||||
EventRecordQPS int32 `json:"eventRecordQPS"`
|
||||
EventRecordQPS int32
|
||||
// eventBurst is the maximum size of a bursty event records, temporarily
|
||||
// allows event records to burst to this number, while still not exceeding
|
||||
// event-qps. Only used if eventQps > 0
|
||||
EventBurst int32 `json:"eventBurst"`
|
||||
EventBurst int32
|
||||
// enableDebuggingHandlers enables server endpoints for log collection
|
||||
// and local running of containers and commands
|
||||
EnableDebuggingHandlers bool `json:"enableDebuggingHandlers"`
|
||||
EnableDebuggingHandlers bool
|
||||
// minimumGCAge is the minimum age for a finished container before it is
|
||||
// garbage collected.
|
||||
MinimumGCAge metav1.Duration `json:"minimumGCAge"`
|
||||
MinimumGCAge metav1.Duration
|
||||
// maxPerPodContainerCount is the maximum number of old instances to
|
||||
// retain per container. Each container takes up some disk space.
|
||||
MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"`
|
||||
MaxPerPodContainerCount int32
|
||||
// maxContainerCount is the maximum number of old instances of containers
|
||||
// to retain globally. Each container takes up some disk space.
|
||||
MaxContainerCount int32 `json:"maxContainerCount"`
|
||||
MaxContainerCount int32
|
||||
// cAdvisorPort is the port of the localhost cAdvisor endpoint
|
||||
CAdvisorPort int32 `json:"cAdvisorPort"`
|
||||
CAdvisorPort int32
|
||||
// healthzPort is the port of the localhost healthz endpoint
|
||||
HealthzPort int32 `json:"healthzPort"`
|
||||
HealthzPort int32
|
||||
// healthzBindAddress is the IP address for the healthz server to serve
|
||||
// on.
|
||||
HealthzBindAddress string `json:"healthzBindAddress"`
|
||||
HealthzBindAddress string
|
||||
// oomScoreAdj is The oom-score-adj value for kubelet process. Values
|
||||
// must be within the range [-1000, 1000].
|
||||
OOMScoreAdj int32 `json:"oomScoreAdj"`
|
||||
OOMScoreAdj int32
|
||||
// registerNode enables automatic registration with the apiserver.
|
||||
RegisterNode bool `json:"registerNode"`
|
||||
RegisterNode bool
|
||||
// clusterDomain is the DNS domain for this cluster. If set, kubelet will
|
||||
// configure all containers to search this domain in addition to the
|
||||
// host's search domains.
|
||||
ClusterDomain string `json:"clusterDomain"`
|
||||
ClusterDomain string
|
||||
// masterServiceNamespace is The namespace from which the kubernetes
|
||||
// master services should be injected into pods.
|
||||
MasterServiceNamespace string `json:"masterServiceNamespace"`
|
||||
MasterServiceNamespace string
|
||||
// clusterDNS is the IP address for a cluster DNS server. If set, kubelet
|
||||
// will configure all containers to use this for DNS resolution in
|
||||
// addition to the host's DNS servers
|
||||
ClusterDNS string `json:"clusterDNS"`
|
||||
ClusterDNS string
|
||||
// streamingConnectionIdleTimeout is the maximum time a streaming connection
|
||||
// can be idle before the connection is automatically closed.
|
||||
StreamingConnectionIdleTimeout metav1.Duration `json:"streamingConnectionIdleTimeout"`
|
||||
StreamingConnectionIdleTimeout metav1.Duration
|
||||
// nodeStatusUpdateFrequency is the frequency that kubelet posts node
|
||||
// status to master. Note: be cautious when changing the constant, it
|
||||
// must work with nodeMonitorGracePeriod in nodecontroller.
|
||||
NodeStatusUpdateFrequency metav1.Duration `json:"nodeStatusUpdateFrequency"`
|
||||
NodeStatusUpdateFrequency metav1.Duration
|
||||
// imageMinimumGCAge is the minimum age for an unused image before it is
|
||||
// garbage collected.
|
||||
ImageMinimumGCAge metav1.Duration `json:"imageMinimumGCAge"`
|
||||
ImageMinimumGCAge metav1.Duration
|
||||
// imageGCHighThresholdPercent is the percent of disk usage after which
|
||||
// image garbage collection is always run.
|
||||
ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"`
|
||||
ImageGCHighThresholdPercent int32
|
||||
// imageGCLowThresholdPercent is the percent of disk usage before which
|
||||
// image garbage collection is never run. Lowest disk usage to garbage
|
||||
// collect to.
|
||||
ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"`
|
||||
ImageGCLowThresholdPercent int32
|
||||
// lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to
|
||||
// maintain. When disk space falls below this threshold, new pods would
|
||||
// be rejected.
|
||||
LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"`
|
||||
LowDiskSpaceThresholdMB int32
|
||||
// How frequently to calculate and cache volume disk usage for all pods
|
||||
VolumeStatsAggPeriod metav1.Duration `json:"volumeStatsAggPeriod"`
|
||||
VolumeStatsAggPeriod metav1.Duration
|
||||
// networkPluginName is the name of the network plugin to be invoked for
|
||||
// various events in kubelet/pod lifecycle
|
||||
NetworkPluginName string `json:"networkPluginName"`
|
||||
NetworkPluginName string
|
||||
// networkPluginMTU is the MTU to be passed to the network plugin,
|
||||
// and overrides the default MTU for cases where it cannot be automatically
|
||||
// computed (such as IPSEC).
|
||||
NetworkPluginMTU int32 `json:"networkPluginMTU"`
|
||||
NetworkPluginMTU int32
|
||||
// networkPluginDir is the full path of the directory in which to search
|
||||
// for network plugins (and, for backwards-compat, CNI config files)
|
||||
NetworkPluginDir string `json:"networkPluginDir"`
|
||||
NetworkPluginDir string
|
||||
// CNIConfDir is the full path of the directory in which to search for
|
||||
// CNI config files
|
||||
CNIConfDir string `json:"cniConfDir"`
|
||||
CNIConfDir string
|
||||
// CNIBinDir is the full path of the directory in which to search for
|
||||
// CNI plugin binaries
|
||||
CNIBinDir string `json:"cniBinDir"`
|
||||
CNIBinDir string
|
||||
// volumePluginDir is the full path of the directory in which to search
|
||||
// for additional third party volume plugins
|
||||
VolumePluginDir string `json:"volumePluginDir"`
|
||||
VolumePluginDir string
|
||||
// cloudProvider is the provider for cloud services.
|
||||
// +optional
|
||||
CloudProvider string `json:"cloudProvider,omitempty"`
|
||||
CloudProvider string
|
||||
// cloudConfigFile is the path to the cloud provider configuration file.
|
||||
// +optional
|
||||
CloudConfigFile string `json:"cloudConfigFile,omitempty"`
|
||||
CloudConfigFile string
|
||||
// KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.
|
||||
// +optional
|
||||
KubeletCgroups string `json:"kubeletCgroups,omitempty"`
|
||||
KubeletCgroups string
|
||||
// Enable QoS based Cgroup hierarchy: top level cgroups for QoS Classes
|
||||
// And all Burstable and BestEffort pods are brought up under their
|
||||
// specific top level QoS cgroup.
|
||||
// +optional
|
||||
ExperimentalCgroupsPerQOS bool `json:"experimentalCgroupsPerQOS,omitempty"`
|
||||
ExperimentalCgroupsPerQOS bool
|
||||
// driver that the kubelet uses to manipulate cgroups on the host (cgroupfs or systemd)
|
||||
// +optional
|
||||
CgroupDriver string `json:"cgroupDriver,omitempty"`
|
||||
CgroupDriver string
|
||||
// Cgroups that container runtime is expected to be isolated in.
|
||||
// +optional
|
||||
RuntimeCgroups string `json:"runtimeCgroups,omitempty"`
|
||||
RuntimeCgroups string
|
||||
// SystemCgroups is absolute name of cgroups in which to place
|
||||
// all non-kernel processes that are not already in a container. Empty
|
||||
// for no container. Rolling back the flag requires a reboot.
|
||||
// +optional
|
||||
SystemCgroups string `json:"systemCgroups,omitempty"`
|
||||
SystemCgroups string
|
||||
// CgroupRoot is the root cgroup to use for pods.
|
||||
// If ExperimentalCgroupsPerQOS is enabled, this is the root of the QoS cgroup hierarchy.
|
||||
// +optional
|
||||
CgroupRoot string `json:"cgroupRoot,omitempty"`
|
||||
CgroupRoot string
|
||||
// containerRuntime is the container runtime to use.
|
||||
ContainerRuntime string `json:"containerRuntime"`
|
||||
ContainerRuntime string
|
||||
// remoteRuntimeEndpoint is the endpoint of remote runtime service
|
||||
RemoteRuntimeEndpoint string `json:"remoteRuntimeEndpoint"`
|
||||
RemoteRuntimeEndpoint string
|
||||
// remoteImageEndpoint is the endpoint of remote image service
|
||||
RemoteImageEndpoint string `json:"remoteImageEndpoint"`
|
||||
RemoteImageEndpoint string
|
||||
// runtimeRequestTimeout is the timeout for all runtime requests except long running
|
||||
// requests - pull, logs, exec and attach.
|
||||
// +optional
|
||||
RuntimeRequestTimeout metav1.Duration `json:"runtimeRequestTimeout,omitempty"`
|
||||
RuntimeRequestTimeout metav1.Duration
|
||||
// If no pulling progress is made before the deadline imagePullProgressDeadline,
|
||||
// the image pulling will be cancelled. Defaults to 1m0s.
|
||||
// +optional
|
||||
ImagePullProgressDeadline metav1.Duration `json:"imagePullProgressDeadline,omitempty"`
|
||||
ImagePullProgressDeadline metav1.Duration
|
||||
// rktPath is the path of rkt binary. Leave empty to use the first rkt in
|
||||
// $PATH.
|
||||
// +optional
|
||||
RktPath string `json:"rktPath,omitempty"`
|
||||
RktPath string
|
||||
// experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path
|
||||
ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
|
||||
ExperimentalMounterPath string
|
||||
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
||||
// +optional
|
||||
RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
|
||||
RktAPIEndpoint string
|
||||
// rktStage1Image is the image to use as stage1. Local paths and
|
||||
// http/https URLs are supported.
|
||||
// +optional
|
||||
RktStage1Image string `json:"rktStage1Image,omitempty"`
|
||||
RktStage1Image string
|
||||
// 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
|
||||
// that may be running.
|
||||
LockFilePath string `json:"lockFilePath"`
|
||||
LockFilePath string
|
||||
// ExitOnLockContention is a flag that signifies to the kubelet that it is running
|
||||
// in "bootstrap" mode. This requires that 'LockFilePath' has been set.
|
||||
// This will cause the kubelet to listen to inotify events on the lock file,
|
||||
// releasing it and exiting when another process tries to open that file.
|
||||
ExitOnLockContention bool `json:"exitOnLockContention"`
|
||||
ExitOnLockContention bool
|
||||
// How should the kubelet configure the container bridge for hairpin packets.
|
||||
// Setting this flag allows endpoints in a Service to loadbalance back to
|
||||
// themselves if they should try to access their own Service. Values:
|
||||
|
@ -355,134 +355,134 @@ type KubeletConfiguration struct {
|
|||
// "none": do nothing.
|
||||
// Generally, one must set --hairpin-mode=veth-flag to achieve hairpin NAT,
|
||||
// because promiscous-bridge assumes the existence of a container bridge named cbr0.
|
||||
HairpinMode string `json:"hairpinMode"`
|
||||
HairpinMode string
|
||||
// The node has babysitter process monitoring docker and kubelet.
|
||||
BabysitDaemons bool `json:"babysitDaemons"`
|
||||
BabysitDaemons bool
|
||||
// maxPods is the number of pods that can run on this Kubelet.
|
||||
MaxPods int32 `json:"maxPods"`
|
||||
MaxPods int32
|
||||
// nvidiaGPUs is the number of NVIDIA GPU devices on this node.
|
||||
NvidiaGPUs int32 `json:"nvidiaGPUs"`
|
||||
NvidiaGPUs int32
|
||||
// dockerExecHandlerName is the handler to use when executing a command
|
||||
// in a container. Valid values are 'native' and 'nsenter'. Defaults to
|
||||
// 'native'.
|
||||
DockerExecHandlerName string `json:"dockerExecHandlerName"`
|
||||
DockerExecHandlerName string
|
||||
// The CIDR to use for pod IP addresses, only used in standalone mode.
|
||||
// In cluster mode, this is obtained from the master.
|
||||
PodCIDR string `json:"podCIDR"`
|
||||
PodCIDR string
|
||||
// ResolverConfig is the resolver configuration file used as the basis
|
||||
// for the container DNS resolution configuration."), []
|
||||
ResolverConfig string `json:"resolvConf"`
|
||||
ResolverConfig string
|
||||
// cpuCFSQuota is Enable CPU CFS quota enforcement for containers that
|
||||
// specify CPU limits
|
||||
CPUCFSQuota bool `json:"cpuCFSQuota"`
|
||||
CPUCFSQuota bool
|
||||
// containerized should be set to true if kubelet is running in a container.
|
||||
Containerized bool `json:"containerized"`
|
||||
Containerized bool
|
||||
// maxOpenFiles is Number of files that can be opened by Kubelet process.
|
||||
MaxOpenFiles int64 `json:"maxOpenFiles"`
|
||||
MaxOpenFiles int64
|
||||
// reconcileCIDR is Reconcile node CIDR with the CIDR specified by the
|
||||
// API server. Won't have any effect if register-node is false.
|
||||
ReconcileCIDR bool `json:"reconcileCIDR"`
|
||||
ReconcileCIDR bool
|
||||
// registerSchedulable tells the kubelet to register the node as
|
||||
// schedulable. Won't have any effect if register-node is false.
|
||||
// DEPRECATED: use registerWithTaints instead
|
||||
RegisterSchedulable bool `json:"registerSchedulable"`
|
||||
RegisterSchedulable bool
|
||||
// registerWithTaints are an array of taints to add to a node object when
|
||||
// the kubelet registers itself. This only takes effect when registerNode
|
||||
// is true and upon the initial registration of the node.
|
||||
RegisterWithTaints []api.Taint `json:"registerWithTaints"`
|
||||
RegisterWithTaints []api.Taint
|
||||
// contentType is contentType of requests sent to apiserver.
|
||||
ContentType string `json:"contentType"`
|
||||
ContentType string
|
||||
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver
|
||||
KubeAPIQPS int32 `json:"kubeAPIQPS"`
|
||||
KubeAPIQPS int32
|
||||
// kubeAPIBurst is the burst to allow while talking with kubernetes
|
||||
// apiserver
|
||||
KubeAPIBurst int32 `json:"kubeAPIBurst"`
|
||||
KubeAPIBurst int32
|
||||
// serializeImagePulls when enabled, tells the Kubelet to pull images one
|
||||
// at a time. We recommend *not* changing the default value on nodes that
|
||||
// run docker daemon with version < 1.9 or an Aufs storage backend.
|
||||
// Issue #10959 has more details.
|
||||
SerializeImagePulls bool `json:"serializeImagePulls"`
|
||||
SerializeImagePulls bool
|
||||
// outOfDiskTransitionFrequency is duration for which the kubelet has to
|
||||
// wait before transitioning out of out-of-disk node condition status.
|
||||
// +optional
|
||||
OutOfDiskTransitionFrequency metav1.Duration `json:"outOfDiskTransitionFrequency,omitempty"`
|
||||
OutOfDiskTransitionFrequency metav1.Duration
|
||||
// nodeIP is IP address of the node. If set, kubelet will use this IP
|
||||
// address for the node.
|
||||
// +optional
|
||||
NodeIP string `json:"nodeIP,omitempty"`
|
||||
NodeIP string
|
||||
// nodeLabels to add when registering the node in the cluster.
|
||||
NodeLabels map[string]string `json:"nodeLabels"`
|
||||
NodeLabels map[string]string
|
||||
// nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.
|
||||
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
||||
NonMasqueradeCIDR string
|
||||
// enable gathering custom metrics.
|
||||
EnableCustomMetrics bool `json:"enableCustomMetrics"`
|
||||
EnableCustomMetrics bool
|
||||
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
|
||||
// +optional
|
||||
EvictionHard string `json:"evictionHard,omitempty"`
|
||||
EvictionHard string
|
||||
// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
|
||||
// +optional
|
||||
EvictionSoft string `json:"evictionSoft,omitempty"`
|
||||
EvictionSoft string
|
||||
// Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
|
||||
// +optional
|
||||
EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
|
||||
EvictionSoftGracePeriod string
|
||||
// Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.
|
||||
// +optional
|
||||
EvictionPressureTransitionPeriod metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
|
||||
EvictionPressureTransitionPeriod metav1.Duration
|
||||
// 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
|
||||
// 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
|
||||
// If enabled, the kubelet will integrate with the kernel memcg notification to determine if memory eviction thresholds are crossed rather than polling.
|
||||
// +optional
|
||||
ExperimentalKernelMemcgNotification bool `json:"experimentalKernelMemcgNotification"`
|
||||
ExperimentalKernelMemcgNotification bool
|
||||
// Maximum number of pods per core. Cannot exceed MaxPods
|
||||
PodsPerCore int32 `json:"podsPerCore"`
|
||||
PodsPerCore int32
|
||||
// enableControllerAttachDetach enables the Attach/Detach controller to
|
||||
// manage attachment/detachment of volumes scheduled to this node, and
|
||||
// disables kubelet from executing any attach/detach operations
|
||||
EnableControllerAttachDetach bool `json:"enableControllerAttachDetach"`
|
||||
EnableControllerAttachDetach bool
|
||||
// A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
|
||||
// that describe resources reserved for non-kubernetes components.
|
||||
// Currently only cpu and memory are supported. [default=none]
|
||||
// See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
|
||||
SystemReserved utilconfig.ConfigurationMap `json:"systemReserved"`
|
||||
SystemReserved utilconfig.ConfigurationMap
|
||||
// A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs
|
||||
// that describe resources reserved for kubernetes system components.
|
||||
// Currently only cpu and memory are supported. [default=none]
|
||||
// See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
|
||||
KubeReserved utilconfig.ConfigurationMap `json:"kubeReserved"`
|
||||
KubeReserved utilconfig.ConfigurationMap
|
||||
// Default behaviour for kernel tuning
|
||||
ProtectKernelDefaults bool `json:"protectKernelDefaults"`
|
||||
ProtectKernelDefaults bool
|
||||
// If true, Kubelet ensures a set of iptables rules are present on host.
|
||||
// These rules will serve as utility for various components, e.g. kube-proxy.
|
||||
// The rules will be created based on IPTablesMasqueradeBit and IPTablesDropBit.
|
||||
MakeIPTablesUtilChains bool `json:"makeIPTablesUtilChains"`
|
||||
MakeIPTablesUtilChains bool
|
||||
// iptablesMasqueradeBit is the bit of the iptables fwmark space to use for SNAT
|
||||
// Values must be within the range [0, 31].
|
||||
// Warning: Please match the value of corresponding parameter in kube-proxy
|
||||
// TODO: clean up IPTablesMasqueradeBit in kube-proxy
|
||||
IPTablesMasqueradeBit int32 `json:"iptablesMasqueradeBit"`
|
||||
IPTablesMasqueradeBit int32
|
||||
// iptablesDropBit is the bit of the iptables fwmark space to use for dropping packets. Kubelet will ensure iptables mark and drop rules.
|
||||
// Values must be within the range [0, 31]. Must be different from IPTablesMasqueradeBit
|
||||
IPTablesDropBit int32 `json:"iptablesDropBit"`
|
||||
IPTablesDropBit int32
|
||||
// Whitelist of unsafe sysctls or sysctl patterns (ending in *).
|
||||
// +optional
|
||||
AllowedUnsafeSysctls []string `json:"experimentalAllowedUnsafeSysctls,omitempty"`
|
||||
AllowedUnsafeSysctls []string
|
||||
// featureGates is a string of comma-separated key=value pairs that describe feature
|
||||
// gates for alpha/experimental features.
|
||||
FeatureGates string `json:"featureGates"`
|
||||
FeatureGates string
|
||||
// Enable Container Runtime Interface (CRI) integration.
|
||||
// +optional
|
||||
EnableCRI bool `json:"enableCRI,omitempty"`
|
||||
EnableCRI bool
|
||||
// TODO(#34726:1.8.0): Remove the opt-in for failing when swap is enabled.
|
||||
// Tells the Kubelet to fail to start if swap is enabled on the node.
|
||||
ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"`
|
||||
ExperimentalFailSwapOn bool
|
||||
// This flag, if set, enables a check prior to mount operations to verify that the required components
|
||||
// (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled
|
||||
// and fails the mount operation fails.
|
||||
ExperimentalCheckNodeCapabilitiesBeforeMount bool `json:"ExperimentalCheckNodeCapabilitiesBeforeMount,omitempty"`
|
||||
ExperimentalCheckNodeCapabilitiesBeforeMount bool
|
||||
}
|
||||
|
||||
type KubeletAuthorizationMode string
|
||||
|
@ -498,82 +498,82 @@ type KubeletAuthorization struct {
|
|||
// mode is the authorization mode to apply to requests to the kubelet server.
|
||||
// Valid values are AlwaysAllow and Webhook.
|
||||
// Webhook mode uses the SubjectAccessReview API to determine authorization.
|
||||
Mode KubeletAuthorizationMode `json:"mode"`
|
||||
Mode KubeletAuthorizationMode
|
||||
|
||||
// webhook contains settings related to Webhook authorization.
|
||||
Webhook KubeletWebhookAuthorization `json:"webhook"`
|
||||
Webhook KubeletWebhookAuthorization
|
||||
}
|
||||
|
||||
type KubeletWebhookAuthorization struct {
|
||||
// cacheAuthorizedTTL is the duration to cache 'authorized' responses from the webhook authorizer.
|
||||
CacheAuthorizedTTL metav1.Duration `json:"cacheAuthorizedTTL"`
|
||||
CacheAuthorizedTTL metav1.Duration
|
||||
// cacheUnauthorizedTTL is the duration to cache 'unauthorized' responses from the webhook authorizer.
|
||||
CacheUnauthorizedTTL metav1.Duration `json:"cacheUnauthorizedTTL"`
|
||||
CacheUnauthorizedTTL metav1.Duration
|
||||
}
|
||||
|
||||
type KubeletAuthentication struct {
|
||||
// x509 contains settings related to x509 client certificate authentication
|
||||
X509 KubeletX509Authentication `json:"x509"`
|
||||
X509 KubeletX509Authentication
|
||||
// webhook contains settings related to webhook bearer token authentication
|
||||
Webhook KubeletWebhookAuthentication `json:"webhook"`
|
||||
Webhook KubeletWebhookAuthentication
|
||||
// anonymous contains settings related to anonymous authentication
|
||||
Anonymous KubeletAnonymousAuthentication `json:"anonymous"`
|
||||
Anonymous KubeletAnonymousAuthentication
|
||||
}
|
||||
|
||||
type KubeletX509Authentication struct {
|
||||
// clientCAFile is the path to a PEM-encoded certificate bundle. If set, any request presenting a client certificate
|
||||
// signed by one of the authorities in the bundle is authenticated with a username corresponding to the CommonName,
|
||||
// and groups corresponding to the Organization in the client certificate.
|
||||
ClientCAFile string `json:"clientCAFile"`
|
||||
ClientCAFile string
|
||||
}
|
||||
|
||||
type KubeletWebhookAuthentication struct {
|
||||
// enabled allows bearer token authentication backed by the tokenreviews.authentication.k8s.io API
|
||||
Enabled bool `json:"enabled"`
|
||||
Enabled bool
|
||||
// cacheTTL enables caching of authentication results
|
||||
CacheTTL metav1.Duration `json:"cacheTTL"`
|
||||
CacheTTL metav1.Duration
|
||||
}
|
||||
|
||||
type KubeletAnonymousAuthentication struct {
|
||||
// enabled allows anonymous requests to the kubelet server.
|
||||
// Requests that are not rejected by another authentication method are treated as anonymous requests.
|
||||
// Anonymous requests have a username of system:anonymous, and a group name of system:unauthenticated.
|
||||
Enabled bool `json:"enabled"`
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
type KubeSchedulerConfiguration struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
// port is the port that the scheduler's http service runs on.
|
||||
Port int32 `json:"port"`
|
||||
Port int32
|
||||
// address is the IP address to serve on.
|
||||
Address string `json:"address"`
|
||||
Address string
|
||||
// algorithmProvider is the scheduling algorithm provider to use.
|
||||
AlgorithmProvider string `json:"algorithmProvider"`
|
||||
AlgorithmProvider string
|
||||
// policyConfigFile is the filepath to the scheduler policy configuration.
|
||||
PolicyConfigFile string `json:"policyConfigFile"`
|
||||
PolicyConfigFile string
|
||||
// enableProfiling enables profiling via web interface.
|
||||
EnableProfiling bool `json:"enableProfiling"`
|
||||
EnableProfiling bool
|
||||
// enableContentionProfiling enables lock contention profiling, if enableProfiling is true.
|
||||
EnableContentionProfiling bool `json:"enableContentionProfiling"`
|
||||
EnableContentionProfiling bool
|
||||
// contentType is contentType of requests sent to apiserver.
|
||||
ContentType string `json:"contentType"`
|
||||
ContentType string
|
||||
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
|
||||
KubeAPIQPS float32 `json:"kubeAPIQPS"`
|
||||
KubeAPIQPS float32
|
||||
// kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
|
||||
KubeAPIBurst int32 `json:"kubeAPIBurst"`
|
||||
KubeAPIBurst int32
|
||||
// schedulerName is name of the scheduler, used to select which pods
|
||||
// will be processed by this scheduler, based on pod's annotation with
|
||||
// key 'scheduler.alpha.kubernetes.io/name'.
|
||||
SchedulerName string `json:"schedulerName"`
|
||||
SchedulerName string
|
||||
// RequiredDuringScheduling affinity is not symmetric, but there is an implicit PreferredDuringScheduling affinity rule
|
||||
// corresponding to every RequiredDuringScheduling affinity rule.
|
||||
// HardPodAffinitySymmetricWeight represents the weight of implicit PreferredDuringScheduling affinity rule, in the range 0-100.
|
||||
HardPodAffinitySymmetricWeight int `json:"hardPodAffinitySymmetricWeight"`
|
||||
HardPodAffinitySymmetricWeight int
|
||||
// Indicate the "all topologies" set for empty topologyKey when it's used for PreferredDuringScheduling pod anti-affinity.
|
||||
FailureDomains string `json:"failureDomains"`
|
||||
FailureDomains string
|
||||
// leaderElection defines the configuration of leader election client.
|
||||
LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
|
||||
LeaderElection LeaderElectionConfiguration
|
||||
}
|
||||
|
||||
// LeaderElectionConfiguration defines the configuration of leader election
|
||||
|
@ -582,199 +582,199 @@ type LeaderElectionConfiguration struct {
|
|||
// leaderElect enables a leader election client to gain leadership
|
||||
// before executing the main loop. Enable this when running replicated
|
||||
// components for high availability.
|
||||
LeaderElect bool `json:"leaderElect"`
|
||||
LeaderElect bool
|
||||
// leaseDuration is the duration that non-leader candidates will wait
|
||||
// after observing a leadership renewal until attempting to acquire
|
||||
// leadership of a led but unrenewed leader slot. This is effectively the
|
||||
// maximum duration that a leader can be stopped before it is replaced
|
||||
// by another candidate. This is only applicable if leader election is
|
||||
// enabled.
|
||||
LeaseDuration metav1.Duration `json:"leaseDuration"`
|
||||
LeaseDuration metav1.Duration
|
||||
// renewDeadline is the interval between attempts by the acting master to
|
||||
// renew a leadership slot before it stops leading. This must be less
|
||||
// than or equal to the lease duration. This is only applicable if leader
|
||||
// election is enabled.
|
||||
RenewDeadline metav1.Duration `json:"renewDeadline"`
|
||||
RenewDeadline metav1.Duration
|
||||
// retryPeriod is the duration the clients should wait between attempting
|
||||
// acquisition and renewal of a leadership. This is only applicable if
|
||||
// leader election is enabled.
|
||||
RetryPeriod metav1.Duration `json:"retryPeriod"`
|
||||
RetryPeriod metav1.Duration
|
||||
}
|
||||
|
||||
type KubeControllerManagerConfiguration struct {
|
||||
metav1.TypeMeta
|
||||
|
||||
// port is the port that the controller-manager's http service runs on.
|
||||
Port int32 `json:"port"`
|
||||
Port int32
|
||||
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
|
||||
Address string `json:"address"`
|
||||
Address string
|
||||
// useServiceAccountCredentials indicates whether controllers should be run with
|
||||
// individual service account credentials.
|
||||
UseServiceAccountCredentials bool `json:"useServiceAccountCredentials"`
|
||||
UseServiceAccountCredentials bool
|
||||
// cloudProvider is the provider for cloud services.
|
||||
CloudProvider string `json:"cloudProvider"`
|
||||
CloudProvider string
|
||||
// cloudConfigFile is the path to the cloud provider configuration file.
|
||||
CloudConfigFile string `json:"cloudConfigFile"`
|
||||
CloudConfigFile string
|
||||
// concurrentEndpointSyncs is the number of endpoint syncing operations
|
||||
// that will be done concurrently. Larger number = faster endpoint updating,
|
||||
// but more CPU (and network) load.
|
||||
ConcurrentEndpointSyncs int32 `json:"concurrentEndpointSyncs"`
|
||||
ConcurrentEndpointSyncs int32
|
||||
// concurrentRSSyncs is the number of replica sets that are allowed to sync
|
||||
// concurrently. Larger number = more responsive replica management, but more
|
||||
// CPU (and network) load.
|
||||
ConcurrentRSSyncs int32 `json:"concurrentRSSyncs"`
|
||||
ConcurrentRSSyncs int32
|
||||
// concurrentRCSyncs is the number of replication controllers that are
|
||||
// allowed to sync concurrently. Larger number = more responsive replica
|
||||
// management, but more CPU (and network) load.
|
||||
ConcurrentRCSyncs int32 `json:"concurrentRCSyncs"`
|
||||
ConcurrentRCSyncs int32
|
||||
// concurrentServiceSyncs is the number of services that are
|
||||
// allowed to sync concurrently. Larger number = more responsive service
|
||||
// management, but more CPU (and network) load.
|
||||
ConcurrentServiceSyncs int32 `json:"concurrentServiceSyncs"`
|
||||
ConcurrentServiceSyncs int32
|
||||
// concurrentResourceQuotaSyncs is the number of resource quotas that are
|
||||
// allowed to sync concurrently. Larger number = more responsive quota
|
||||
// management, but more CPU (and network) load.
|
||||
ConcurrentResourceQuotaSyncs int32 `json:"concurrentResourceQuotaSyncs"`
|
||||
ConcurrentResourceQuotaSyncs int32
|
||||
// concurrentDeploymentSyncs is the number of deployment objects that are
|
||||
// allowed to sync concurrently. Larger number = more responsive deployments,
|
||||
// but more CPU (and network) load.
|
||||
ConcurrentDeploymentSyncs int32 `json:"concurrentDeploymentSyncs"`
|
||||
ConcurrentDeploymentSyncs int32
|
||||
// concurrentDaemonSetSyncs is the number of daemonset objects that are
|
||||
// allowed to sync concurrently. Larger number = more responsive daemonset,
|
||||
// but more CPU (and network) load.
|
||||
ConcurrentDaemonSetSyncs int32 `json:"concurrentDaemonSetSyncs"`
|
||||
ConcurrentDaemonSetSyncs int32
|
||||
// concurrentJobSyncs is the number of job objects that are
|
||||
// allowed to sync concurrently. Larger number = more responsive jobs,
|
||||
// but more CPU (and network) load.
|
||||
ConcurrentJobSyncs int32 `json:"concurrentJobSyncs"`
|
||||
ConcurrentJobSyncs int32
|
||||
// concurrentNamespaceSyncs is the number of namespace objects that are
|
||||
// allowed to sync concurrently.
|
||||
ConcurrentNamespaceSyncs int32 `json:"concurrentNamespaceSyncs"`
|
||||
ConcurrentNamespaceSyncs int32
|
||||
// concurrentSATokenSyncs is the number of service account token syncing operations
|
||||
// that will be done concurrently.
|
||||
ConcurrentSATokenSyncs int32 `json:"concurrentSATokenSyncs"`
|
||||
ConcurrentSATokenSyncs int32
|
||||
// lookupCacheSizeForRC is the size of lookup cache for replication controllers.
|
||||
// Larger number = more responsive replica management, but more MEM load.
|
||||
LookupCacheSizeForRC int32 `json:"lookupCacheSizeForRC"`
|
||||
LookupCacheSizeForRC int32
|
||||
// lookupCacheSizeForRS is the size of lookup cache for replicatsets.
|
||||
// Larger number = more responsive replica management, but more MEM load.
|
||||
LookupCacheSizeForRS int32 `json:"lookupCacheSizeForRS"`
|
||||
LookupCacheSizeForRS int32
|
||||
// lookupCacheSizeForDaemonSet is the size of lookup cache for daemonsets.
|
||||
// Larger number = more responsive daemonset, but more MEM load.
|
||||
LookupCacheSizeForDaemonSet int32 `json:"lookupCacheSizeForDaemonSet"`
|
||||
LookupCacheSizeForDaemonSet int32
|
||||
// serviceSyncPeriod is the period for syncing services with their external
|
||||
// load balancers.
|
||||
ServiceSyncPeriod metav1.Duration `json:"serviceSyncPeriod"`
|
||||
ServiceSyncPeriod metav1.Duration
|
||||
// nodeSyncPeriod is the period for syncing nodes from cloudprovider. Longer
|
||||
// periods will result in fewer calls to cloud provider, but may delay addition
|
||||
// of new nodes to cluster.
|
||||
NodeSyncPeriod metav1.Duration `json:"nodeSyncPeriod"`
|
||||
NodeSyncPeriod metav1.Duration
|
||||
// routeReconciliationPeriod is the period for reconciling routes created for Nodes by cloud provider..
|
||||
RouteReconciliationPeriod metav1.Duration `json:"routeReconciliationPeriod"`
|
||||
RouteReconciliationPeriod metav1.Duration
|
||||
// resourceQuotaSyncPeriod is the period for syncing quota usage status
|
||||
// in the system.
|
||||
ResourceQuotaSyncPeriod metav1.Duration `json:"resourceQuotaSyncPeriod"`
|
||||
ResourceQuotaSyncPeriod metav1.Duration
|
||||
// namespaceSyncPeriod is the period for syncing namespace life-cycle
|
||||
// updates.
|
||||
NamespaceSyncPeriod metav1.Duration `json:"namespaceSyncPeriod"`
|
||||
NamespaceSyncPeriod metav1.Duration
|
||||
// pvClaimBinderSyncPeriod is the period for syncing persistent volumes
|
||||
// and persistent volume claims.
|
||||
PVClaimBinderSyncPeriod metav1.Duration `json:"pvClaimBinderSyncPeriod"`
|
||||
PVClaimBinderSyncPeriod metav1.Duration
|
||||
// minResyncPeriod is the resync period in reflectors; will be random between
|
||||
// minResyncPeriod and 2*minResyncPeriod.
|
||||
MinResyncPeriod metav1.Duration `json:"minResyncPeriod"`
|
||||
MinResyncPeriod metav1.Duration
|
||||
// terminatedPodGCThreshold is the number of terminated pods that can exist
|
||||
// before the terminated pod garbage collector starts deleting terminated pods.
|
||||
// If <= 0, the terminated pod garbage collector is disabled.
|
||||
TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"`
|
||||
TerminatedPodGCThreshold int32
|
||||
// horizontalPodAutoscalerSyncPeriod is the period for syncing the number of
|
||||
// pods in horizontal pod autoscaler.
|
||||
HorizontalPodAutoscalerSyncPeriod metav1.Duration `json:"horizontalPodAutoscalerSyncPeriod"`
|
||||
HorizontalPodAutoscalerSyncPeriod metav1.Duration
|
||||
// deploymentControllerSyncPeriod is the period for syncing the deployments.
|
||||
DeploymentControllerSyncPeriod metav1.Duration `json:"deploymentControllerSyncPeriod"`
|
||||
DeploymentControllerSyncPeriod metav1.Duration
|
||||
// podEvictionTimeout is the grace period for deleting pods on failed nodes.
|
||||
PodEvictionTimeout metav1.Duration `json:"podEvictionTimeout"`
|
||||
PodEvictionTimeout metav1.Duration
|
||||
// DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in
|
||||
// case of node failure.
|
||||
DeletingPodsQps float32 `json:"deletingPodsQps"`
|
||||
DeletingPodsQps float32
|
||||
// DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in
|
||||
// case of node failure. For more details look into RateLimiter.
|
||||
DeletingPodsBurst int32 `json:"deletingPodsBurst"`
|
||||
DeletingPodsBurst int32
|
||||
// nodeMontiorGracePeriod is the amount of time which we allow a running node to be
|
||||
// unresponsive before marking it unhealthy. Must be N times more than kubelet's
|
||||
// nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet
|
||||
// to post node status.
|
||||
NodeMonitorGracePeriod metav1.Duration `json:"nodeMonitorGracePeriod"`
|
||||
NodeMonitorGracePeriod metav1.Duration
|
||||
// registerRetryCount is the number of retries for initial node registration.
|
||||
// Retry interval equals node-sync-period.
|
||||
RegisterRetryCount int32 `json:"registerRetryCount"`
|
||||
RegisterRetryCount int32
|
||||
// nodeStartupGracePeriod is the amount of time which we allow starting a node to
|
||||
// be unresponsive before marking it unhealthy.
|
||||
NodeStartupGracePeriod metav1.Duration `json:"nodeStartupGracePeriod"`
|
||||
NodeStartupGracePeriod metav1.Duration
|
||||
// nodeMonitorPeriod is the period for syncing NodeStatus in NodeController.
|
||||
NodeMonitorPeriod metav1.Duration `json:"nodeMonitorPeriod"`
|
||||
NodeMonitorPeriod metav1.Duration
|
||||
// serviceAccountKeyFile is the filename containing a PEM-encoded private RSA key
|
||||
// used to sign service account tokens.
|
||||
ServiceAccountKeyFile string `json:"serviceAccountKeyFile"`
|
||||
ServiceAccountKeyFile string
|
||||
// clusterSigningCertFile is the filename containing a PEM-encoded
|
||||
// X509 CA certificate used to issue cluster-scoped certificates
|
||||
ClusterSigningCertFile string `json:"clusterSigningCertFile"`
|
||||
ClusterSigningCertFile string
|
||||
// clusterSigningCertFile is the filename containing a PEM-encoded
|
||||
// RSA or ECDSA private key used to issue cluster-scoped certificates
|
||||
ClusterSigningKeyFile string `json:"clusterSigningKeyFile"`
|
||||
ClusterSigningKeyFile string
|
||||
// approveAllKubeletCSRs tells the CSR controller to approve all CSRs originating
|
||||
// from the kubelet bootstrapping group automatically.
|
||||
// WARNING: this grants all users with access to the certificates API group
|
||||
// the ability to create credentials for any user that has access to the boostrapping
|
||||
// user's credentials.
|
||||
ApproveAllKubeletCSRsForGroup string `json:"approveAllKubeletCSRsForGroup"`
|
||||
ApproveAllKubeletCSRsForGroup string
|
||||
// enableProfiling enables profiling via web interface host:port/debug/pprof/
|
||||
EnableProfiling bool `json:"enableProfiling"`
|
||||
EnableProfiling bool
|
||||
// clusterName is the instance prefix for the cluster.
|
||||
ClusterName string `json:"clusterName"`
|
||||
ClusterName string
|
||||
// clusterCIDR is CIDR Range for Pods in cluster.
|
||||
ClusterCIDR string `json:"clusterCIDR"`
|
||||
ClusterCIDR string
|
||||
// serviceCIDR is CIDR Range for Services in cluster.
|
||||
ServiceCIDR string `json:"serviceCIDR"`
|
||||
ServiceCIDR string
|
||||
// NodeCIDRMaskSize is the mask size for node cidr in cluster.
|
||||
NodeCIDRMaskSize int32 `json:"nodeCIDRMaskSize"`
|
||||
NodeCIDRMaskSize int32
|
||||
// allocateNodeCIDRs enables CIDRs for Pods to be allocated and, if
|
||||
// ConfigureCloudRoutes is true, to be set on the cloud provider.
|
||||
AllocateNodeCIDRs bool `json:"allocateNodeCIDRs"`
|
||||
AllocateNodeCIDRs bool
|
||||
// configureCloudRoutes enables CIDRs allocated with allocateNodeCIDRs
|
||||
// to be configured on the cloud provider.
|
||||
ConfigureCloudRoutes bool `json:"configureCloudRoutes"`
|
||||
ConfigureCloudRoutes bool
|
||||
// rootCAFile is the root certificate authority will be included in service
|
||||
// account's token secret. This must be a valid PEM-encoded CA bundle.
|
||||
RootCAFile string `json:"rootCAFile"`
|
||||
RootCAFile string
|
||||
// contentType is contentType of requests sent to apiserver.
|
||||
ContentType string `json:"contentType"`
|
||||
ContentType string
|
||||
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
|
||||
KubeAPIQPS float32 `json:"kubeAPIQPS"`
|
||||
KubeAPIQPS float32
|
||||
// kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
|
||||
KubeAPIBurst int32 `json:"kubeAPIBurst"`
|
||||
KubeAPIBurst int32
|
||||
// leaderElection defines the configuration of leader election client.
|
||||
LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
|
||||
LeaderElection LeaderElectionConfiguration
|
||||
// volumeConfiguration holds configuration for volume related features.
|
||||
VolumeConfiguration VolumeConfiguration `json:"volumeConfiguration"`
|
||||
VolumeConfiguration VolumeConfiguration
|
||||
// How long to wait between starting controller managers
|
||||
ControllerStartInterval metav1.Duration `json:"controllerStartInterval"`
|
||||
ControllerStartInterval metav1.Duration
|
||||
// enables the generic garbage collector. MUST be synced with the
|
||||
// corresponding flag of the kube-apiserver. WARNING: the generic garbage
|
||||
// collector is an alpha feature.
|
||||
EnableGarbageCollector bool `json:"enableGarbageCollector"`
|
||||
EnableGarbageCollector bool
|
||||
// concurrentGCSyncs is the number of garbage collector workers that are
|
||||
// allowed to sync concurrently.
|
||||
ConcurrentGCSyncs int32 `json:"concurrentGCSyncs"`
|
||||
ConcurrentGCSyncs int32
|
||||
// nodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is healthy
|
||||
NodeEvictionRate float32 `json:"nodeEvictionRate"`
|
||||
NodeEvictionRate float32
|
||||
// secondaryNodeEvictionRate is the number of nodes per second on which pods are deleted in case of node failure when a zone is unhealty
|
||||
SecondaryNodeEvictionRate float32 `json:"secondaryNodeEvictionRate"`
|
||||
SecondaryNodeEvictionRate float32
|
||||
// secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold
|
||||
LargeClusterSizeThreshold int32 `json:"largeClusterSizeThreshold"`
|
||||
LargeClusterSizeThreshold int32
|
||||
// Zone is treated as unhealthy in nodeEvictionRate and secondaryNodeEvictionRate when at least
|
||||
// unhealthyZoneThreshold (no less than 3) of Nodes in the zone are NotReady
|
||||
UnhealthyZoneThreshold float32 `json:"unhealthyZoneThreshold"`
|
||||
UnhealthyZoneThreshold float32
|
||||
}
|
||||
|
||||
// VolumeConfiguration contains *all* enumerated flags meant to configure all volume
|
||||
|
@ -787,40 +787,40 @@ type VolumeConfiguration struct {
|
|||
// cloud provider. This allows testing and development of provisioning features. HostPath
|
||||
// provisioning is not supported in any way, won't work in a multi-node cluster, and
|
||||
// should not be used for anything other than testing or development.
|
||||
EnableHostPathProvisioning bool `json:"enableHostPathProvisioning"`
|
||||
EnableHostPathProvisioning bool
|
||||
// enableDynamicProvisioning enables the provisioning of volumes when running within an environment
|
||||
// that supports dynamic provisioning. Defaults to true.
|
||||
EnableDynamicProvisioning bool `json:"enableDynamicProvisioning"`
|
||||
EnableDynamicProvisioning bool
|
||||
// persistentVolumeRecyclerConfiguration holds configuration for persistent volume plugins.
|
||||
PersistentVolumeRecyclerConfiguration PersistentVolumeRecyclerConfiguration `json:"persitentVolumeRecyclerConfiguration"`
|
||||
PersistentVolumeRecyclerConfiguration PersistentVolumeRecyclerConfiguration
|
||||
// volumePluginDir is the full path of the directory in which the flex
|
||||
// volume plugin should search for additional third party volume plugins
|
||||
FlexVolumePluginDir string `json:"flexVolumePluginDir"`
|
||||
FlexVolumePluginDir string
|
||||
}
|
||||
|
||||
type PersistentVolumeRecyclerConfiguration struct {
|
||||
// maximumRetry is number of retries the PV recycler will execute on failure to recycle
|
||||
// PV.
|
||||
MaximumRetry int32 `json:"maximumRetry"`
|
||||
MaximumRetry int32
|
||||
// minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler
|
||||
// pod.
|
||||
MinimumTimeoutNFS int32 `json:"minimumTimeoutNFS"`
|
||||
MinimumTimeoutNFS int32
|
||||
// podTemplateFilePathNFS is the file path to a pod definition used as a template for
|
||||
// NFS persistent volume recycling
|
||||
PodTemplateFilePathNFS string `json:"podTemplateFilePathNFS"`
|
||||
PodTemplateFilePathNFS string
|
||||
// incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds
|
||||
// for an NFS scrubber pod.
|
||||
IncrementTimeoutNFS int32 `json:"incrementTimeoutNFS"`
|
||||
IncrementTimeoutNFS int32
|
||||
// podTemplateFilePathHostPath is the file path to a pod definition used as a template for
|
||||
// HostPath persistent volume recycling. This is for development and testing only and
|
||||
// will not work in a multi-node cluster.
|
||||
PodTemplateFilePathHostPath string `json:"podTemplateFilePathHostPath"`
|
||||
PodTemplateFilePathHostPath string
|
||||
// minimumTimeoutHostPath is the minimum ActiveDeadlineSeconds to use for a HostPath
|
||||
// Recycler pod. This is for development and testing only and will not work in a multi-node
|
||||
// cluster.
|
||||
MinimumTimeoutHostPath int32 `json:"minimumTimeoutHostPath"`
|
||||
MinimumTimeoutHostPath int32
|
||||
// incrementTimeoutHostPath is the increment of time added per Gi to ActiveDeadlineSeconds
|
||||
// for a HostPath scrubber pod. This is for development and testing only and will not work
|
||||
// in a multi-node cluster.
|
||||
IncrementTimeoutHostPath int32 `json:"incrementTimeoutHostPath"`
|
||||
IncrementTimeoutHostPath int32
|
||||
}
|
||||
|
|
|
@ -46,18 +46,18 @@ const (
|
|||
type ScaleSpec struct {
|
||||
// desired number of instances for the scaled object.
|
||||
// +optional
|
||||
Replicas int32 `json:"replicas,omitempty"`
|
||||
Replicas int32
|
||||
}
|
||||
|
||||
// represents the current status of a scale subresource.
|
||||
type ScaleStatus struct {
|
||||
// actual number of observed instances of the scaled object.
|
||||
Replicas int32 `json:"replicas"`
|
||||
Replicas int32
|
||||
|
||||
// label query over pods that should match the replicas count.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -65,46 +65,46 @@ type ScaleStatus struct {
|
|||
|
||||
// represents a scaling request for a resource.
|
||||
type Scale struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// 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
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// Dummy definition
|
||||
type ReplicationControllerDummy struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
}
|
||||
|
||||
// Alpha-level support for Custom Metrics in HPA (as annotations).
|
||||
type CustomMetricTarget struct {
|
||||
// Custom Metric name.
|
||||
Name string `json:"name"`
|
||||
Name string
|
||||
// Custom Metric value (average).
|
||||
TargetValue resource.Quantity `json:"value"`
|
||||
TargetValue resource.Quantity
|
||||
}
|
||||
|
||||
type CustomMetricTargetList struct {
|
||||
Items []CustomMetricTarget `json:"items"`
|
||||
Items []CustomMetricTarget
|
||||
}
|
||||
|
||||
type CustomMetricCurrentStatus struct {
|
||||
// Custom Metric name.
|
||||
Name string `json:"name"`
|
||||
Name string
|
||||
// Custom Metric value (average).
|
||||
CurrentValue resource.Quantity `json:"value"`
|
||||
CurrentValue resource.Quantity
|
||||
}
|
||||
|
||||
type CustomMetricCurrentStatusList struct {
|
||||
Items []CustomMetricCurrentStatus `json:"items"`
|
||||
Items []CustomMetricCurrentStatus
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -113,103 +113,103 @@ type CustomMetricCurrentStatusList struct {
|
|||
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
|
||||
// types to the API. It consists of one or more Versions of the api.
|
||||
type ThirdPartyResource struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
|
||||
// Standard object metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Description is the description of this object.
|
||||
// +optional
|
||||
Description string `json:"description,omitempty"`
|
||||
Description string
|
||||
|
||||
// Versions are versions for this third party object
|
||||
Versions []APIVersion `json:"versions,omitempty"`
|
||||
Versions []APIVersion
|
||||
}
|
||||
|
||||
type ThirdPartyResourceList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
|
||||
// Standard list metadata.
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of horizontal pod autoscalers.
|
||||
Items []ThirdPartyResource `json:"items"`
|
||||
Items []ThirdPartyResource
|
||||
}
|
||||
|
||||
// An APIVersion represents a single concrete version of an object model.
|
||||
// TODO: we should consider merge this struct with GroupVersion in metav1.go
|
||||
type APIVersion struct {
|
||||
// Name of this version (e.g. 'v1').
|
||||
Name string `json:"name,omitempty"`
|
||||
Name string
|
||||
}
|
||||
|
||||
// An internal object, used for versioned storage in etcd. Not exposed to the end user.
|
||||
type ThirdPartyResourceData struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object metadata.
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Data is the raw JSON data for this data.
|
||||
// +optional
|
||||
Data []byte `json:"data,omitempty"`
|
||||
Data []byte
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
type Deployment struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Specification of the desired behavior of the Deployment.
|
||||
// +optional
|
||||
Spec DeploymentSpec `json:"spec,omitempty"`
|
||||
Spec DeploymentSpec
|
||||
|
||||
// Most recently observed status of the Deployment.
|
||||
// +optional
|
||||
Status DeploymentStatus `json:"status,omitempty"`
|
||||
Status DeploymentStatus
|
||||
}
|
||||
|
||||
type DeploymentSpec struct {
|
||||
// Number of desired pods. This is a pointer to distinguish between explicit
|
||||
// zero and not specified. Defaults to 1.
|
||||
// +optional
|
||||
Replicas int32 `json:"replicas,omitempty"`
|
||||
Replicas int32
|
||||
|
||||
// Label selector for pods. Existing ReplicaSets whose pods are
|
||||
// selected by this will be the ones affected by this deployment.
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// Template describes the pods that will be created.
|
||||
Template api.PodTemplateSpec `json:"template"`
|
||||
Template api.PodTemplateSpec
|
||||
|
||||
// The deployment strategy to use to replace existing pods with new ones.
|
||||
// +optional
|
||||
Strategy DeploymentStrategy `json:"strategy,omitempty"`
|
||||
Strategy DeploymentStrategy
|
||||
|
||||
// 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.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
||||
MinReadySeconds int32
|
||||
|
||||
// The number of old ReplicaSets to retain to allow rollback.
|
||||
// This is a pointer to distinguish between explicit zero and not specified.
|
||||
// +optional
|
||||
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
|
||||
RevisionHistoryLimit *int32
|
||||
|
||||
// Indicates that the deployment is paused and will not be processed by the
|
||||
// deployment controller.
|
||||
// +optional
|
||||
Paused bool `json:"paused,omitempty"`
|
||||
Paused bool
|
||||
|
||||
// The config this deployment is rolling back to. Will be cleared after rollback is done.
|
||||
// +optional
|
||||
RollbackTo *RollbackConfig `json:"rollbackTo,omitempty"`
|
||||
RollbackTo *RollbackConfig
|
||||
|
||||
// The maximum time in seconds for a deployment to make progress before it
|
||||
// is considered to be failed. The deployment controller will continue to
|
||||
|
@ -218,25 +218,25 @@ type DeploymentSpec struct {
|
|||
// implemented, the deployment controller will automatically rollback failed
|
||||
// deployments. Note that progress will not be estimated during the time a
|
||||
// deployment is paused. This is not set by default.
|
||||
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"`
|
||||
ProgressDeadlineSeconds *int32
|
||||
}
|
||||
|
||||
// DeploymentRollback stores the information required to rollback a deployment.
|
||||
type DeploymentRollback struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Required: This must match the Name of a deployment.
|
||||
Name string `json:"name"`
|
||||
Name string
|
||||
// The annotations to be updated to a deployment
|
||||
// +optional
|
||||
UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty"`
|
||||
UpdatedAnnotations map[string]string
|
||||
// The config of this deployment rollback.
|
||||
RollbackTo RollbackConfig `json:"rollbackTo"`
|
||||
RollbackTo RollbackConfig
|
||||
}
|
||||
|
||||
type RollbackConfig struct {
|
||||
// The revision to rollback to. If set to 0, rollbck to the last revision.
|
||||
// +optional
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
Revision int64
|
||||
}
|
||||
|
||||
const (
|
||||
|
@ -249,7 +249,7 @@ const (
|
|||
type DeploymentStrategy struct {
|
||||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
|
||||
// +optional
|
||||
Type DeploymentStrategyType `json:"type,omitempty"`
|
||||
Type DeploymentStrategyType
|
||||
|
||||
// Rolling update config params. Present only if DeploymentStrategyType =
|
||||
// RollingUpdate.
|
||||
|
@ -257,7 +257,7 @@ type DeploymentStrategy struct {
|
|||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||
// to be.
|
||||
// +optional
|
||||
RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
|
||||
RollingUpdate *RollingUpdateDeployment
|
||||
}
|
||||
|
||||
type DeploymentStrategyType string
|
||||
|
@ -283,7 +283,7 @@ type RollingUpdateDeployment struct {
|
|||
// that at least 70% of original number of pods are available at all times
|
||||
// during the update.
|
||||
// +optional
|
||||
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||
MaxUnavailable intstr.IntOrString
|
||||
|
||||
// The maximum number of pods that can be scheduled above the original number of
|
||||
// pods.
|
||||
|
@ -296,32 +296,32 @@ type RollingUpdateDeployment struct {
|
|||
// 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.
|
||||
// +optional
|
||||
MaxSurge intstr.IntOrString `json:"maxSurge,omitempty"`
|
||||
MaxSurge intstr.IntOrString
|
||||
}
|
||||
|
||||
type DeploymentStatus struct {
|
||||
// The generation observed by the deployment controller.
|
||||
// +optional
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
ObservedGeneration int64
|
||||
|
||||
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
|
||||
// +optional
|
||||
Replicas int32 `json:"replicas,omitempty"`
|
||||
Replicas int32
|
||||
|
||||
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
|
||||
// +optional
|
||||
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
|
||||
UpdatedReplicas int32
|
||||
|
||||
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
|
||||
// +optional
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
||||
AvailableReplicas int32
|
||||
|
||||
// Total number of unavailable pods targeted by this deployment.
|
||||
// +optional
|
||||
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
|
||||
UnavailableReplicas int32
|
||||
|
||||
// Represents the latest available observations of a deployment's current state.
|
||||
Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||
Conditions []DeploymentCondition
|
||||
}
|
||||
|
||||
type DeploymentConditionType string
|
||||
|
@ -344,26 +344,26 @@ const (
|
|||
// DeploymentCondition describes the state of a deployment at a certain point.
|
||||
type DeploymentCondition struct {
|
||||
// Type of deployment condition.
|
||||
Type DeploymentConditionType `json:"type"`
|
||||
Type DeploymentConditionType
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status api.ConditionStatus `json:"status"`
|
||||
Status api.ConditionStatus
|
||||
// The last time this condition was updated.
|
||||
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
LastUpdateTime metav1.Time
|
||||
// Last time the condition transitioned from one status to another.
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
LastTransitionTime metav1.Time
|
||||
// The reason for the condition's last transition.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string
|
||||
// A human readable message indicating details about the transition.
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string
|
||||
}
|
||||
|
||||
type DeploymentList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of deployments.
|
||||
Items []Deployment `json:"items"`
|
||||
Items []Deployment
|
||||
}
|
||||
|
||||
// TODO(madhusudancs): Uncomment while implementing DaemonSet updates.
|
||||
|
@ -371,7 +371,7 @@ type DeploymentList struct {
|
|||
type DaemonSetUpdateStrategy struct {
|
||||
// Type of daemon set update. Only "RollingUpdate" is supported at this time. Default is RollingUpdate.
|
||||
// +optional
|
||||
Type DaemonSetUpdateStrategyType `json:"type,omitempty"`
|
||||
Type DaemonSetUpdateStrategyType
|
||||
|
||||
// Rolling update config params. Present only if DaemonSetUpdateStrategy =
|
||||
// RollingUpdate.
|
||||
|
@ -379,7 +379,7 @@ type DaemonSetUpdateStrategy struct {
|
|||
// TODO: Update this to follow our convention for oneOf, whatever we decide it
|
||||
// to be. Same as DeploymentStrategy.RollingUpdate.
|
||||
// +optional
|
||||
RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty"`
|
||||
RollingUpdate *RollingUpdateDaemonSet
|
||||
}
|
||||
|
||||
type DaemonSetUpdateStrategyType string
|
||||
|
@ -405,14 +405,14 @@ type RollingUpdateDaemonSet struct {
|
|||
// 70% of original number of DaemonSet pods are available at all times
|
||||
// during the update.
|
||||
// +optional
|
||||
MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty"`
|
||||
MaxUnavailable intstr.IntOrString
|
||||
|
||||
// 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
|
||||
// available. Defaults to 0 (pod will be considered available as soon as it
|
||||
// is ready).
|
||||
// +optional
|
||||
MinReadySeconds int `json:"minReadySeconds,omitempty"`
|
||||
MinReadySeconds int
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -423,20 +423,20 @@ type DaemonSetSpec struct {
|
|||
// If empty, defaulted to labels on Pod template.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// Template is the object that describes the pod that will be created.
|
||||
// The DaemonSet will create exactly one copy of this pod on every node
|
||||
// that matches the template's node selector (or on every node if no node
|
||||
// selector is specified).
|
||||
// More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template
|
||||
Template api.PodTemplateSpec `json:"template"`
|
||||
Template api.PodTemplateSpec
|
||||
|
||||
// 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.
|
||||
// Update strategy to replace existing DaemonSet pods with new pods.
|
||||
// +optional
|
||||
UpdateStrategy DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
|
||||
UpdateStrategy DaemonSetUpdateStrategy
|
||||
|
||||
// Label key that is added to DaemonSet pods to distinguish between old and
|
||||
// new pod templates during DaemonSet update.
|
||||
|
@ -446,7 +446,7 @@ type DaemonSetSpec struct {
|
|||
// Value of this key is hash of DaemonSetSpec.PodTemplateSpec.
|
||||
// No label is added if this is set to empty string.
|
||||
// +optional
|
||||
UniqueLabelKey string `json:"uniqueLabelKey,omitempty"`
|
||||
UniqueLabelKey string
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -461,35 +461,35 @@ const (
|
|||
type DaemonSetStatus struct {
|
||||
// CurrentNumberScheduled is the number of nodes that are running at least 1
|
||||
// daemon pod and are supposed to run the daemon pod.
|
||||
CurrentNumberScheduled int32 `json:"currentNumberScheduled"`
|
||||
CurrentNumberScheduled int32
|
||||
|
||||
// NumberMisscheduled is the number of nodes that are running the daemon pod, but are
|
||||
// not supposed to run the daemon pod.
|
||||
NumberMisscheduled int32 `json:"numberMisscheduled"`
|
||||
NumberMisscheduled int32
|
||||
|
||||
// DesiredNumberScheduled is the total number of nodes that should be running the daemon
|
||||
// pod (including nodes correctly running the daemon pod).
|
||||
DesiredNumberScheduled int32 `json:"desiredNumberScheduled"`
|
||||
DesiredNumberScheduled int32
|
||||
|
||||
// NumberReady is the number of nodes that should be running the daemon pod and have one
|
||||
// or more of the daemon pod running and ready.
|
||||
NumberReady int32 `json:"numberReady"`
|
||||
NumberReady int32
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// DaemonSet represents the configuration of a daemon set.
|
||||
type DaemonSet struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec defines the desired behavior of this daemon set.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec DaemonSetSpec `json:"spec,omitempty"`
|
||||
Spec DaemonSetSpec
|
||||
|
||||
// Status is the current status of this daemon set. This data may be
|
||||
// out of date by some window of time.
|
||||
|
@ -497,29 +497,29 @@ type DaemonSet struct {
|
|||
// Read-only.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status DaemonSetStatus `json:"status,omitempty"`
|
||||
Status DaemonSetStatus
|
||||
}
|
||||
|
||||
// DaemonSetList is a collection of daemon sets.
|
||||
type DaemonSetList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is a list of daemon sets.
|
||||
Items []DaemonSet `json:"items"`
|
||||
Items []DaemonSet
|
||||
}
|
||||
|
||||
type ThirdPartyResourceDataList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
// Items is a list of third party objects
|
||||
Items []ThirdPartyResourceData `json:"items"`
|
||||
Items []ThirdPartyResourceData
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -529,33 +529,33 @@ type ThirdPartyResourceDataList struct {
|
|||
// externally-reachable urls, load balance traffic, terminate SSL, offer name
|
||||
// based virtual hosting etc.
|
||||
type Ingress struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec is the desired state of the Ingress.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Spec IngressSpec `json:"spec,omitempty"`
|
||||
Spec IngressSpec
|
||||
|
||||
// Status is the current state of the Ingress.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status
|
||||
// +optional
|
||||
Status IngressStatus `json:"status,omitempty"`
|
||||
Status IngressStatus
|
||||
}
|
||||
|
||||
// IngressList is a collection of Ingress.
|
||||
type IngressList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of Ingress.
|
||||
Items []Ingress `json:"items"`
|
||||
Items []Ingress
|
||||
}
|
||||
|
||||
// IngressSpec describes the Ingress the user wishes to exist.
|
||||
|
@ -565,7 +565,7 @@ type IngressSpec struct {
|
|||
// is optional to allow the loadbalancer controller or defaulting logic to
|
||||
// specify a global default.
|
||||
// +optional
|
||||
Backend *IngressBackend `json:"backend,omitempty"`
|
||||
Backend *IngressBackend
|
||||
|
||||
// TLS configuration. Currently the Ingress only supports a single TLS
|
||||
// port, 443. If multiple members of this list specify different hosts, they
|
||||
|
@ -573,12 +573,12 @@ type IngressSpec struct {
|
|||
// through the SNI TLS extension, if the ingress controller fulfilling the
|
||||
// ingress supports SNI.
|
||||
// +optional
|
||||
TLS []IngressTLS `json:"tls,omitempty"`
|
||||
TLS []IngressTLS
|
||||
|
||||
// A list of host rules used to configure the Ingress. If unspecified, or
|
||||
// no rule matches, all traffic is sent to the default backend.
|
||||
// +optional
|
||||
Rules []IngressRule `json:"rules,omitempty"`
|
||||
Rules []IngressRule
|
||||
// TODO: Add the ability to specify load-balancer IP through claims
|
||||
}
|
||||
|
||||
|
@ -589,14 +589,14 @@ type IngressTLS struct {
|
|||
// wildcard host setting for the loadbalancer controller fulfilling this
|
||||
// Ingress, if left unspecified.
|
||||
// +optional
|
||||
Hosts []string `json:"hosts,omitempty"`
|
||||
Hosts []string
|
||||
// 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.
|
||||
// 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
|
||||
// Host header is used for routing.
|
||||
// +optional
|
||||
SecretName string `json:"secretName,omitempty"`
|
||||
SecretName string
|
||||
// TODO: Consider specifying different modes of termination, protocols etc.
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ type IngressTLS struct {
|
|||
type IngressStatus struct {
|
||||
// LoadBalancer contains the current status of the load-balancer.
|
||||
// +optional
|
||||
LoadBalancer api.LoadBalancerStatus `json:"loadBalancer,omitempty"`
|
||||
LoadBalancer api.LoadBalancerStatus
|
||||
}
|
||||
|
||||
// IngressRule represents the rules mapping the paths under a specified host to
|
||||
|
@ -624,14 +624,14 @@ type IngressRule struct {
|
|||
// If the host is unspecified, the Ingress routes all traffic based on the
|
||||
// specified IngressRuleValue.
|
||||
// +optional
|
||||
Host string `json:"host,omitempty"`
|
||||
Host string
|
||||
// IngressRuleValue represents a rule to route requests for this IngressRule.
|
||||
// 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
|
||||
// default backend, is left to the controller fulfilling the Ingress. Http is
|
||||
// currently the only supported IngressRuleValue.
|
||||
// +optional
|
||||
IngressRuleValue `json:",inline,omitempty"`
|
||||
IngressRuleValue
|
||||
}
|
||||
|
||||
// IngressRuleValue represents a rule to apply against incoming requests. If the
|
||||
|
@ -646,7 +646,7 @@ type IngressRuleValue struct {
|
|||
// usable by a loadbalancer, like http keep-alive.
|
||||
|
||||
// +optional
|
||||
HTTP *HTTPIngressRuleValue `json:"http,omitempty"`
|
||||
HTTP *HTTPIngressRuleValue
|
||||
}
|
||||
|
||||
// HTTPIngressRuleValue is a list of http selectors pointing to backends.
|
||||
|
@ -656,7 +656,7 @@ type IngressRuleValue struct {
|
|||
// or '#'.
|
||||
type HTTPIngressRuleValue struct {
|
||||
// A collection of paths that map requests to backends.
|
||||
Paths []HTTPIngressPath `json:"paths"`
|
||||
Paths []HTTPIngressPath
|
||||
// TODO: Consider adding fields for ingress-type specific global
|
||||
// options usable by a loadbalancer, like http keep-alive.
|
||||
}
|
||||
|
@ -672,47 +672,47 @@ type HTTPIngressPath struct {
|
|||
// a '/'. If unspecified, the path defaults to a catch all sending
|
||||
// traffic to the backend.
|
||||
// +optional
|
||||
Path string `json:"path,omitempty"`
|
||||
Path string
|
||||
|
||||
// Backend defines the referenced service endpoint to which the traffic
|
||||
// will be forwarded to.
|
||||
Backend IngressBackend `json:"backend"`
|
||||
Backend IngressBackend
|
||||
}
|
||||
|
||||
// IngressBackend describes all endpoints for a given service and port.
|
||||
type IngressBackend struct {
|
||||
// Specifies the name of the referenced service.
|
||||
ServiceName string `json:"serviceName"`
|
||||
ServiceName string
|
||||
|
||||
// Specifies the port of the referenced service.
|
||||
ServicePort intstr.IntOrString `json:"servicePort"`
|
||||
ServicePort intstr.IntOrString
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// ReplicaSet represents the configuration of a replica set.
|
||||
type ReplicaSet struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec defines the desired behavior of this ReplicaSet.
|
||||
// +optional
|
||||
Spec ReplicaSetSpec `json:"spec,omitempty"`
|
||||
Spec ReplicaSetSpec
|
||||
|
||||
// Status is the current status of this ReplicaSet. This data may be
|
||||
// out of date by some window of time.
|
||||
// +optional
|
||||
Status ReplicaSetStatus `json:"status,omitempty"`
|
||||
Status ReplicaSetStatus
|
||||
}
|
||||
|
||||
// ReplicaSetList is a collection of ReplicaSets.
|
||||
type ReplicaSetList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
Items []ReplicaSet `json:"items"`
|
||||
Items []ReplicaSet
|
||||
}
|
||||
|
||||
// ReplicaSetSpec is the specification of a ReplicaSet.
|
||||
|
@ -720,51 +720,51 @@ type ReplicaSetList struct {
|
|||
// a Template set.
|
||||
type ReplicaSetSpec struct {
|
||||
// Replicas is the number of desired replicas.
|
||||
Replicas int32 `json:"replicas"`
|
||||
Replicas int32
|
||||
|
||||
// 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.
|
||||
// Defaults to 0 (pod will be considered available as soon as it is ready)
|
||||
// +optional
|
||||
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
|
||||
MinReadySeconds int32
|
||||
|
||||
// Selector is a label query over pods that should match the replica count.
|
||||
// Must match in order to be controlled.
|
||||
// If empty, defaulted to labels on pod template.
|
||||
// More info: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
|
||||
// Template is the object that describes the pod that will be created if
|
||||
// insufficient replicas are detected.
|
||||
// +optional
|
||||
Template api.PodTemplateSpec `json:"template,omitempty"`
|
||||
Template api.PodTemplateSpec
|
||||
}
|
||||
|
||||
// ReplicaSetStatus represents the current status of a ReplicaSet.
|
||||
type ReplicaSetStatus struct {
|
||||
// Replicas is the number of actual replicas.
|
||||
Replicas int32 `json:"replicas"`
|
||||
Replicas int32
|
||||
|
||||
// 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
|
||||
|
||||
// The number of ready replicas for this replica set.
|
||||
// +optional
|
||||
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
|
||||
ReadyReplicas int32
|
||||
|
||||
// The number of available replicas (ready for at least minReadySeconds) for this replica set.
|
||||
// +optional
|
||||
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
|
||||
AvailableReplicas int32
|
||||
|
||||
// ObservedGeneration is the most recent generation observed by the controller.
|
||||
// +optional
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
ObservedGeneration int64
|
||||
|
||||
// Represents the latest available observations of a replica set's current state.
|
||||
// +optional
|
||||
Conditions []ReplicaSetCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
|
||||
Conditions []ReplicaSetCondition
|
||||
}
|
||||
|
||||
type ReplicaSetConditionType string
|
||||
|
@ -780,18 +780,18 @@ const (
|
|||
// ReplicaSetCondition describes the state of a replica set at a certain point.
|
||||
type ReplicaSetCondition struct {
|
||||
// Type of replica set condition.
|
||||
Type ReplicaSetConditionType `json:"type"`
|
||||
Type ReplicaSetConditionType
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status api.ConditionStatus `json:"status"`
|
||||
Status api.ConditionStatus
|
||||
// The last time the condition transitioned from one status to another.
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
LastTransitionTime metav1.Time
|
||||
// The reason for the condition's last transition.
|
||||
// +optional
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Reason string
|
||||
// A human readable message indicating details about the transition.
|
||||
// +optional
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -800,74 +800,74 @@ type ReplicaSetCondition struct {
|
|||
// PodSecurityPolicy governs the ability to make requests that affect the SecurityContext
|
||||
// that will be applied to a pod and container.
|
||||
type PodSecurityPolicy struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Spec defines the policy enforced.
|
||||
// +optional
|
||||
Spec PodSecurityPolicySpec `json:"spec,omitempty"`
|
||||
Spec PodSecurityPolicySpec
|
||||
}
|
||||
|
||||
// PodSecurityPolicySpec defines the policy enforced.
|
||||
type PodSecurityPolicySpec struct {
|
||||
// Privileged determines if a pod can request to be run as privileged.
|
||||
// +optional
|
||||
Privileged bool `json:"privileged,omitempty"`
|
||||
Privileged bool
|
||||
// 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
|
||||
// DefaultAddCapabilities and RequiredDropCapabilities.
|
||||
// +optional
|
||||
DefaultAddCapabilities []api.Capability `json:"defaultAddCapabilities,omitempty"`
|
||||
DefaultAddCapabilities []api.Capability
|
||||
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
|
||||
// are required to be dropped and cannot be added.
|
||||
// +optional
|
||||
RequiredDropCapabilities []api.Capability `json:"requiredDropCapabilities,omitempty"`
|
||||
RequiredDropCapabilities []api.Capability
|
||||
// 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.
|
||||
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
|
||||
// +optional
|
||||
AllowedCapabilities []api.Capability `json:"allowedCapabilities,omitempty"`
|
||||
AllowedCapabilities []api.Capability
|
||||
// Volumes is a white list of allowed volume plugins. Empty indicates that all plugins
|
||||
// may be used.
|
||||
// +optional
|
||||
Volumes []FSType `json:"volumes,omitempty"`
|
||||
Volumes []FSType
|
||||
// HostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
|
||||
// +optional
|
||||
HostNetwork bool `json:"hostNetwork,omitempty"`
|
||||
HostNetwork bool
|
||||
// HostPorts determines which host port ranges are allowed to be exposed.
|
||||
// +optional
|
||||
HostPorts []HostPortRange `json:"hostPorts,omitempty"`
|
||||
HostPorts []HostPortRange
|
||||
// HostPID determines if the policy allows the use of HostPID in the pod spec.
|
||||
// +optional
|
||||
HostPID bool `json:"hostPID,omitempty"`
|
||||
HostPID bool
|
||||
// HostIPC determines if the policy allows the use of HostIPC in the pod spec.
|
||||
// +optional
|
||||
HostIPC bool `json:"hostIPC,omitempty"`
|
||||
HostIPC bool
|
||||
// SELinux is the strategy that will dictate the allowable labels that may be set.
|
||||
SELinux SELinuxStrategyOptions `json:"seLinux"`
|
||||
SELinux SELinuxStrategyOptions
|
||||
// RunAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
|
||||
RunAsUser RunAsUserStrategyOptions `json:"runAsUser"`
|
||||
RunAsUser RunAsUserStrategyOptions
|
||||
// SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
|
||||
SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups"`
|
||||
SupplementalGroups SupplementalGroupsStrategyOptions
|
||||
// FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
|
||||
FSGroup FSGroupStrategyOptions `json:"fsGroup"`
|
||||
FSGroup FSGroupStrategyOptions
|
||||
// ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
|
||||
// system. If the container specifically requests to run with a non-read only root file system
|
||||
// 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
|
||||
// will not be forced to.
|
||||
// +optional
|
||||
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"`
|
||||
ReadOnlyRootFilesystem bool
|
||||
}
|
||||
|
||||
// HostPortRange defines a range of host ports that will be enabled by a policy
|
||||
// for pods to use. It requires both the start and end to be defined.
|
||||
type HostPortRange struct {
|
||||
// Min is the start of the range, inclusive.
|
||||
Min int `json:"min"`
|
||||
Min int
|
||||
// Max is the end of the range, inclusive.
|
||||
Max int `json:"max"`
|
||||
Max int
|
||||
}
|
||||
|
||||
// FSType gives strong typing to different file systems that are used by volumes.
|
||||
|
@ -903,11 +903,11 @@ var (
|
|||
// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.
|
||||
type SELinuxStrategyOptions struct {
|
||||
// Rule is the strategy that will dictate the allowable labels that may be set.
|
||||
Rule SELinuxStrategy `json:"rule"`
|
||||
Rule SELinuxStrategy
|
||||
// seLinuxOptions required to run as; required for MustRunAs
|
||||
// More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context
|
||||
// +optional
|
||||
SELinuxOptions *api.SELinuxOptions `json:"seLinuxOptions,omitempty"`
|
||||
SELinuxOptions *api.SELinuxOptions
|
||||
}
|
||||
|
||||
// SELinuxStrategy denotes strategy types for generating SELinux options for a
|
||||
|
@ -924,18 +924,18 @@ const (
|
|||
// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.
|
||||
type RunAsUserStrategyOptions struct {
|
||||
// Rule is the strategy that will dictate the allowable RunAsUser values that may be set.
|
||||
Rule RunAsUserStrategy `json:"rule"`
|
||||
Rule RunAsUserStrategy
|
||||
// Ranges are the allowed ranges of uids that may be used.
|
||||
// +optional
|
||||
Ranges []IDRange `json:"ranges,omitempty"`
|
||||
Ranges []IDRange
|
||||
}
|
||||
|
||||
// IDRange provides a min/max of an allowed range of IDs.
|
||||
type IDRange struct {
|
||||
// Min is the start of the range, inclusive.
|
||||
Min int64 `json:"min"`
|
||||
Min int64
|
||||
// Max is the end of the range, inclusive.
|
||||
Max int64 `json:"max"`
|
||||
Max int64
|
||||
}
|
||||
|
||||
// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a
|
||||
|
@ -955,11 +955,11 @@ const (
|
|||
type FSGroupStrategyOptions struct {
|
||||
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
|
||||
// +optional
|
||||
Rule FSGroupStrategyType `json:"rule,omitempty"`
|
||||
Rule FSGroupStrategyType
|
||||
// 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.
|
||||
// +optional
|
||||
Ranges []IDRange `json:"ranges,omitempty"`
|
||||
Ranges []IDRange
|
||||
}
|
||||
|
||||
// FSGroupStrategyType denotes strategy types for generating FSGroup values for a
|
||||
|
@ -977,11 +977,11 @@ const (
|
|||
type SupplementalGroupsStrategyOptions struct {
|
||||
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
|
||||
// +optional
|
||||
Rule SupplementalGroupsStrategyType `json:"rule,omitempty"`
|
||||
Rule SupplementalGroupsStrategyType
|
||||
// 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.
|
||||
// +optional
|
||||
Ranges []IDRange `json:"ranges,omitempty"`
|
||||
Ranges []IDRange
|
||||
}
|
||||
|
||||
// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental
|
||||
|
@ -997,23 +997,23 @@ const (
|
|||
|
||||
// PodSecurityPolicyList is a list of PodSecurityPolicy objects.
|
||||
type PodSecurityPolicyList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
Items []PodSecurityPolicy `json:"items"`
|
||||
Items []PodSecurityPolicy
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
type NetworkPolicy struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Specification of the desired behavior for this NetworkPolicy.
|
||||
// +optional
|
||||
Spec NetworkPolicySpec `json:"spec,omitempty"`
|
||||
Spec NetworkPolicySpec
|
||||
}
|
||||
|
||||
type NetworkPolicySpec struct {
|
||||
|
@ -1022,7 +1022,7 @@ type NetworkPolicySpec struct {
|
|||
// same set of pods. In this case, the ingress rules for each are combined additively.
|
||||
// This field is NOT optional and follows standard label selector semantics.
|
||||
// An empty podSelector matches all pods in this namespace.
|
||||
PodSelector metav1.LabelSelector `json:"podSelector"`
|
||||
PodSelector metav1.LabelSelector
|
||||
|
||||
// List of ingress rules to be applied to the selected pods.
|
||||
// Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it,
|
||||
|
@ -1033,7 +1033,7 @@ type NetworkPolicySpec struct {
|
|||
// 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.
|
||||
// +optional
|
||||
Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"`
|
||||
Ingress []NetworkPolicyIngressRule
|
||||
}
|
||||
|
||||
// This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.
|
||||
|
@ -1046,7 +1046,7 @@ type NetworkPolicyIngressRule struct {
|
|||
// 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.
|
||||
// +optional
|
||||
Ports []NetworkPolicyPort `json:"ports,omitempty"`
|
||||
Ports []NetworkPolicyPort
|
||||
|
||||
// List of sources which should be able to access the pods selected for this rule.
|
||||
// Items in this list are combined using a logical OR operation.
|
||||
|
@ -1056,14 +1056,14 @@ type NetworkPolicyIngressRule struct {
|
|||
// 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.
|
||||
// +optional
|
||||
From []NetworkPolicyPeer `json:"from,omitempty"`
|
||||
From []NetworkPolicyPeer
|
||||
}
|
||||
|
||||
type NetworkPolicyPort struct {
|
||||
// Optional. The protocol (TCP or UDP) which traffic must match.
|
||||
// If not specified, this field defaults to TCP.
|
||||
// +optional
|
||||
Protocol *api.Protocol `json:"protocol,omitempty"`
|
||||
Protocol *api.Protocol
|
||||
|
||||
// If specified, the port on the given protocol. This can
|
||||
// either be a numerical or named port on a pod. If this field is not provided,
|
||||
|
@ -1071,7 +1071,7 @@ type NetworkPolicyPort struct {
|
|||
// If present, only traffic on the specified protocol AND port
|
||||
// will be matched.
|
||||
// +optional
|
||||
Port *intstr.IntOrString `json:"port,omitempty"`
|
||||
Port *intstr.IntOrString
|
||||
}
|
||||
|
||||
type NetworkPolicyPeer struct {
|
||||
|
@ -1082,7 +1082,7 @@ type NetworkPolicyPeer struct {
|
|||
// If not provided, this selector selects no pods.
|
||||
// If present but empty, this selector selects all pods in this namespace.
|
||||
// +optional
|
||||
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
|
||||
PodSelector *metav1.LabelSelector
|
||||
|
||||
// Selects Namespaces using cluster scoped-labels. This
|
||||
// matches all pods in all namespaces selected by this label selector.
|
||||
|
@ -1090,14 +1090,14 @@ type NetworkPolicyPeer struct {
|
|||
// If omitted, this selector selects no namespaces.
|
||||
// If present but empty, this selector selects all namespaces.
|
||||
// +optional
|
||||
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
|
||||
NamespaceSelector *metav1.LabelSelector
|
||||
}
|
||||
|
||||
// NetworkPolicyList is a list of NetworkPolicy objects.
|
||||
type NetworkPolicyList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
Items []NetworkPolicy `json:"items"`
|
||||
Items []NetworkPolicy
|
||||
}
|
||||
|
|
|
@ -29,12 +29,12 @@ type PodDisruptionBudgetSpec struct {
|
|||
// absence of the evicted pod. So for example you can prevent all voluntary
|
||||
// evictions by specifying "100%".
|
||||
// +optional
|
||||
MinAvailable intstr.IntOrString `json:"minAvailable,omitempty"`
|
||||
MinAvailable intstr.IntOrString
|
||||
|
||||
// Label query over pods whose evictions are managed by the disruption
|
||||
// budget.
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
Selector *metav1.LabelSelector
|
||||
}
|
||||
|
||||
// PodDisruptionBudgetStatus represents information about the status of a
|
||||
|
@ -43,7 +43,7 @@ type PodDisruptionBudgetStatus struct {
|
|||
// Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
|
||||
// status informatio is valid only if observedGeneration equals to PDB's object generation.
|
||||
// +optional
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
ObservedGeneration int64
|
||||
|
||||
// DisruptedPods contains information about pods whose eviction was
|
||||
// processed by the API server eviction subresource handler but has not
|
||||
|
@ -56,43 +56,43 @@ type PodDisruptionBudgetStatus struct {
|
|||
// the list automatically by PodDisruptionBudget controller after some time.
|
||||
// If everything goes smooth this map should be empty for the most of the time.
|
||||
// Large number of entries in the map may indicate problems with pod deletions.
|
||||
DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,5,rep,name=disruptedPods"`
|
||||
DisruptedPods map[string]metav1.Time
|
||||
|
||||
// Number of pod disruptions that are currently allowed.
|
||||
PodDisruptionsAllowed int32 `json:"disruptionsAllowed"`
|
||||
PodDisruptionsAllowed int32
|
||||
|
||||
// current number of healthy pods
|
||||
CurrentHealthy int32 `json:"currentHealthy"`
|
||||
CurrentHealthy int32
|
||||
|
||||
// minimum desired number of healthy pods
|
||||
DesiredHealthy int32 `json:"desiredHealthy"`
|
||||
DesiredHealthy int32
|
||||
|
||||
// total number of pods counted by this disruption budget
|
||||
ExpectedPods int32 `json:"expectedPods"`
|
||||
ExpectedPods int32
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods
|
||||
type PodDisruptionBudget struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// Specification of the desired behavior of the PodDisruptionBudget.
|
||||
// +optional
|
||||
Spec PodDisruptionBudgetSpec `json:"spec,omitempty"`
|
||||
Spec PodDisruptionBudgetSpec
|
||||
// Most recently observed status of the PodDisruptionBudget.
|
||||
// +optional
|
||||
Status PodDisruptionBudgetStatus `json:"status,omitempty"`
|
||||
Status PodDisruptionBudgetStatus
|
||||
}
|
||||
|
||||
// PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
|
||||
type PodDisruptionBudgetList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []PodDisruptionBudget `json:"items"`
|
||||
metav1.ListMeta
|
||||
Items []PodDisruptionBudget
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
@ -102,13 +102,13 @@ type PodDisruptionBudgetList struct {
|
|||
// This is a subresource of Pod. A request to cause such an eviction is
|
||||
// created by POSTing to .../pods/<pod name>/eviction.
|
||||
type Eviction struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
|
||||
// ObjectMeta describes the pod that is being evicted.
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// DeleteOptions may be provided
|
||||
// +optional
|
||||
DeleteOptions *api.DeleteOptions `json:"deleteOptions,omitempty"`
|
||||
DeleteOptions *api.DeleteOptions
|
||||
}
|
||||
|
|
|
@ -31,15 +31,15 @@ import (
|
|||
// called "profiles" in other storage systems.
|
||||
// The name of a StorageClass object is significant, and is how users can request a particular class.
|
||||
type StorageClass struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
api.ObjectMeta
|
||||
|
||||
// provisioner is the driver expected to handle this StorageClass.
|
||||
// This is an optionally-prefixed name, like a label key.
|
||||
// For example: "kubernetes.io/gce-pd" or "kubernetes.io/aws-ebs".
|
||||
// This value may not be empty.
|
||||
Provisioner string `json:"provisioner"`
|
||||
Provisioner string
|
||||
|
||||
// parameters holds parameters for the provisioner.
|
||||
// These values are opaque to the system and are passed directly
|
||||
|
@ -47,17 +47,17 @@ type StorageClass struct {
|
|||
// not empty. The maximum number of parameters is
|
||||
// 512, with a cumulative max size of 256K
|
||||
// +optional
|
||||
Parameters map[string]string `json:"parameters,omitempty"`
|
||||
Parameters map[string]string
|
||||
}
|
||||
|
||||
// StorageClassList is a collection of storage classes.
|
||||
type StorageClassList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
metav1.ListMeta
|
||||
|
||||
// Items is the list of StorageClasses
|
||||
Items []StorageClass `json:"items"`
|
||||
Items []StorageClass
|
||||
}
|
||||
|
|
|
@ -25,34 +25,34 @@ import (
|
|||
)
|
||||
|
||||
type Policy struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.TypeMeta
|
||||
// Holds the information to configure the fit predicate functions
|
||||
Predicates []PredicatePolicy `json:"predicates"`
|
||||
Predicates []PredicatePolicy
|
||||
// Holds the information to configure the priority functions
|
||||
Priorities []PriorityPolicy `json:"priorities"`
|
||||
Priorities []PriorityPolicy
|
||||
// Holds the information to communicate with the extender(s)
|
||||
ExtenderConfigs []ExtenderConfig `json:"extenders"`
|
||||
ExtenderConfigs []ExtenderConfig
|
||||
}
|
||||
|
||||
type PredicatePolicy struct {
|
||||
// Identifier of the predicate policy
|
||||
// For a custom predicate, the name can be user-defined
|
||||
// For the Kubernetes provided predicates, the name is the identifier of the pre-defined predicate
|
||||
Name string `json:"name"`
|
||||
Name string
|
||||
// Holds the parameters to configure the given predicate
|
||||
Argument *PredicateArgument `json:"argument"`
|
||||
Argument *PredicateArgument
|
||||
}
|
||||
|
||||
type PriorityPolicy struct {
|
||||
// Identifier of the priority policy
|
||||
// For a custom priority, the name can be user-defined
|
||||
// For the Kubernetes provided priority functions, the name is the identifier of the pre-defined priority function
|
||||
Name string `json:"name"`
|
||||
Name string
|
||||
// The numeric multiplier for the node scores that the priority function generates
|
||||
// The weight should be a positive integer
|
||||
Weight int `json:"weight"`
|
||||
Weight int
|
||||
// Holds the parameters to configure the given priority function
|
||||
Argument *PriorityArgument `json:"argument"`
|
||||
Argument *PriorityArgument
|
||||
}
|
||||
|
||||
// Represents the arguments that the different types of predicates take
|
||||
|
@ -60,10 +60,10 @@ type PriorityPolicy struct {
|
|||
type PredicateArgument struct {
|
||||
// The predicate that provides affinity for pods belonging to a service
|
||||
// It uses a label to identify nodes that belong to the same "group"
|
||||
ServiceAffinity *ServiceAffinity `json:"serviceAffinity"`
|
||||
ServiceAffinity *ServiceAffinity
|
||||
// The predicate that checks whether a particular node has a certain label
|
||||
// defined or not, regardless of value
|
||||
LabelsPresence *LabelsPresence `json:"labelsPresence"`
|
||||
LabelsPresence *LabelsPresence
|
||||
}
|
||||
|
||||
// Represents the arguments that the different types of priorities take.
|
||||
|
@ -71,72 +71,72 @@ type PredicateArgument struct {
|
|||
type PriorityArgument struct {
|
||||
// The priority function that ensures a good spread (anti-affinity) for pods belonging to a service
|
||||
// It uses a label to identify nodes that belong to the same "group"
|
||||
ServiceAntiAffinity *ServiceAntiAffinity `json:"serviceAntiAffinity"`
|
||||
ServiceAntiAffinity *ServiceAntiAffinity
|
||||
// The priority function that checks whether a particular node has a certain label
|
||||
// defined or not, regardless of value
|
||||
LabelPreference *LabelPreference `json:"labelPreference"`
|
||||
LabelPreference *LabelPreference
|
||||
}
|
||||
|
||||
// Holds the parameters that are used to configure the corresponding predicate
|
||||
type ServiceAffinity struct {
|
||||
// The list of labels that identify node "groups"
|
||||
// All of the labels should match for the node to be considered a fit for hosting the pod
|
||||
Labels []string `json:"labels"`
|
||||
Labels []string
|
||||
}
|
||||
|
||||
// Holds the parameters that are used to configure the corresponding predicate
|
||||
type LabelsPresence struct {
|
||||
// The list of labels that identify node "groups"
|
||||
// All of the labels should be either present (or absent) for the node to be considered a fit for hosting the pod
|
||||
Labels []string `json:"labels"`
|
||||
Labels []string
|
||||
// The boolean flag that indicates whether the labels should be present or absent from the node
|
||||
Presence bool `json:"presence"`
|
||||
Presence bool
|
||||
}
|
||||
|
||||
// Holds the parameters that are used to configure the corresponding priority function
|
||||
type ServiceAntiAffinity struct {
|
||||
// Used to identify node "groups"
|
||||
Label string `json:"label"`
|
||||
Label string
|
||||
}
|
||||
|
||||
// Holds the parameters that are used to configure the corresponding priority function
|
||||
type LabelPreference struct {
|
||||
// Used to identify node "groups"
|
||||
Label string `json:"label"`
|
||||
Label string
|
||||
// This is a boolean flag
|
||||
// If true, higher priority is given to nodes that have the label
|
||||
// If false, higher priority is given to nodes that do not have the label
|
||||
Presence bool `json:"presence"`
|
||||
Presence bool
|
||||
}
|
||||
|
||||
// Holds the parameters used to communicate with the extender. If a verb is unspecified/empty,
|
||||
// it is assumed that the extender chose not to provide that extension.
|
||||
type ExtenderConfig struct {
|
||||
// URLPrefix at which the extender is available
|
||||
URLPrefix string `json:"urlPrefix"`
|
||||
URLPrefix string
|
||||
// Verb for the filter call, empty if not supported. This verb is appended to the URLPrefix when issuing the filter call to extender.
|
||||
FilterVerb string `json:"filterVerb,omitempty"`
|
||||
FilterVerb string
|
||||
// Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.
|
||||
PrioritizeVerb string `json:"prioritizeVerb,omitempty"`
|
||||
PrioritizeVerb string
|
||||
// The numeric multiplier for the node scores that the prioritize call generates.
|
||||
// The weight should be a positive integer
|
||||
Weight int `json:"weight,omitempty"`
|
||||
Weight int
|
||||
// EnableHttps specifies whether https should be used to communicate with the extender
|
||||
EnableHttps bool `json:"enableHttps,omitempty"`
|
||||
EnableHttps bool
|
||||
// TLSConfig specifies the transport layer security config
|
||||
TLSConfig *restclient.TLSClientConfig `json:"tlsConfig,omitempty"`
|
||||
TLSConfig *restclient.TLSClientConfig
|
||||
// HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize
|
||||
// timeout is ignored, k8s/other extenders priorities are used to select the node.
|
||||
HTTPTimeout time.Duration `json:"httpTimeout,omitempty"`
|
||||
HTTPTimeout time.Duration
|
||||
}
|
||||
|
||||
// ExtenderArgs represents the arguments needed by the extender to filter/prioritize
|
||||
// nodes for a pod.
|
||||
type ExtenderArgs struct {
|
||||
// Pod being scheduled
|
||||
Pod v1.Pod `json:"pod"`
|
||||
Pod v1.Pod
|
||||
// List of candidate nodes where the pod can be scheduled
|
||||
Nodes v1.NodeList `json:"nodes"`
|
||||
Nodes v1.NodeList
|
||||
}
|
||||
|
||||
// FailedNodesMap represents the filtered out nodes, with node names and failure messages
|
||||
|
@ -145,19 +145,19 @@ type FailedNodesMap map[string]string
|
|||
// ExtenderFilterResult represents the results of a filter call to an extender
|
||||
type ExtenderFilterResult struct {
|
||||
// Filtered set of nodes where the pod can be scheduled
|
||||
Nodes v1.NodeList `json:"nodes,omitempty"`
|
||||
Nodes v1.NodeList
|
||||
// Filtered out nodes where the pod can't be scheduled and the failure messages
|
||||
FailedNodes FailedNodesMap `json:"failedNodes,omitempty"`
|
||||
FailedNodes FailedNodesMap
|
||||
// Error message indicating failure
|
||||
Error string `json:"error,omitempty"`
|
||||
Error string
|
||||
}
|
||||
|
||||
// HostPriority represents the priority of scheduling to a particular host, higher priority is better.
|
||||
type HostPriority struct {
|
||||
// Name of the host
|
||||
Host string `json:"host"`
|
||||
Host string
|
||||
// Score associated with the host
|
||||
Score int `json:"score"`
|
||||
Score int
|
||||
}
|
||||
|
||||
type HostPriorityList []HostPriority
|
||||
|
|
Loading…
Reference in New Issue