Convert remaining int types to fixed

Having internal and external integer types being different hides
potential conversion problems. Propagate that out further (which will
also allow us to better optimize conversion).
This commit is contained in:
Clayton Coleman 2016-04-27 00:35:02 -04:00
parent 871487378b
commit cf133ee03a
No known key found for this signature in database
GPG Key ID: 3D16906B4F1C5CB3
5 changed files with 89 additions and 89 deletions

View File

@ -456,7 +456,7 @@ type GCEPersistentDiskVolumeSource struct {
// Optional: Partition on the disk to mount.
// If omitted, kubelet will attempt to mount the device name.
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
Partition int `json:"partition,omitempty"`
Partition int32 `json:"partition,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
@ -472,7 +472,7 @@ type ISCSIVolumeSource struct {
// Required: target iSCSI Qualified Name
IQN string `json:"iqn,omitempty"`
// Required: iSCSI target lun number
Lun int `json:"lun,omitempty"`
Lun int32 `json:"lun,omitempty"`
// Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.
ISCSIInterface string `json:"iscsiInterface,omitempty"`
// Filesystem type to mount.
@ -492,7 +492,7 @@ type FCVolumeSource struct {
// Required: FC target world wide names (WWNs)
TargetWWNs []string `json:"targetWWNs"`
// Required: FC target lun number
Lun *int `json:"lun"`
Lun *int32 `json:"lun"`
// Filesystem type to mount.
// Must be a filesystem type supported by the host operating system.
// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
@ -542,7 +542,7 @@ type AWSElasticBlockStoreVolumeSource struct {
// Optional: Partition on the disk to mount.
// If omitted, kubelet will attempt to mount the device name.
// Ex. For /dev/sda1, this field is "1", for /dev/sda, this field is 0 or empty.
Partition int `json:"partition,omitempty"`
Partition int32 `json:"partition,omitempty"`
// Optional: Defaults to false (read/write). ReadOnly here will force
// the ReadOnly setting in VolumeMounts.
ReadOnly bool `json:"readOnly,omitempty"`
@ -731,9 +731,9 @@ type ContainerPort struct {
Name string `json:"name,omitempty"`
// Optional: If specified, this must be a valid port number, 0 < x < 65536.
// If HostNetwork is specified, this must match ContainerPort.
HostPort int `json:"hostPort,omitempty"`
HostPort int32 `json:"hostPort,omitempty"`
// Required: This must be a valid port number, 0 < x < 65536.
ContainerPort int `json:"containerPort"`
ContainerPort int32 `json:"containerPort"`
// Required: Supports "TCP" and "UDP".
Protocol Protocol `json:"protocol,omitempty"`
// Optional: What host IP to bind the external port to.
@ -858,16 +858,16 @@ type Probe struct {
// The action taken to determine the health of a container
Handler `json:",inline"`
// Length of time before health checking is activated. In seconds.
InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"`
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
// Length of time before health checking times out. In seconds.
TimeoutSeconds int `json:"timeoutSeconds,omitempty"`
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
// How often (in seconds) to perform the probe.
PeriodSeconds int `json:"periodSeconds,omitempty"`
PeriodSeconds int32 `json:"periodSeconds,omitempty"`
// Minimum consecutive successes for the probe to be considered successful after having failed.
// Must be 1 for liveness.
SuccessThreshold int `json:"successThreshold,omitempty"`
SuccessThreshold int32 `json:"successThreshold,omitempty"`
// Minimum consecutive failures for the probe to be considered failed after having succeeded.
FailureThreshold int `json:"failureThreshold,omitempty"`
FailureThreshold int32 `json:"failureThreshold,omitempty"`
}
// PullPolicy describes a policy for if/when to pull a container image
@ -998,8 +998,8 @@ type ContainerStateRunning struct {
}
type ContainerStateTerminated struct {
ExitCode int `json:"exitCode"`
Signal int `json:"signal,omitempty"`
ExitCode int32 `json:"exitCode"`
Signal int32 `json:"signal,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
StartedAt unversioned.Time `json:"startedAt,omitempty"`
@ -1025,7 +1025,7 @@ type ContainerStatus struct {
Ready bool `json:"ready"`
// Note that this is calculated from dead containers. But those containers are subject to
// garbage collection. This value will get capped at 5 by GC.
RestartCount int `json:"restartCount"`
RestartCount int32 `json:"restartCount"`
Image string `json:"image"`
ImageID string `json:"imageID"`
ContainerID string `json:"containerID,omitempty"`
@ -1188,7 +1188,7 @@ type NodeAffinity struct {
// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
type PreferredSchedulingTerm struct {
// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
Weight int `json:"weight"`
Weight int32 `json:"weight"`
// A node selector term, associated with the corresponding weight.
Preference NodeSelectorTerm `json:"preference"`
}
@ -1368,7 +1368,7 @@ type PodTemplateList struct {
// a TemplateRef or a Template set.
type ReplicationControllerSpec struct {
// Replicas is the number of desired replicas.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// Selector is a label query over pods that should match the Replicas count.
Selector map[string]string `json:"selector"`
@ -1388,10 +1388,10 @@ type ReplicationControllerSpec struct {
// controller.
type ReplicationControllerStatus struct {
// Replicas is the number of actual replicas.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// The number of pods that have labels matching the labels of the pod template of the replication controller.
FullyLabeledReplicas int `json:"fullyLabeledReplicas,omitempty"`
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
@ -1535,7 +1535,7 @@ type ServicePort struct {
Protocol Protocol `json:"protocol"`
// The port that will be exposed on the service.
Port int `json:"port"`
Port int32 `json:"port"`
// Optional: The target port on pods selected by this service. If this
// is a string, it will be looked up as a named port in the target
@ -1547,7 +1547,7 @@ type ServicePort struct {
// The port on each node on which this service is exposed.
// Default is to auto-allocate a port if the ServiceType of this Service requires one.
NodePort int `json:"nodePort"`
NodePort int32 `json:"nodePort"`
}
// +genclient=true
@ -1652,7 +1652,7 @@ type EndpointPort struct {
Name string
// The port number.
Port int
Port int32
// The IP protocol for this port.
Protocol Protocol
@ -1692,7 +1692,7 @@ type DaemonEndpoint struct {
*/
// Port number of the given endpoint.
Port int `json:"Port"`
Port int32 `json:"Port"`
}
// NodeDaemonEndpoints lists ports opened by daemons running on the Node.
@ -2134,7 +2134,7 @@ type Event struct {
LastTimestamp unversioned.Time `json:"lastTimestamp,omitempty"`
// The number of times this event has occurred.
Count int `json:"count,omitempty"`
Count int32 `json:"count,omitempty"`
// Type of this event (Normal, Warning), new types could be added in the future.
Type string `json:"type,omitempty"`

View File

@ -37,13 +37,13 @@ type Scale struct {
// ScaleSpec describes the attributes of a scale subresource.
type ScaleSpec struct {
// desired number of instances for the scaled object.
Replicas int `json:"replicas,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
}
// ScaleStatus represents the current status of a scale subresource.
type ScaleStatus struct {
// actual number of observed instances of the scaled object.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// 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

View File

@ -57,14 +57,14 @@ type JobSpec struct {
// run at any given time. The actual number of pods running in steady state will
// be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism),
// i.e. when the work left to do is less than max parallelism.
Parallelism *int `json:"parallelism,omitempty"`
Parallelism *int32 `json:"parallelism,omitempty"`
// Completions specifies the desired number of successfully finished pods the
// job should be run with. Setting to nil means that the success of any
// pod signals the success of all pods, and allows parallelism to have any positive
// value. Setting to 1 means that parallelism is limited to 1 and the success of that
// pod signals the success of the job.
Completions *int `json:"completions,omitempty"`
Completions *int32 `json:"completions,omitempty"`
// 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
@ -107,13 +107,13 @@ type JobStatus struct {
CompletionTime *unversioned.Time `json:"completionTime,omitempty"`
// Active is the number of actively running pods.
Active int `json:"active,omitempty"`
Active int32 `json:"active,omitempty"`
// Succeeded is the number of pods which reached Phase Succeeded.
Succeeded int `json:"succeeded,omitempty"`
Succeeded int32 `json:"succeeded,omitempty"`
// Failed is the number of pods which reached Phase Failed.
Failed int `json:"failed,omitempty"`
Failed int32 `json:"failed,omitempty"`
}
type JobConditionType string

View File

@ -32,12 +32,12 @@ type KubeProxyConfiguration struct {
// defaulting to 127.0.0.1 (set to 0.0.0.0 for all interfaces)
HealthzBindAddress string `json:"healthzBindAddress"`
// healthzPort is the port to bind the health check server. Use 0 to disable.
HealthzPort int `json:"healthzPort"`
HealthzPort int32 `json:"healthzPort"`
// hostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.
HostnameOverride string `json:"hostnameOverride"`
// 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 *int `json:"iptablesMasqueradeBit"`
IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit"`
// iptablesSyncPeriod is the period that iptables rules are refreshed (e.g. '5s', '1m',
// '2h22m'). Must be greater than 0.
IPTablesSyncPeriod unversioned.Duration `json:"iptablesSyncPeriodSeconds"`
@ -50,7 +50,7 @@ type KubeProxyConfiguration struct {
Master string `json:"master"`
// oomScoreAdj is the oom-score-adj value for kube-proxy process. Values must be within
// the range [-1000, 1000]
OOMScoreAdj *int `json:"oomScoreAdj"`
OOMScoreAdj *int32 `json:"oomScoreAdj"`
// mode specifies which proxy mode to use.
Mode ProxyMode `json:"mode"`
// portRange is the range of host ports (beginPort-endPort, inclusive) that may be consumed
@ -63,7 +63,7 @@ type KubeProxyConfiguration struct {
// Must be greater than 0. Only applicable for proxyMode=userspace.
UDPIdleTimeout unversioned.Duration `json:"udpTimeoutMilliseconds"`
// conntrackMax is the maximum number of NAT connections to track (0 to leave as-is)")
ConntrackMax int `json:"conntrackMax"`
ConntrackMax int32 `json:"conntrackMax"`
// conntrackTCPEstablishedTimeout is how long an idle UDP connection will be kept open
// (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxyMode is Userspace
ConntrackTCPEstablishedTimeout unversioned.Duration `json:"conntrackTCPEstablishedTimeout"`
@ -169,14 +169,14 @@ type KubeletConfiguration struct {
// 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 int `json:"registryBurst"`
RegistryBurst int32 `json:"registryBurst"`
// eventRecordQPS is the maximum event creations per second. If 0, there
// is no limit enforced.
EventRecordQPS float32 `json:"eventRecordQPS"`
// 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 int `json:"eventBurst"`
EventBurst int32 `json:"eventBurst"`
// enableDebuggingHandlers enables server endpoints for log collection
// and local running of containers and commands
EnableDebuggingHandlers bool `json:"enableDebuggingHandlers"`
@ -185,20 +185,20 @@ type KubeletConfiguration struct {
MinimumGCAge unversioned.Duration `json:"minimumGCAge"`
// maxPerPodContainerCount is the maximum number of old instances to
// retain per container. Each container takes up some disk space.
MaxPerPodContainerCount int `json:"maxPerPodContainerCount"`
MaxPerPodContainerCount int32 `json:"maxPerPodContainerCount"`
// maxContainerCount is the maximum number of old instances of containers
// to retain globally. Each container takes up some disk space.
MaxContainerCount int `json:"maxContainerCount"`
MaxContainerCount int32 `json:"maxContainerCount"`
// cAdvisorPort is the port of the localhost cAdvisor endpoint
CAdvisorPort uint `json:"cAdvisorPort"`
// healthzPort is the port of the localhost healthz endpoint
HealthzPort int `json:"healthzPort"`
HealthzPort int32 `json:"healthzPort"`
// healthzBindAddress is the IP address for the healthz server to serve
// on.
HealthzBindAddress string `json:"healthzBindAddress"`
// oomScoreAdj is The oom-score-adj value for kubelet process. Values
// must be within the range [-1000, 1000].
OOMScoreAdj int `json:"oomScoreAdj"`
OOMScoreAdj int32 `json:"oomScoreAdj"`
// registerNode enables automatic registration with the apiserver.
RegisterNode bool `json:"registerNode"`
// clusterDomain is the DNS domain for this cluster. If set, kubelet will
@ -224,15 +224,15 @@ type KubeletConfiguration struct {
ImageMinimumGCAge unversioned.Duration `json:"imageMinimumGCAge"`
// imageGCHighThresholdPercent is the percent of disk usage after which
// image garbage collection is always run.
ImageGCHighThresholdPercent int `json:"imageGCHighThresholdPercent"`
ImageGCHighThresholdPercent int32 `json:"imageGCHighThresholdPercent"`
// imageGCLowThresholdPercent is the percent of disk usage before which
// image garbage collection is never run. Lowest disk usage to garbage
// collect to.
ImageGCLowThresholdPercent int `json:"imageGCLowThresholdPercent"`
ImageGCLowThresholdPercent int32 `json:"imageGCLowThresholdPercent"`
// lowDiskSpaceThresholdMB is the absolute free disk space, in MB, to
// maintain. When disk space falls below this threshold, new pods would
// be rejected.
LowDiskSpaceThresholdMB int `json:"lowDiskSpaceThresholdMB"`
LowDiskSpaceThresholdMB int32 `json:"lowDiskSpaceThresholdMB"`
// How frequently to calculate and cache volume disk usage for all pods
VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"`
// networkPluginName is the name of the network plugin to be invoked for
@ -289,7 +289,7 @@ type KubeletConfiguration struct {
// The node has babysitter process monitoring docker and kubelet.
BabysitDaemons bool `json:"babysitDaemons"`
// maxPods is the number of pods that can run on this Kubelet.
MaxPods int `json:"maxPods"`
MaxPods int32 `json:"maxPods"`
// dockerExecHandlerName is the handler to use when executing a command
// in a container. Valid values are 'native' and 'nsenter'. Defaults to
// 'native'.
@ -319,7 +319,7 @@ type KubeletConfiguration struct {
KubeAPIQPS float32 `json:"kubeAPIQPS"`
// kubeAPIBurst is the burst to allow while talking with kubernetes
// apiserver
KubeAPIBurst int `json:"kubeAPIBurst"`
KubeAPIBurst int32 `json:"kubeAPIBurst"`
// 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.
@ -353,7 +353,7 @@ type KubeSchedulerConfiguration struct {
unversioned.TypeMeta
// port is the port that the scheduler's http service runs on.
Port int `json:"port"`
Port int32 `json:"port"`
// address is the IP address to serve on.
Address string `json:"address"`
// algorithmProvider is the scheduling algorithm provider to use.
@ -367,7 +367,7 @@ type KubeSchedulerConfiguration struct {
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
KubeAPIQPS float32 `json:"kubeAPIQPS"`
// kubeAPIBurst is the QPS burst to use while talking with kubernetes apiserver.
KubeAPIBurst int `json:"kubeAPIBurst"`
KubeAPIBurst int32 `json:"kubeAPIBurst"`
// 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'.
@ -405,7 +405,7 @@ type KubeControllerManagerConfiguration struct {
unversioned.TypeMeta
// port is the port that the controller-manager's http service runs on.
Port int `json:"port"`
Port int32 `json:"port"`
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
Address string `json:"address"`
// cloudProvider is the provider for cloud services.
@ -415,43 +415,43 @@ type KubeControllerManagerConfiguration struct {
// 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 int `json:"concurrentEndpointSyncs"`
ConcurrentEndpointSyncs int32 `json:"concurrentEndpointSyncs"`
// 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 int `json:"concurrentRSSyncs"`
ConcurrentRSSyncs int32 `json:"concurrentRSSyncs"`
// 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 int `json:"concurrentRCSyncs"`
ConcurrentRCSyncs int32 `json:"concurrentRCSyncs"`
// 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 int `json:"concurrentResourceQuotaSyncs"`
ConcurrentResourceQuotaSyncs int32 `json:"concurrentResourceQuotaSyncs"`
// 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 int `json:"concurrentDeploymentSyncs"`
ConcurrentDeploymentSyncs int32 `json:"concurrentDeploymentSyncs"`
// 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 int `json:"concurrentDaemonSetSyncs"`
ConcurrentDaemonSetSyncs int32 `json:"concurrentDaemonSetSyncs"`
// 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 int `json:"concurrentJobSyncs"`
ConcurrentJobSyncs int32 `json:"concurrentJobSyncs"`
// concurrentNamespaceSyncs is the number of namespace objects that are
// allowed to sync concurrently.
ConcurrentNamespaceSyncs int `json:"concurrentNamespaceSyncs"`
ConcurrentNamespaceSyncs int32 `json:"concurrentNamespaceSyncs"`
// lookupCacheSizeForRC is the size of lookup cache for replication controllers.
// Larger number = more responsive replica management, but more MEM load.
LookupCacheSizeForRC int `json:"lookupCacheSizeForRC"`
LookupCacheSizeForRC int32 `json:"lookupCacheSizeForRC"`
// lookupCacheSizeForRS is the size of lookup cache for replicatsets.
// Larger number = more responsive replica management, but more MEM load.
LookupCacheSizeForRS int `json:"lookupCacheSizeForRS"`
LookupCacheSizeForRS int32 `json:"lookupCacheSizeForRS"`
// lookupCacheSizeForDaemonSet is the size of lookup cache for daemonsets.
// Larger number = more responsive daemonset, but more MEM load.
LookupCacheSizeForDaemonSet int `json:"lookupCacheSizeForDaemonSet"`
LookupCacheSizeForDaemonSet int32 `json:"lookupCacheSizeForDaemonSet"`
// serviceSyncPeriod is the period for syncing services with their external
// load balancers.
ServiceSyncPeriod unversioned.Duration `json:"serviceSyncPeriod"`
@ -474,7 +474,7 @@ type KubeControllerManagerConfiguration struct {
// 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 int `json:"terminatedPodGCThreshold"`
TerminatedPodGCThreshold int32 `json:"terminatedPodGCThreshold"`
// horizontalPodAutoscalerSyncPeriod is the period for syncing the number of
// pods in horizontal pod autoscaler.
HorizontalPodAutoscalerSyncPeriod unversioned.Duration `json:"horizontalPodAutoscalerSyncPeriod"`
@ -487,7 +487,7 @@ type KubeControllerManagerConfiguration struct {
DeletingPodsQps float32 `json:"deletingPodsQps"`
// deletingPodsBurst is the number of nodes on which pods are bursty deleted in
// case of node failure. For more details look into RateLimiter.
DeletingPodsBurst int `json:"deletingPodsBurst"`
DeletingPodsBurst int32 `json:"deletingPodsBurst"`
// nodeMontiorGracePeriod is the amount of time which we allow a running node to be
// unresponsive before marking it unhealty. Must be N times more than kubelet's
// nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet
@ -495,7 +495,7 @@ type KubeControllerManagerConfiguration struct {
NodeMonitorGracePeriod unversioned.Duration `json:"nodeMonitorGracePeriod"`
// registerRetryCount is the number of retries for initial node registration.
// Retry interval equals node-sync-period.
RegisterRetryCount int `json:"registerRetryCount"`
RegisterRetryCount int32 `json:"registerRetryCount"`
// nodeStartupGracePeriod is the amount of time which we allow starting a node to
// be unresponsive before marking it unhealty.
NodeStartupGracePeriod unversioned.Duration `json:"nodeStartupGracePeriod"`
@ -521,7 +521,7 @@ type KubeControllerManagerConfiguration struct {
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
KubeAPIQPS float32 `json:"kubeAPIQPS"`
// kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
KubeAPIBurst int `json:"kubeAPIBurst"`
KubeAPIBurst int32 `json:"kubeAPIBurst"`
// leaderElection defines the configuration of leader election client.
LeaderElection LeaderElectionConfiguration `json:"leaderElection"`
// volumeConfiguration holds configuration for volume related features.
@ -548,16 +548,16 @@ type VolumeConfiguration struct {
type PersistentVolumeRecyclerConfiguration struct {
// maximumRetry is number of retries the PV recycler will execute on failure to recycle
// PV.
MaximumRetry int `json:"maximumRetry"`
MaximumRetry int32 `json:"maximumRetry"`
// minimumTimeoutNFS is the minimum ActiveDeadlineSeconds to use for an NFS Recycler
// pod.
MinimumTimeoutNFS int `json:"minimumTimeoutNFS"`
MinimumTimeoutNFS int32 `json:"minimumTimeoutNFS"`
// podTemplateFilePathNFS is the file path to a pod definition used as a template for
// NFS persistent volume recycling
PodTemplateFilePathNFS string `json:"podTemplateFilePathNFS"`
// incrementTimeoutNFS is the increment of time added per Gi to ActiveDeadlineSeconds
// for an NFS scrubber pod.
IncrementTimeoutNFS int `json:"incrementTimeoutNFS"`
IncrementTimeoutNFS int32 `json:"incrementTimeoutNFS"`
// 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.
@ -565,9 +565,9 @@ type PersistentVolumeRecyclerConfiguration struct {
// 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 int `json:"minimumTimeoutHostPath"`
MinimumTimeoutHostPath int32 `json:"minimumTimeoutHostPath"`
// 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 int `json:"incrementTimeoutHostPath"`
IncrementTimeoutHostPath int32 `json:"incrementTimeoutHostPath"`
}

View File

@ -38,13 +38,13 @@ import (
// describes the attributes of a scale subresource
type ScaleSpec struct {
// desired number of instances for the scaled object.
Replicas int `json:"replicas,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
}
// represents the current status of a scale subresource.
type ScaleStatus struct {
// actual number of observed instances of the scaled object.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// label query over pods that should match the replicas count.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md#label-selectors
@ -86,7 +86,7 @@ type SubresourceReference struct {
type CPUTargetUtilization struct {
// fraction of the requested CPU that should be utilized/used,
// e.g. 70 means that 70% of the requested CPU should be in use.
TargetPercentage int `json:"targetPercentage"`
TargetPercentage int32 `json:"targetPercentage"`
}
// Alpha-level support for Custom Metrics in HPA (as annotations).
@ -118,9 +118,9 @@ type HorizontalPodAutoscalerSpec struct {
// and will set the desired number of pods by modifying its spec.
ScaleRef SubresourceReference `json:"scaleRef"`
// lower limit for the number of pods that can be set by the autoscaler, default 1.
MinReplicas *int `json:"minReplicas,omitempty"`
MinReplicas *int32 `json:"minReplicas,omitempty"`
// upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinReplicas.
MaxReplicas int `json:"maxReplicas"`
MaxReplicas int32 `json:"maxReplicas"`
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
// if not specified it defaults to the target CPU utilization at 80% of the requested resources.
CPUUtilization *CPUTargetUtilization `json:"cpuUtilization,omitempty"`
@ -136,14 +136,14 @@ type HorizontalPodAutoscalerStatus struct {
LastScaleTime *unversioned.Time `json:"lastScaleTime,omitempty"`
// current number of replicas of pods managed by this autoscaler.
CurrentReplicas int `json:"currentReplicas"`
CurrentReplicas int32 `json:"currentReplicas"`
// desired number of replicas of pods managed by this autoscaler.
DesiredReplicas int `json:"desiredReplicas"`
DesiredReplicas int32 `json:"desiredReplicas"`
// 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.
CurrentCPUUtilizationPercentage *int `json:"currentCPUUtilizationPercentage,omitempty"`
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
}
// +genclient=true
@ -229,7 +229,7 @@ type Deployment struct {
type DeploymentSpec struct {
// Number of desired pods. This is a pointer to distinguish between explicit
// zero and not specified. Defaults to 1.
Replicas int `json:"replicas,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
// Label selector for pods. Existing ReplicaSets whose pods are
// selected by this will be the ones affected by this deployment.
@ -244,11 +244,11 @@ type DeploymentSpec struct {
// 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)
MinReadySeconds int `json:"minReadySeconds,omitempty"`
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
// The number of old ReplicaSets to retain to allow rollback.
// This is a pointer to distinguish between explicit zero and not specified.
RevisionHistoryLimit *int `json:"revisionHistoryLimit,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
// Indicates that the deployment is paused and will not be processed by the
// deployment controller.
@ -334,16 +334,16 @@ type DeploymentStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
Replicas int `json:"replicas,omitempty"`
Replicas int32 `json:"replicas,omitempty"`
// Total number of non-terminated pods targeted by this deployment that have the desired template spec.
UpdatedReplicas int `json:"updatedReplicas,omitempty"`
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
// Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.
AvailableReplicas int `json:"availableReplicas,omitempty"`
AvailableReplicas int32 `json:"availableReplicas,omitempty"`
// Total number of unavailable pods targeted by this deployment.
UnavailableReplicas int `json:"unavailableReplicas,omitempty"`
UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`
}
type DeploymentList struct {
@ -442,15 +442,15 @@ 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 int `json:"currentNumberScheduled"`
CurrentNumberScheduled int32 `json:"currentNumberScheduled"`
// NumberMisscheduled is the number of nodes that are running the daemon pod, but are
// not supposed to run the daemon pod.
NumberMisscheduled int `json:"numberMisscheduled"`
NumberMisscheduled int32 `json:"numberMisscheduled"`
// DesiredNumberScheduled is the total number of nodes that should be running the daemon
// pod (including nodes correctly running the daemon pod).
DesiredNumberScheduled int `json:"desiredNumberScheduled"`
DesiredNumberScheduled int32 `json:"desiredNumberScheduled"`
}
// +genclient=true
@ -674,7 +674,7 @@ type ReplicaSetList struct {
// a Template set.
type ReplicaSetSpec struct {
// Replicas is the number of desired replicas.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// Selector is a label query over pods that should match the replica count.
// Must match in order to be controlled.
@ -690,10 +690,10 @@ type ReplicaSetSpec struct {
// ReplicaSetStatus represents the current status of a ReplicaSet.
type ReplicaSetStatus struct {
// Replicas is the number of actual replicas.
Replicas int `json:"replicas"`
Replicas int32 `json:"replicas"`
// The number of pods that have labels matching the labels of the pod template of the replicaset.
FullyLabeledReplicas int `json:"fullyLabeledReplicas,omitempty"`
FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"`
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`