mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-05 03:06:23 +00:00
published by bot
(https://github.com/kubernetes/contrib/tree/master/mungegithub) copied from https://github.com/kubernetes/kubernetes.git, branch master, last commit is 800ef09dc19c04789c49c2e83e963bbd986cda7a
This commit is contained in:
parent
febd848390
commit
89c6009983
@ -18,7 +18,7 @@ package fake
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/client-go/pkg/api/v1"
|
"k8s.io/client-go/pkg/api/v1"
|
||||||
policy "k8s.io/client-go/pkg/apis/policy/v1alpha1"
|
policy "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
"k8s.io/client-go/rest"
|
"k8s.io/client-go/rest"
|
||||||
"k8s.io/client-go/testing"
|
"k8s.io/client-go/testing"
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ package v1
|
|||||||
import (
|
import (
|
||||||
"k8s.io/client-go/pkg/api"
|
"k8s.io/client-go/pkg/api"
|
||||||
"k8s.io/client-go/pkg/api/v1"
|
"k8s.io/client-go/pkg/api/v1"
|
||||||
policy "k8s.io/client-go/pkg/apis/policy/v1alpha1"
|
policy "k8s.io/client-go/pkg/apis/policy/v1beta1"
|
||||||
"k8s.io/client-go/rest"
|
"k8s.io/client-go/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -289,6 +289,8 @@ type VolumeSource struct {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
||||||
|
// PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
|
||||||
|
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
// Similar to VolumeSource but meant for the administrator who creates PVs.
|
||||||
@ -349,6 +351,8 @@ type PersistentVolumeSource struct {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty"`
|
||||||
|
// PhotonPersistentDisk represents a Photon Controller persistent disk attached and mounted on kubelets host machine
|
||||||
|
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PersistentVolumeClaimVolumeSource struct {
|
type PersistentVolumeClaimVolumeSource struct {
|
||||||
@ -936,6 +940,16 @@ type VsphereVirtualDiskVolumeSource struct {
|
|||||||
FSType string `json:"fsType,omitempty"`
|
FSType string `json:"fsType,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Photon Controller persistent disk resource.
|
||||||
|
type PhotonPersistentDiskVolumeSource struct {
|
||||||
|
// ID that identifies Photon Controller persistent disk
|
||||||
|
PdID string `json:"pdID"`
|
||||||
|
// 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.
|
||||||
|
FSType string `json:"fsType,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type AzureDataDiskCachingMode string
|
type AzureDataDiskCachingMode string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2033,6 +2033,9 @@ message PersistentVolumeSource {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
optional AzureDiskVolumeSource azureDisk = 16;
|
optional AzureDiskVolumeSource azureDisk = 16;
|
||||||
|
|
||||||
|
// PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
|
||||||
|
optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeSpec is the specification of a persistent volume.
|
// PersistentVolumeSpec is the specification of a persistent volume.
|
||||||
@ -2082,6 +2085,17 @@ message PersistentVolumeStatus {
|
|||||||
optional string reason = 3;
|
optional string reason = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Photon Controller persistent disk resource.
|
||||||
|
message PhotonPersistentDiskVolumeSource {
|
||||||
|
// ID that identifies Photon Controller persistent disk
|
||||||
|
optional string pdID = 1;
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
optional string fsType = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Pod is a collection of containers that can run on a host. This resource is created
|
// Pod is a collection of containers that can run on a host. This resource is created
|
||||||
// by clients and scheduled onto hosts.
|
// by clients and scheduled onto hosts.
|
||||||
message Pod {
|
message Pod {
|
||||||
@ -3541,6 +3555,9 @@ message VolumeSource {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
optional AzureDiskVolumeSource azureDisk = 22;
|
optional AzureDiskVolumeSource azureDisk = 22;
|
||||||
|
|
||||||
|
// PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
|
||||||
|
optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents a vSphere volume resource.
|
// Represents a vSphere volume resource.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -322,6 +322,8 @@ type VolumeSource struct {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"`
|
||||||
|
// PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
|
||||||
|
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
||||||
@ -405,6 +407,8 @@ type PersistentVolumeSource struct {
|
|||||||
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
|
||||||
// +optional
|
// +optional
|
||||||
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
|
AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"`
|
||||||
|
// PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
|
||||||
|
PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +genclient=true
|
// +genclient=true
|
||||||
@ -1023,6 +1027,17 @@ type VsphereVirtualDiskVolumeSource struct {
|
|||||||
// +optional
|
// +optional
|
||||||
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
|
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents a Photon Controller persistent disk resource.
|
||||||
|
type PhotonPersistentDiskVolumeSource struct {
|
||||||
|
// ID that identifies Photon Controller persistent disk
|
||||||
|
PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"`
|
||||||
|
// 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.
|
||||||
|
FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"`
|
||||||
|
}
|
||||||
|
|
||||||
type AzureDataDiskCachingMode string
|
type AzureDataDiskCachingMode string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -1098,6 +1098,7 @@ var map_PersistentVolumeSource = map[string]string{
|
|||||||
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
||||||
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
||||||
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||||
|
"photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
|
func (PersistentVolumeSource) SwaggerDoc() map[string]string {
|
||||||
@ -1127,6 +1128,16 @@ func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
|
|||||||
return map_PersistentVolumeStatus
|
return map_PersistentVolumeStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var map_PhotonPersistentDiskVolumeSource = map[string]string{
|
||||||
|
"": "Represents a Photon Controller persistent disk resource.",
|
||||||
|
"pdID": "ID that identifies Photon Controller persistent disk",
|
||||||
|
"fsType": "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.",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
return map_PhotonPersistentDiskVolumeSource
|
||||||
|
}
|
||||||
|
|
||||||
var map_Pod = map[string]string{
|
var map_Pod = map[string]string{
|
||||||
"": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.",
|
"": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.",
|
||||||
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
|
||||||
@ -1799,6 +1810,7 @@ var map_VolumeSource = map[string]string{
|
|||||||
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
"vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine",
|
||||||
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
"quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime",
|
||||||
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
"azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.",
|
||||||
|
"photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (VolumeSource) SwaggerDoc() map[string]string {
|
func (VolumeSource) SwaggerDoc() map[string]string {
|
||||||
|
@ -229,6 +229,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
|||||||
Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec,
|
Convert_api_PersistentVolumeSpec_To_v1_PersistentVolumeSpec,
|
||||||
Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus,
|
Convert_v1_PersistentVolumeStatus_To_api_PersistentVolumeStatus,
|
||||||
Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus,
|
Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus,
|
||||||
|
Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource,
|
||||||
|
Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource,
|
||||||
Convert_v1_Pod_To_api_Pod,
|
Convert_v1_Pod_To_api_Pod,
|
||||||
Convert_api_Pod_To_v1_Pod,
|
Convert_api_Pod_To_v1_Pod,
|
||||||
Convert_v1_PodAffinity_To_api_PodAffinity,
|
Convert_v1_PodAffinity_To_api_PodAffinity,
|
||||||
@ -2649,6 +2651,7 @@ func autoConvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Per
|
|||||||
out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||||
out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
|
out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
|
||||||
out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||||
|
out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2673,6 +2676,7 @@ func autoConvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
|||||||
out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
|
out.AzureFile = (*AzureFileVolumeSource)(unsafe.Pointer(in.AzureFile))
|
||||||
out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||||
out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||||
|
out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2732,6 +2736,26 @@ func Convert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in *api.Per
|
|||||||
return autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in, out, s)
|
return autoConvert_api_PersistentVolumeStatus_To_v1_PersistentVolumeStatus(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
out.PdID = in.PdID
|
||||||
|
out.FSType = in.FSType
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in *PhotonPersistentDiskVolumeSource, out *api.PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1_PhotonPersistentDiskVolumeSource_To_api_PhotonPersistentDiskVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
out.PdID = in.PdID
|
||||||
|
out.FSType = in.FSType
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func Convert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in *api.PhotonPersistentDiskVolumeSource, out *PhotonPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||||
|
return autoConvert_api_PhotonPersistentDiskVolumeSource_To_v1_PhotonPersistentDiskVolumeSource(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
|
func autoConvert_v1_Pod_To_api_Pod(in *Pod, out *api.Pod, s conversion.Scope) error {
|
||||||
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
if err := Convert_v1_ObjectMeta_To_api_ObjectMeta(&in.ObjectMeta, &out.ObjectMeta, s); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -4266,6 +4290,7 @@ func autoConvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.
|
|||||||
out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
out.VsphereVolume = (*api.VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||||
out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
|
out.Quobyte = (*api.QuobyteVolumeSource)(unsafe.Pointer(in.Quobyte))
|
||||||
out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
out.AzureDisk = (*api.AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||||
|
out.PhotonPersistentDisk = (*api.PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4296,6 +4321,7 @@ func autoConvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
|
|||||||
out.ConfigMap = (*ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
|
out.ConfigMap = (*ConfigMapVolumeSource)(unsafe.Pointer(in.ConfigMap))
|
||||||
out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
out.VsphereVolume = (*VsphereVirtualDiskVolumeSource)(unsafe.Pointer(in.VsphereVolume))
|
||||||
out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
out.AzureDisk = (*AzureDiskVolumeSource)(unsafe.Pointer(in.AzureDisk))
|
||||||
|
out.PhotonPersistentDisk = (*PhotonPersistentDiskVolumeSource)(unsafe.Pointer(in.PhotonPersistentDisk))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Pod, InType: reflect.TypeOf(&Pod{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_Pod, InType: reflect.TypeOf(&Pod{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
|
||||||
@ -2231,6 +2232,13 @@ func DeepCopy_v1_PersistentVolumeSource(in interface{}, out interface{}, c *conv
|
|||||||
} else {
|
} else {
|
||||||
out.AzureDisk = nil
|
out.AzureDisk = nil
|
||||||
}
|
}
|
||||||
|
if in.PhotonPersistentDisk != nil {
|
||||||
|
in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
|
||||||
|
*out = new(PhotonPersistentDiskVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.PhotonPersistentDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2283,6 +2291,16 @@ func DeepCopy_v1_PersistentVolumeStatus(in interface{}, out interface{}, c *conv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_v1_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*PhotonPersistentDiskVolumeSource)
|
||||||
|
out := out.(*PhotonPersistentDiskVolumeSource)
|
||||||
|
out.PdID = in.PdID
|
||||||
|
out.FSType = in.FSType
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_v1_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*Pod)
|
in := in.(*Pod)
|
||||||
@ -3706,6 +3724,13 @@ func DeepCopy_v1_VolumeSource(in interface{}, out interface{}, c *conversion.Clo
|
|||||||
} else {
|
} else {
|
||||||
out.AzureDisk = nil
|
out.AzureDisk = nil
|
||||||
}
|
}
|
||||||
|
if in.PhotonPersistentDisk != nil {
|
||||||
|
in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
|
||||||
|
*out = new(PhotonPersistentDiskVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.PhotonPersistentDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
|
|||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSource, InType: reflect.TypeOf(&PersistentVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeSpec, InType: reflect.TypeOf(&PersistentVolumeSpec{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PersistentVolumeStatus, InType: reflect.TypeOf(&PersistentVolumeStatus{})},
|
||||||
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PhotonPersistentDiskVolumeSource, InType: reflect.TypeOf(&PhotonPersistentDiskVolumeSource{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Pod, InType: reflect.TypeOf(&Pod{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_Pod, InType: reflect.TypeOf(&Pod{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinity, InType: reflect.TypeOf(&PodAffinity{})},
|
||||||
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
|
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_api_PodAffinityTerm, InType: reflect.TypeOf(&PodAffinityTerm{})},
|
||||||
@ -2290,6 +2291,13 @@ func DeepCopy_api_PersistentVolumeSource(in interface{}, out interface{}, c *con
|
|||||||
} else {
|
} else {
|
||||||
out.AzureDisk = nil
|
out.AzureDisk = nil
|
||||||
}
|
}
|
||||||
|
if in.PhotonPersistentDisk != nil {
|
||||||
|
in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
|
||||||
|
*out = new(PhotonPersistentDiskVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.PhotonPersistentDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2342,6 +2350,16 @@ func DeepCopy_api_PersistentVolumeStatus(in interface{}, out interface{}, c *con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeepCopy_api_PhotonPersistentDiskVolumeSource(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
|
{
|
||||||
|
in := in.(*PhotonPersistentDiskVolumeSource)
|
||||||
|
out := out.(*PhotonPersistentDiskVolumeSource)
|
||||||
|
out.PdID = in.PdID
|
||||||
|
out.FSType = in.FSType
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
|
func DeepCopy_api_Pod(in interface{}, out interface{}, c *conversion.Cloner) error {
|
||||||
{
|
{
|
||||||
in := in.(*Pod)
|
in := in.(*Pod)
|
||||||
@ -3752,6 +3770,13 @@ func DeepCopy_api_VolumeSource(in interface{}, out interface{}, c *conversion.Cl
|
|||||||
} else {
|
} else {
|
||||||
out.AzureDisk = nil
|
out.AzureDisk = nil
|
||||||
}
|
}
|
||||||
|
if in.PhotonPersistentDisk != nil {
|
||||||
|
in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk
|
||||||
|
*out = new(PhotonPersistentDiskVolumeSource)
|
||||||
|
**out = **in
|
||||||
|
} else {
|
||||||
|
out.PhotonPersistentDisk = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12825
pkg/apis/componentconfig/types.generated.go
Normal file
12825
pkg/apis/componentconfig/types.generated.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -326,8 +326,6 @@ type KubeletConfiguration struct {
|
|||||||
RktPath string `json:"rktPath,omitempty"`
|
RktPath string `json:"rktPath,omitempty"`
|
||||||
// experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path
|
// experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path
|
||||||
ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
|
ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
|
||||||
// experimentalMounterRootfsPath is the absolute path to root filesystem for the mounter binary.
|
|
||||||
ExperimentalMounterRootfsPath string `json:"experimentalMounterRootfsPath,omitempty"`
|
|
||||||
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
||||||
// +optional
|
// +optional
|
||||||
RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
|
RktAPIEndpoint string `json:"rktAPIEndpoint,omitempty"`
|
||||||
@ -468,6 +466,10 @@ type KubeletConfiguration struct {
|
|||||||
// TODO(#34726:1.8.0): Remove the opt-in for failing when swap is enabled.
|
// 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.
|
// Tells the Kubelet to fail to start if swap is enabled on the node.
|
||||||
ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"`
|
ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"`
|
||||||
|
// 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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type KubeletAuthorizationMode string
|
type KubeletAuthorizationMode string
|
||||||
|
@ -340,7 +340,7 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
|
|||||||
obj.SerializeImagePulls = boolVar(true)
|
obj.SerializeImagePulls = boolVar(true)
|
||||||
}
|
}
|
||||||
if obj.SeccompProfileRoot == "" {
|
if obj.SeccompProfileRoot == "" {
|
||||||
filepath.Join(defaultRootDir, "seccomp")
|
obj.SeccompProfileRoot = filepath.Join(defaultRootDir, "seccomp")
|
||||||
}
|
}
|
||||||
if obj.StreamingConnectionIdleTimeout == zeroDuration {
|
if obj.StreamingConnectionIdleTimeout == zeroDuration {
|
||||||
obj.StreamingConnectionIdleTimeout = unversioned.Duration{Duration: 4 * time.Hour}
|
obj.StreamingConnectionIdleTimeout = unversioned.Duration{Duration: 4 * time.Hour}
|
||||||
|
@ -374,8 +374,6 @@ type KubeletConfiguration struct {
|
|||||||
// experimentalMounterPath is the path to mounter binary. If not set, kubelet will attempt to use mount
|
// experimentalMounterPath is the path to mounter binary. If not set, kubelet will attempt to use mount
|
||||||
// binary that is available via $PATH,
|
// binary that is available via $PATH,
|
||||||
ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
|
ExperimentalMounterPath string `json:"experimentalMounterPath,omitempty"`
|
||||||
// experimentalMounterRootfsPath is the absolute path to root filesystem for the mounter binary.
|
|
||||||
ExperimentalMounterRootfsPath string `json:"experimentalMounterRootfsPath,omitempty"`
|
|
||||||
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
// rktApiEndpoint is the endpoint of the rkt API service to communicate with.
|
||||||
RktAPIEndpoint string `json:"rktAPIEndpoint"`
|
RktAPIEndpoint string `json:"rktAPIEndpoint"`
|
||||||
// rktStage1Image is the image to use as stage1. Local paths and
|
// rktStage1Image is the image to use as stage1. Local paths and
|
||||||
@ -507,6 +505,10 @@ type KubeletConfiguration struct {
|
|||||||
// TODO(#34726:1.8.0): Remove the opt-in for failing when swap is enabled.
|
// 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.
|
// Tells the Kubelet to fail to start if swap is enabled on the node.
|
||||||
ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"`
|
ExperimentalFailSwapOn bool `json:"experimentalFailSwapOn,omitempty"`
|
||||||
|
// 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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type KubeletAuthorizationMode string
|
type KubeletAuthorizationMode string
|
||||||
|
@ -340,7 +340,6 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu
|
|||||||
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
||||||
out.RktPath = in.RktPath
|
out.RktPath = in.RktPath
|
||||||
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
||||||
out.ExperimentalMounterRootfsPath = in.ExperimentalMounterRootfsPath
|
|
||||||
out.RktAPIEndpoint = in.RktAPIEndpoint
|
out.RktAPIEndpoint = in.RktAPIEndpoint
|
||||||
out.RktStage1Image = in.RktStage1Image
|
out.RktStage1Image = in.RktStage1Image
|
||||||
if err := api.Convert_Pointer_string_To_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
|
if err := api.Convert_Pointer_string_To_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
|
||||||
@ -408,6 +407,7 @@ func autoConvert_v1alpha1_KubeletConfiguration_To_componentconfig_KubeletConfigu
|
|||||||
out.FeatureGates = in.FeatureGates
|
out.FeatureGates = in.FeatureGates
|
||||||
out.EnableCRI = in.EnableCRI
|
out.EnableCRI = in.EnableCRI
|
||||||
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
||||||
|
out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,7 +509,6 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu
|
|||||||
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
||||||
out.RktPath = in.RktPath
|
out.RktPath = in.RktPath
|
||||||
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
||||||
out.ExperimentalMounterRootfsPath = in.ExperimentalMounterRootfsPath
|
|
||||||
out.RktAPIEndpoint = in.RktAPIEndpoint
|
out.RktAPIEndpoint = in.RktAPIEndpoint
|
||||||
out.RktStage1Image = in.RktStage1Image
|
out.RktStage1Image = in.RktStage1Image
|
||||||
if err := api.Convert_string_To_Pointer_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
|
if err := api.Convert_string_To_Pointer_string(&in.LockFilePath, &out.LockFilePath, s); err != nil {
|
||||||
@ -577,6 +576,7 @@ func autoConvert_componentconfig_KubeletConfiguration_To_v1alpha1_KubeletConfigu
|
|||||||
out.FeatureGates = in.FeatureGates
|
out.FeatureGates = in.FeatureGates
|
||||||
out.EnableCRI = in.EnableCRI
|
out.EnableCRI = in.EnableCRI
|
||||||
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
||||||
|
out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,6 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c *
|
|||||||
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
||||||
out.RktPath = in.RktPath
|
out.RktPath = in.RktPath
|
||||||
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
||||||
out.ExperimentalMounterRootfsPath = in.ExperimentalMounterRootfsPath
|
|
||||||
out.RktAPIEndpoint = in.RktAPIEndpoint
|
out.RktAPIEndpoint = in.RktAPIEndpoint
|
||||||
out.RktStage1Image = in.RktStage1Image
|
out.RktStage1Image = in.RktStage1Image
|
||||||
if in.LockFilePath != nil {
|
if in.LockFilePath != nil {
|
||||||
@ -462,6 +461,7 @@ func DeepCopy_v1alpha1_KubeletConfiguration(in interface{}, out interface{}, c *
|
|||||||
out.FeatureGates = in.FeatureGates
|
out.FeatureGates = in.FeatureGates
|
||||||
out.EnableCRI = in.EnableCRI
|
out.EnableCRI = in.EnableCRI
|
||||||
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
||||||
|
out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,6 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface
|
|||||||
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
out.RuntimeRequestTimeout = in.RuntimeRequestTimeout
|
||||||
out.RktPath = in.RktPath
|
out.RktPath = in.RktPath
|
||||||
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
out.ExperimentalMounterPath = in.ExperimentalMounterPath
|
||||||
out.ExperimentalMounterRootfsPath = in.ExperimentalMounterRootfsPath
|
|
||||||
out.RktAPIEndpoint = in.RktAPIEndpoint
|
out.RktAPIEndpoint = in.RktAPIEndpoint
|
||||||
out.RktStage1Image = in.RktStage1Image
|
out.RktStage1Image = in.RktStage1Image
|
||||||
out.LockFilePath = in.LockFilePath
|
out.LockFilePath = in.LockFilePath
|
||||||
@ -393,6 +392,7 @@ func DeepCopy_componentconfig_KubeletConfiguration(in interface{}, out interface
|
|||||||
out.FeatureGates = in.FeatureGates
|
out.FeatureGates = in.FeatureGates
|
||||||
out.EnableCRI = in.EnableCRI
|
out.EnableCRI = in.EnableCRI
|
||||||
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
out.ExperimentalFailSwapOn = in.ExperimentalFailSwapOn
|
||||||
|
out.ExperimentalCheckNodeCapabilitiesBeforeMount = in.ExperimentalCheckNodeCapabilitiesBeforeMount
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -898,6 +898,7 @@ var (
|
|||||||
VsphereVolume FSType = "vsphereVolume"
|
VsphereVolume FSType = "vsphereVolume"
|
||||||
Quobyte FSType = "quobyte"
|
Quobyte FSType = "quobyte"
|
||||||
AzureDisk FSType = "azureDisk"
|
AzureDisk FSType = "azureDisk"
|
||||||
|
PhotonPersistentDisk FSType = "photonPersistentDisk"
|
||||||
All FSType = "*"
|
All FSType = "*"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -40,17 +40,10 @@ type PodDisruptionBudgetSpec struct {
|
|||||||
// PodDisruptionBudgetStatus represents information about the status of a
|
// PodDisruptionBudgetStatus represents information about the status of a
|
||||||
// PodDisruptionBudget. Status may trail the actual state of a system.
|
// PodDisruptionBudget. Status may trail the actual state of a system.
|
||||||
type PodDisruptionBudgetStatus struct {
|
type PodDisruptionBudgetStatus struct {
|
||||||
// Number of pod disruptions that are currently allowed.
|
// Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
|
||||||
PodDisruptionsAllowed int32 `json:"disruptionsAllowed"`
|
// status informatio is valid only if observedGeneration equals to PDB's object generation.
|
||||||
|
// +optional
|
||||||
// current number of healthy pods
|
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||||
CurrentHealthy int32 `json:"currentHealthy"`
|
|
||||||
|
|
||||||
// minimum desired number of healthy pods
|
|
||||||
DesiredHealthy int32 `json:"desiredHealthy"`
|
|
||||||
|
|
||||||
// total number of pods counted by this disruption budget
|
|
||||||
ExpectedPods int32 `json:"expectedPods"`
|
|
||||||
|
|
||||||
// DisruptedPods contains information about pods whose eviction was
|
// DisruptedPods contains information about pods whose eviction was
|
||||||
// processed by the API server eviction subresource handler but has not
|
// processed by the API server eviction subresource handler but has not
|
||||||
@ -64,6 +57,18 @@ type PodDisruptionBudgetStatus struct {
|
|||||||
// If everything goes smooth this map should be empty for the most of the 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.
|
// Large number of entries in the map may indicate problems with pod deletions.
|
||||||
DisruptedPods map[string]unversioned.Time `json:"disruptedPods" protobuf:"bytes,5,rep,name=disruptedPods"`
|
DisruptedPods map[string]unversioned.Time `json:"disruptedPods" protobuf:"bytes,5,rep,name=disruptedPods"`
|
||||||
|
|
||||||
|
// Number of pod disruptions that are currently allowed.
|
||||||
|
PodDisruptionsAllowed int32 `json:"disruptionsAllowed"`
|
||||||
|
|
||||||
|
// current number of healthy pods
|
||||||
|
CurrentHealthy int32 `json:"currentHealthy"`
|
||||||
|
|
||||||
|
// minimum desired number of healthy pods
|
||||||
|
DesiredHealthy int32 `json:"desiredHealthy"`
|
||||||
|
|
||||||
|
// total number of pods counted by this disruption budget
|
||||||
|
ExpectedPods int32 `json:"expectedPods"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +genclient=true
|
// +genclient=true
|
||||||
|
@ -253,19 +253,10 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(data []byte) (int, error) {
|
|||||||
_ = l
|
_ = l
|
||||||
data[i] = 0x8
|
data[i] = 0x8
|
||||||
i++
|
i++
|
||||||
i = encodeVarintGenerated(data, i, uint64(m.PodDisruptionsAllowed))
|
i = encodeVarintGenerated(data, i, uint64(m.ObservedGeneration))
|
||||||
data[i] = 0x10
|
|
||||||
i++
|
|
||||||
i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy))
|
|
||||||
data[i] = 0x18
|
|
||||||
i++
|
|
||||||
i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy))
|
|
||||||
data[i] = 0x20
|
|
||||||
i++
|
|
||||||
i = encodeVarintGenerated(data, i, uint64(m.ExpectedPods))
|
|
||||||
if len(m.DisruptedPods) > 0 {
|
if len(m.DisruptedPods) > 0 {
|
||||||
for k := range m.DisruptedPods {
|
for k := range m.DisruptedPods {
|
||||||
data[i] = 0x2a
|
data[i] = 0x12
|
||||||
i++
|
i++
|
||||||
v := m.DisruptedPods[k]
|
v := m.DisruptedPods[k]
|
||||||
msgSize := (&v).Size()
|
msgSize := (&v).Size()
|
||||||
@ -285,6 +276,18 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(data []byte) (int, error) {
|
|||||||
i += n9
|
i += n9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
data[i] = 0x18
|
||||||
|
i++
|
||||||
|
i = encodeVarintGenerated(data, i, uint64(m.PodDisruptionsAllowed))
|
||||||
|
data[i] = 0x20
|
||||||
|
i++
|
||||||
|
i = encodeVarintGenerated(data, i, uint64(m.CurrentHealthy))
|
||||||
|
data[i] = 0x28
|
||||||
|
i++
|
||||||
|
i = encodeVarintGenerated(data, i, uint64(m.DesiredHealthy))
|
||||||
|
data[i] = 0x30
|
||||||
|
i++
|
||||||
|
i = encodeVarintGenerated(data, i, uint64(m.ExpectedPods))
|
||||||
return i, nil
|
return i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,10 +371,7 @@ func (m *PodDisruptionBudgetSpec) Size() (n int) {
|
|||||||
func (m *PodDisruptionBudgetStatus) Size() (n int) {
|
func (m *PodDisruptionBudgetStatus) Size() (n int) {
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed))
|
n += 1 + sovGenerated(uint64(m.ObservedGeneration))
|
||||||
n += 1 + sovGenerated(uint64(m.CurrentHealthy))
|
|
||||||
n += 1 + sovGenerated(uint64(m.DesiredHealthy))
|
|
||||||
n += 1 + sovGenerated(uint64(m.ExpectedPods))
|
|
||||||
if len(m.DisruptedPods) > 0 {
|
if len(m.DisruptedPods) > 0 {
|
||||||
for k, v := range m.DisruptedPods {
|
for k, v := range m.DisruptedPods {
|
||||||
_ = k
|
_ = k
|
||||||
@ -381,6 +381,10 @@ func (m *PodDisruptionBudgetStatus) Size() (n int) {
|
|||||||
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
|
n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed))
|
||||||
|
n += 1 + sovGenerated(uint64(m.CurrentHealthy))
|
||||||
|
n += 1 + sovGenerated(uint64(m.DesiredHealthy))
|
||||||
|
n += 1 + sovGenerated(uint64(m.ExpectedPods))
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,11 +461,12 @@ func (this *PodDisruptionBudgetStatus) String() string {
|
|||||||
}
|
}
|
||||||
mapStringForDisruptedPods += "}"
|
mapStringForDisruptedPods += "}"
|
||||||
s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
|
s := strings.Join([]string{`&PodDisruptionBudgetStatus{`,
|
||||||
|
`ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`,
|
||||||
|
`DisruptedPods:` + mapStringForDisruptedPods + `,`,
|
||||||
`PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
|
`PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`,
|
||||||
`CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
|
`CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`,
|
||||||
`DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
|
`DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`,
|
||||||
`ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
|
`ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`,
|
||||||
`DisruptedPods:` + mapStringForDisruptedPods + `,`,
|
|
||||||
`}`,
|
`}`,
|
||||||
}, "")
|
}, "")
|
||||||
return s
|
return s
|
||||||
@ -982,9 +987,9 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error {
|
|||||||
switch fieldNum {
|
switch fieldNum {
|
||||||
case 1:
|
case 1:
|
||||||
if wireType != 0 {
|
if wireType != 0 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType)
|
||||||
}
|
}
|
||||||
m.PodDisruptionsAllowed = 0
|
m.ObservedGeneration = 0
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
if shift >= 64 {
|
if shift >= 64 {
|
||||||
return ErrIntOverflowGenerated
|
return ErrIntOverflowGenerated
|
||||||
@ -994,69 +999,12 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error {
|
|||||||
}
|
}
|
||||||
b := data[iNdEx]
|
b := data[iNdEx]
|
||||||
iNdEx++
|
iNdEx++
|
||||||
m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift
|
m.ObservedGeneration |= (int64(b) & 0x7F) << shift
|
||||||
if b < 0x80 {
|
if b < 0x80 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if wireType != 0 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
|
|
||||||
}
|
|
||||||
m.CurrentHealthy = 0
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowGenerated
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := data[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
m.CurrentHealthy |= (int32(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
if wireType != 0 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
|
|
||||||
}
|
|
||||||
m.DesiredHealthy = 0
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowGenerated
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := data[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
m.DesiredHealthy |= (int32(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
if wireType != 0 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
|
|
||||||
}
|
|
||||||
m.ExpectedPods = 0
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowGenerated
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := data[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
m.ExpectedPods |= (int32(b) & 0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 5:
|
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType)
|
||||||
}
|
}
|
||||||
@ -1172,6 +1120,82 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(data []byte) error {
|
|||||||
}
|
}
|
||||||
m.DisruptedPods[mapkey] = *mapvalue
|
m.DisruptedPods[mapkey] = *mapvalue
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType)
|
||||||
|
}
|
||||||
|
m.PodDisruptionsAllowed = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenerated
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := data[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType)
|
||||||
|
}
|
||||||
|
m.CurrentHealthy = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenerated
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := data[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.CurrentHealthy |= (int32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType)
|
||||||
|
}
|
||||||
|
m.DesiredHealthy = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenerated
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := data[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.DesiredHealthy |= (int32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 6:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType)
|
||||||
|
}
|
||||||
|
m.ExpectedPods = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowGenerated
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := data[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.ExpectedPods |= (int32(b) & 0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipGenerated(data[iNdEx:])
|
skippy, err := skipGenerated(data[iNdEx:])
|
||||||
@ -1299,51 +1323,53 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var fileDescriptorGenerated = []byte{
|
var fileDescriptorGenerated = []byte{
|
||||||
// 728 bytes of a gzipped FileDescriptorProto
|
// 758 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x6e, 0xd3, 0x4e,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x6f, 0xdb, 0x36,
|
||||||
0x10, 0xc7, 0xe3, 0x26, 0xe9, 0x2f, 0xbf, 0x6d, 0x52, 0x95, 0x85, 0x42, 0x88, 0x84, 0x8b, 0x72,
|
0x14, 0xc7, 0xad, 0xd8, 0xce, 0x3c, 0xc6, 0x0e, 0x32, 0x6e, 0xd9, 0x3c, 0x03, 0x53, 0x06, 0x9f,
|
||||||
0x6a, 0x05, 0x5d, 0x2b, 0x15, 0x48, 0x85, 0x43, 0xa5, 0x9a,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0xa1, 0x91, 0x74, 0x1c, 0x90,
|
||||||
0x0f, 0x02, 0x60, 0xb6, 0x00, 0x97, 0x44, 0x2c, 0x14, 0x21, 0x5e, 0x1b, 0xa0, 0xe4, 0x02, 0x25,
|
0x76, 0xc7, 0xf0, 0x21, 0x04, 0x6e, 0x4b, 0xf0, 0x48, 0xc4, 0x99, 0x64, 0x78, 0x27, 0x47, 0xc9,
|
||||||
0x51, 0xdb, 0x23, 0x09, 0x4a, 0x06, 0x28, 0x51, 0x68, 0x6d, 0xdd, 0xa3, 0xe2, 0x28, 0x6e, 0x11,
|
0x2d, 0x4a, 0xa2, 0xbe, 0x4f, 0x52, 0x94, 0xe4, 0x28, 0x51, 0x68, 0x6b, 0xd7, 0xa7, 0xf2, 0x3c,
|
||||||
0x27, 0xec, 0x18, 0x5e, 0xe8, 0x85, 0x86, 0x54, 0x68, 0xc5, 0xef, 0xe5, 0x4a, 0x2e, 0xe4, 0xd7,
|
0x76, 0x88, 0xcb, 0x06, 0x86, 0xcf, 0x7c, 0x66, 0x64, 0x0a, 0x4e, 0xfc, 0x38, 0x5b, 0x65, 0x8b,
|
||||||
0x40, 0xb9, 0xb6, 0x31, 0xb3, 0x28, 0x83, 0x01, 0x0f, 0x63, 0xe6, 0xc0, 0x78, 0x35, 0xb5, 0xc7,
|
0xec, 0x2b, 0x57, 0x6e, 0xed, 0x2d, 0x4d, 0xca, 0xe0, 0x20, 0x58, 0xcc, 0x5d, 0x98, 0xcd, 0xa6,
|
||||||
0xb3, 0x99, 0x38, 0xe8, 0x02, 0xe3, 0x34, 0x0c, 0xc0, 0x9d, 0xc0, 0x1e, 0xce, 0xc6, 0xba, 0x13,
|
0xf5, 0xf3, 0x72, 0x26, 0x0e, 0x13, 0xe0, 0x82, 0xb2, 0x10, 0xbc, 0x39, 0xec, 0xc7, 0xe5, 0x58,
|
||||||
0x96, 0x6b, 0xeb, 0xd3, 0xa3, 0x59, 0x1c, 0x08, 0xda, 0x99, 0xac, 0xa9, 0x31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x00,
|
||||||
}
|
}
|
||||||
|
@ -75,17 +75,10 @@ message PodDisruptionBudgetSpec {
|
|||||||
// PodDisruptionBudgetStatus represents information about the status of a
|
// PodDisruptionBudgetStatus represents information about the status of a
|
||||||
// PodDisruptionBudget. Status may trail the actual state of a system.
|
// PodDisruptionBudget. Status may trail the actual state of a system.
|
||||||
message PodDisruptionBudgetStatus {
|
message PodDisruptionBudgetStatus {
|
||||||
// Number of pod disruptions that are currently allowed.
|
// Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
|
||||||
optional int32 disruptionsAllowed = 1;
|
// status informatio is valid only if observedGeneration equals to PDB's object generation.
|
||||||
|
// +optional
|
||||||
// current number of healthy pods
|
optional int64 observedGeneration = 1;
|
||||||
optional int32 currentHealthy = 2;
|
|
||||||
|
|
||||||
// minimum desired number of healthy pods
|
|
||||||
optional int32 desiredHealthy = 3;
|
|
||||||
|
|
||||||
// total number of pods counted by this disruption budget
|
|
||||||
optional int32 expectedPods = 4;
|
|
||||||
|
|
||||||
// DisruptedPods contains information about pods whose eviction was
|
// DisruptedPods contains information about pods whose eviction was
|
||||||
// processed by the API server eviction subresource handler but has not
|
// processed by the API server eviction subresource handler but has not
|
||||||
@ -98,6 +91,18 @@ message PodDisruptionBudgetStatus {
|
|||||||
// the list automatically by PodDisruptionBudget controller after some time.
|
// the list automatically by PodDisruptionBudget controller after some time.
|
||||||
// If everything goes smooth this map should be empty for the most of the 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.
|
// Large number of entries in the map may indicate problems with pod deletions.
|
||||||
map<string, k8s.io.kubernetes.pkg.api.unversioned.Time> disruptedPods = 5;
|
map<string, k8s.io.kubernetes.pkg.api.unversioned.Time> disruptedPods = 2;
|
||||||
|
|
||||||
|
// Number of pod disruptions that are currently allowed.
|
||||||
|
optional int32 disruptionsAllowed = 3;
|
||||||
|
|
||||||
|
// current number of healthy pods
|
||||||
|
optional int32 currentHealthy = 4;
|
||||||
|
|
||||||
|
// minimum desired number of healthy pods
|
||||||
|
optional int32 desiredHealthy = 5;
|
||||||
|
|
||||||
|
// total number of pods counted by this disruption budget
|
||||||
|
optional int32 expectedPods = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -38,17 +38,10 @@ type PodDisruptionBudgetSpec struct {
|
|||||||
// PodDisruptionBudgetStatus represents information about the status of a
|
// PodDisruptionBudgetStatus represents information about the status of a
|
||||||
// PodDisruptionBudget. Status may trail the actual state of a system.
|
// PodDisruptionBudget. Status may trail the actual state of a system.
|
||||||
type PodDisruptionBudgetStatus struct {
|
type PodDisruptionBudgetStatus struct {
|
||||||
// Number of pod disruptions that are currently allowed.
|
// Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other
|
||||||
PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,1,opt,name=disruptionsAllowed"`
|
// status informatio is valid only if observedGeneration equals to PDB's object generation.
|
||||||
|
// +optional
|
||||||
// current number of healthy pods
|
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,2,opt,name=currentHealthy"`
|
|
||||||
|
|
||||||
// minimum desired number of healthy pods
|
|
||||||
DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,3,opt,name=desiredHealthy"`
|
|
||||||
|
|
||||||
// total number of pods counted by this disruption budget
|
|
||||||
ExpectedPods int32 `json:"expectedPods" protobuf:"varint,4,opt,name=expectedPods"`
|
|
||||||
|
|
||||||
// DisruptedPods contains information about pods whose eviction was
|
// DisruptedPods contains information about pods whose eviction was
|
||||||
// processed by the API server eviction subresource handler but has not
|
// processed by the API server eviction subresource handler but has not
|
||||||
@ -61,7 +54,19 @@ type PodDisruptionBudgetStatus struct {
|
|||||||
// the list automatically by PodDisruptionBudget controller after some time.
|
// the list automatically by PodDisruptionBudget controller after some time.
|
||||||
// If everything goes smooth this map should be empty for the most of the 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.
|
// Large number of entries in the map may indicate problems with pod deletions.
|
||||||
DisruptedPods map[string]unversioned.Time `json:"disruptedPods" protobuf:"bytes,5,rep,name=disruptedPods"`
|
DisruptedPods map[string]unversioned.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"`
|
||||||
|
|
||||||
|
// Number of pod disruptions that are currently allowed.
|
||||||
|
PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"`
|
||||||
|
|
||||||
|
// current number of healthy pods
|
||||||
|
CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"`
|
||||||
|
|
||||||
|
// minimum desired number of healthy pods
|
||||||
|
DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"`
|
||||||
|
|
||||||
|
// total number of pods counted by this disruption budget
|
||||||
|
ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +genclient=true
|
// +genclient=true
|
||||||
|
@ -67,11 +67,12 @@ func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_PodDisruptionBudgetStatus = map[string]string{
|
var map_PodDisruptionBudgetStatus = map[string]string{
|
||||||
"": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
|
"": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.",
|
||||||
|
"observedGeneration": "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.",
|
||||||
|
"disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from 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.",
|
||||||
"disruptionsAllowed": "Number of pod disruptions that are currently allowed.",
|
"disruptionsAllowed": "Number of pod disruptions that are currently allowed.",
|
||||||
"currentHealthy": "current number of healthy pods",
|
"currentHealthy": "current number of healthy pods",
|
||||||
"desiredHealthy": "minimum desired number of healthy pods",
|
"desiredHealthy": "minimum desired number of healthy pods",
|
||||||
"expectedPods": "total number of pods counted by this disruption budget",
|
"expectedPods": "total number of pods counted by this disruption budget",
|
||||||
"disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from 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.",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
|
func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string {
|
||||||
|
@ -154,11 +154,12 @@ func Convert_policy_PodDisruptionBudgetSpec_To_v1beta1_PodDisruptionBudgetSpec(i
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
|
func autoConvert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStatus(in *PodDisruptionBudgetStatus, out *policy.PodDisruptionBudgetStatus, s conversion.Scope) error {
|
||||||
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
|
out.DisruptedPods = *(*map[string]unversioned.Time)(unsafe.Pointer(&in.DisruptedPods))
|
||||||
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
||||||
out.CurrentHealthy = in.CurrentHealthy
|
out.CurrentHealthy = in.CurrentHealthy
|
||||||
out.DesiredHealthy = in.DesiredHealthy
|
out.DesiredHealthy = in.DesiredHealthy
|
||||||
out.ExpectedPods = in.ExpectedPods
|
out.ExpectedPods = in.ExpectedPods
|
||||||
out.DisruptedPods = *(*map[string]unversioned.Time)(unsafe.Pointer(&in.DisruptedPods))
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,11 +168,12 @@ func Convert_v1beta1_PodDisruptionBudgetStatus_To_policy_PodDisruptionBudgetStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
|
func autoConvert_policy_PodDisruptionBudgetStatus_To_v1beta1_PodDisruptionBudgetStatus(in *policy.PodDisruptionBudgetStatus, out *PodDisruptionBudgetStatus, s conversion.Scope) error {
|
||||||
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
|
out.DisruptedPods = *(*map[string]unversioned.Time)(unsafe.Pointer(&in.DisruptedPods))
|
||||||
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
||||||
out.CurrentHealthy = in.CurrentHealthy
|
out.CurrentHealthy = in.CurrentHealthy
|
||||||
out.DesiredHealthy = in.DesiredHealthy
|
out.DesiredHealthy = in.DesiredHealthy
|
||||||
out.ExpectedPods = in.ExpectedPods
|
out.ExpectedPods = in.ExpectedPods
|
||||||
out.DisruptedPods = *(*map[string]unversioned.Time)(unsafe.Pointer(&in.DisruptedPods))
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,10 +126,7 @@ func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{},
|
|||||||
{
|
{
|
||||||
in := in.(*PodDisruptionBudgetStatus)
|
in := in.(*PodDisruptionBudgetStatus)
|
||||||
out := out.(*PodDisruptionBudgetStatus)
|
out := out.(*PodDisruptionBudgetStatus)
|
||||||
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
out.CurrentHealthy = in.CurrentHealthy
|
|
||||||
out.DesiredHealthy = in.DesiredHealthy
|
|
||||||
out.ExpectedPods = in.ExpectedPods
|
|
||||||
if in.DisruptedPods != nil {
|
if in.DisruptedPods != nil {
|
||||||
in, out := &in.DisruptedPods, &out.DisruptedPods
|
in, out := &in.DisruptedPods, &out.DisruptedPods
|
||||||
*out = make(map[string]unversioned.Time)
|
*out = make(map[string]unversioned.Time)
|
||||||
@ -139,6 +136,10 @@ func DeepCopy_v1beta1_PodDisruptionBudgetStatus(in interface{}, out interface{},
|
|||||||
} else {
|
} else {
|
||||||
out.DisruptedPods = nil
|
out.DisruptedPods = nil
|
||||||
}
|
}
|
||||||
|
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
||||||
|
out.CurrentHealthy = in.CurrentHealthy
|
||||||
|
out.DesiredHealthy = in.DesiredHealthy
|
||||||
|
out.ExpectedPods = in.ExpectedPods
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,10 +126,7 @@ func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{},
|
|||||||
{
|
{
|
||||||
in := in.(*PodDisruptionBudgetStatus)
|
in := in.(*PodDisruptionBudgetStatus)
|
||||||
out := out.(*PodDisruptionBudgetStatus)
|
out := out.(*PodDisruptionBudgetStatus)
|
||||||
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
out.ObservedGeneration = in.ObservedGeneration
|
||||||
out.CurrentHealthy = in.CurrentHealthy
|
|
||||||
out.DesiredHealthy = in.DesiredHealthy
|
|
||||||
out.ExpectedPods = in.ExpectedPods
|
|
||||||
if in.DisruptedPods != nil {
|
if in.DisruptedPods != nil {
|
||||||
in, out := &in.DisruptedPods, &out.DisruptedPods
|
in, out := &in.DisruptedPods, &out.DisruptedPods
|
||||||
*out = make(map[string]unversioned.Time)
|
*out = make(map[string]unversioned.Time)
|
||||||
@ -139,6 +136,10 @@ func DeepCopy_policy_PodDisruptionBudgetStatus(in interface{}, out interface{},
|
|||||||
} else {
|
} else {
|
||||||
out.DisruptedPods = nil
|
out.DisruptedPods = nil
|
||||||
}
|
}
|
||||||
|
out.PodDisruptionsAllowed = in.PodDisruptionsAllowed
|
||||||
|
out.CurrentHealthy = in.CurrentHealthy
|
||||||
|
out.DesiredHealthy = in.DesiredHealthy
|
||||||
|
out.ExpectedPods = in.ExpectedPods
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,7 @@ func (i *DefaultInfo) GetExtra() map[string][]string {
|
|||||||
// well-known user and group names
|
// well-known user and group names
|
||||||
const (
|
const (
|
||||||
SystemPrivilegedGroup = "system:masters"
|
SystemPrivilegedGroup = "system:masters"
|
||||||
|
NodesGroup = "system:nodes"
|
||||||
AllUnauthenticated = "system:unauthenticated"
|
AllUnauthenticated = "system:unauthenticated"
|
||||||
AllAuthenticated = "system:authenticated"
|
AllAuthenticated = "system:authenticated"
|
||||||
|
|
||||||
|
@ -36,33 +36,42 @@ var ForeverTestTimeout = time.Second * 30
|
|||||||
// NeverStop may be passed to Until to make it never stop.
|
// NeverStop may be passed to Until to make it never stop.
|
||||||
var NeverStop <-chan struct{} = make(chan struct{})
|
var NeverStop <-chan struct{} = make(chan struct{})
|
||||||
|
|
||||||
// Forever is syntactic sugar on top of Until
|
// Forever calls f every period for ever.
|
||||||
|
//
|
||||||
|
// Forever is syntactic sugar on top of Until.
|
||||||
func Forever(f func(), period time.Duration) {
|
func Forever(f func(), period time.Duration) {
|
||||||
Until(f, period, NeverStop)
|
Until(f, period, NeverStop)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Until loops until stop channel is closed, running f every period.
|
// Until loops until stop channel is closed, running f every period.
|
||||||
// Until is syntactic sugar on top of JitterUntil with zero jitter
|
//
|
||||||
// factor, with sliding = true (which means the timer for period
|
// Until is syntactic sugar on top of JitterUntil with zero jitter factor and
|
||||||
// starts after the f completes).
|
// with sliding = true (which means the timer for period starts after the f
|
||||||
|
// completes).
|
||||||
func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
|
func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
|
||||||
JitterUntil(f, period, 0.0, true, stopCh)
|
JitterUntil(f, period, 0.0, true, stopCh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NonSlidingUntil loops until stop channel is closed, running f every
|
// NonSlidingUntil loops until stop channel is closed, running f every
|
||||||
// period. NonSlidingUntil is syntactic sugar on top of JitterUntil
|
// period.
|
||||||
// with zero jitter factor, with sliding = false (meaning the timer for
|
//
|
||||||
// period starts at the same time as the function starts).
|
// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter
|
||||||
|
// factor, with sliding = false (meaning the timer for period starts at the same
|
||||||
|
// time as the function starts).
|
||||||
func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) {
|
func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) {
|
||||||
JitterUntil(f, period, 0.0, false, stopCh)
|
JitterUntil(f, period, 0.0, false, stopCh)
|
||||||
}
|
}
|
||||||
|
|
||||||
// JitterUntil loops until stop channel is closed, running f every period.
|
// JitterUntil loops until stop channel is closed, running f every period.
|
||||||
|
//
|
||||||
// If jitterFactor is positive, the period is jittered before every run of f.
|
// If jitterFactor is positive, the period is jittered before every run of f.
|
||||||
// If jitterFactor is not positive, the period is unchanged.
|
// If jitterFactor is not positive, the period is unchanged and not jitterd.
|
||||||
// Catches any panics, and keeps going. f may not be invoked if
|
//
|
||||||
// stop channel is already closed. Pass NeverStop to Until if you
|
// If slidingis true, the period is computed after f runs. If it is false then
|
||||||
// don't want it stop.
|
// period includes the runtime for f.
|
||||||
|
//
|
||||||
|
// Close stopCh to stop. f may not be invoked if stop channel is already
|
||||||
|
// closed. Pass NeverStop to if you don't want it stop.
|
||||||
func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
|
func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
|
||||||
for {
|
for {
|
||||||
|
|
||||||
@ -104,9 +113,11 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Jitter returns a time.Duration between duration and duration + maxFactor * duration,
|
// Jitter returns a time.Duration between duration and duration + maxFactor *
|
||||||
// to allow clients to avoid converging on periodic behavior. If maxFactor is 0.0, a
|
// duration.
|
||||||
// suggested default value will be chosen.
|
//
|
||||||
|
// This allows clients to avoid converging on periodic behavior. If maxFactor
|
||||||
|
// is 0.0, a suggested default value will be chosen.
|
||||||
func Jitter(duration time.Duration, maxFactor float64) time.Duration {
|
func Jitter(duration time.Duration, maxFactor float64) time.Duration {
|
||||||
if maxFactor <= 0.0 {
|
if maxFactor <= 0.0 {
|
||||||
maxFactor = 1.0
|
maxFactor = 1.0
|
||||||
@ -115,26 +126,31 @@ func Jitter(duration time.Duration, maxFactor float64) time.Duration {
|
|||||||
return wait
|
return wait
|
||||||
}
|
}
|
||||||
|
|
||||||
// ErrWaitTimeout is returned when the condition exited without success
|
// ErrWaitTimeout is returned when the condition exited without success.
|
||||||
var ErrWaitTimeout = errors.New("timed out waiting for the condition")
|
var ErrWaitTimeout = errors.New("timed out waiting for the condition")
|
||||||
|
|
||||||
// ConditionFunc returns true if the condition is satisfied, or an error
|
// ConditionFunc returns true if the condition is satisfied, or an error
|
||||||
// if the loop should be aborted.
|
// if the loop should be aborted.
|
||||||
type ConditionFunc func() (done bool, err error)
|
type ConditionFunc func() (done bool, err error)
|
||||||
|
|
||||||
// Backoff is parameters applied to a Backoff function.
|
// Backoff holds parameters applied to a Backoff function.
|
||||||
type Backoff struct {
|
type Backoff struct {
|
||||||
Duration time.Duration
|
Duration time.Duration // the base duration
|
||||||
Factor float64
|
Factor float64 // Duration is multipled by factor each iteration
|
||||||
Jitter float64
|
Jitter float64 // The amount of jitter applied each iteration
|
||||||
Steps int
|
Steps int // Exit with error after this many steps
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExponentialBackoff repeats a condition check up to steps times, increasing the wait
|
// ExponentialBackoff repeats a condition check with exponential backoff.
|
||||||
// by multipling the previous duration by factor. If jitter is greater than zero,
|
//
|
||||||
// a random amount of each duration is added (between duration and duration*(1+jitter)).
|
// It checks the condition up to Steps times, increasing the wait by multipling
|
||||||
// If the condition never returns true, ErrWaitTimeout is returned. All other errors
|
// the previous duration by Factor.
|
||||||
// terminate immediately.
|
//
|
||||||
|
// If Jitter is greater than zero, a random amount of each duration is added
|
||||||
|
// (between duration and duration*(1+jitter)).
|
||||||
|
//
|
||||||
|
// If the condition never returns true, ErrWaitTimeout is returned. All other
|
||||||
|
// errors terminate immediately.
|
||||||
func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
|
func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
|
||||||
duration := backoff.Duration
|
duration := backoff.Duration
|
||||||
for i := 0; i < backoff.Steps; i++ {
|
for i := 0; i < backoff.Steps; i++ {
|
||||||
@ -154,22 +170,33 @@ func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Poll tries a condition func until it returns true, an error, or the timeout
|
// Poll tries a condition func until it returns true, an error, or the timeout
|
||||||
// is reached. condition will always be invoked at least once but some intervals
|
// is reached.
|
||||||
// may be missed if the condition takes too long or the time window is too short.
|
//
|
||||||
|
// Poll always waits the interval before the run of 'condition'.
|
||||||
|
// 'condition' will always be invoked at least once.
|
||||||
|
//
|
||||||
|
// Some intervals may be missed if the condition takes too long or the time
|
||||||
|
// window is too short.
|
||||||
|
//
|
||||||
// If you want to Poll something forever, see PollInfinite.
|
// If you want to Poll something forever, see PollInfinite.
|
||||||
// Poll always waits the interval before the first check of the condition.
|
|
||||||
func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
|
func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
|
||||||
return pollInternal(poller(interval, timeout), condition)
|
return pollInternal(poller(interval, timeout), condition)
|
||||||
}
|
}
|
||||||
|
|
||||||
func pollInternal(wait WaitFunc, condition ConditionFunc) error {
|
func pollInternal(wait WaitFunc, condition ConditionFunc) error {
|
||||||
done := make(chan struct{})
|
return WaitFor(wait, condition, NeverStop)
|
||||||
defer close(done)
|
|
||||||
return WaitFor(wait, condition, done)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollImmediate is identical to Poll, except that it performs the first check
|
// PollImmediate tries a condition func until it returns true, an error, or the timeout
|
||||||
// immediately, not waiting interval beforehand.
|
// is reached.
|
||||||
|
//
|
||||||
|
// Poll always checks 'condition' before waiting for the interval. 'condition'
|
||||||
|
// will always be invoked at least once.
|
||||||
|
//
|
||||||
|
// Some intervals may be missed if the condition takes too long or the time
|
||||||
|
// window is too short.
|
||||||
|
//
|
||||||
|
// If you want to Poll something forever, see PollInfinite.
|
||||||
func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
|
func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
|
||||||
return pollImmediateInternal(poller(interval, timeout), condition)
|
return pollImmediateInternal(poller(interval, timeout), condition)
|
||||||
}
|
}
|
||||||
@ -185,16 +212,24 @@ func pollImmediateInternal(wait WaitFunc, condition ConditionFunc) error {
|
|||||||
return pollInternal(wait, condition)
|
return pollInternal(wait, condition)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollInfinite polls forever.
|
// PollInfinite tries a condition func until it returns true or an error
|
||||||
|
//
|
||||||
|
// PollInfinite always waits the interval before the run of 'condition'.
|
||||||
|
//
|
||||||
|
// Some intervals may be missed if the condition takes too long or the time
|
||||||
|
// window is too short.
|
||||||
func PollInfinite(interval time.Duration, condition ConditionFunc) error {
|
func PollInfinite(interval time.Duration, condition ConditionFunc) error {
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
defer close(done)
|
defer close(done)
|
||||||
return PollUntil(interval, condition, done)
|
return PollUntil(interval, condition, done)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollImmediateInfinite is identical to PollInfinite, except that it
|
// PollImmediateInfinite tries a condition func until it returns true or an error
|
||||||
// performs the first check immediately, not waiting interval
|
//
|
||||||
// beforehand.
|
// PollImmediateInfinite runs the 'condition' before waiting for the interval.
|
||||||
|
//
|
||||||
|
// Some intervals may be missed if the condition takes too long or the time
|
||||||
|
// window is too short.
|
||||||
func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error {
|
func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error {
|
||||||
done, err := condition()
|
done, err := condition()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -206,7 +241,11 @@ func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) erro
|
|||||||
return PollInfinite(interval, condition)
|
return PollInfinite(interval, condition)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollUntil is like Poll, but it takes a stop change instead of total duration
|
// PollUntil tries a condition func until it returns true, an error or stopCh is
|
||||||
|
// closed.
|
||||||
|
//
|
||||||
|
// PolUntil always waits interval before the first run of 'condition'.
|
||||||
|
// 'condition' will always be invoked at least once.
|
||||||
func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
|
func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
|
||||||
return WaitFor(poller(interval, 0), condition, stopCh)
|
return WaitFor(poller(interval, 0), condition, stopCh)
|
||||||
}
|
}
|
||||||
@ -215,11 +254,16 @@ func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan st
|
|||||||
// should be executed and is closed when the last test should be invoked.
|
// should be executed and is closed when the last test should be invoked.
|
||||||
type WaitFunc func(done <-chan struct{}) <-chan struct{}
|
type WaitFunc func(done <-chan struct{}) <-chan struct{}
|
||||||
|
|
||||||
// WaitFor gets a channel from wait(), and then invokes fn once for every value
|
// WaitFor continually checks 'fn' as driven by 'wait'.
|
||||||
// placed on the channel and once more when the channel is closed. If fn
|
//
|
||||||
// returns an error the loop ends and that error is returned, and if fn returns
|
// WaitFor gets a channel from 'wait()'', and then invokes 'fn' once for every value
|
||||||
// true the loop ends and nil is returned. ErrWaitTimeout will be returned if
|
// placed on the channel and once more when the channel is closed.
|
||||||
// the channel is closed without fn ever returning true.
|
//
|
||||||
|
// If 'fn' returns an error the loop ends and that error is returned, and if
|
||||||
|
// 'fn' returns true the loop ends and nil is returned.
|
||||||
|
//
|
||||||
|
// ErrWaitTimeout will be returned if the channel is closed without fn ever
|
||||||
|
// returning true.
|
||||||
func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
|
func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
|
||||||
c := wait(done)
|
c := wait(done)
|
||||||
for {
|
for {
|
||||||
@ -238,11 +282,14 @@ func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
|
|||||||
return ErrWaitTimeout
|
return ErrWaitTimeout
|
||||||
}
|
}
|
||||||
|
|
||||||
// poller returns a WaitFunc that will send to the channel every
|
// poller returns a WaitFunc that will send to the channel every interval until
|
||||||
// interval until timeout has elapsed and then close the channel.
|
// timeout has elapsed and then closes the channel.
|
||||||
// Over very short intervals you may receive no ticks before
|
//
|
||||||
// the channel is closed. If timeout is 0, the channel
|
// Over very short intervals you may receive no ticks before the channel is
|
||||||
// will never be closed.
|
// closed. A timeout of 0 is interpreted as an infinity.
|
||||||
|
//
|
||||||
|
// Output ticks are not buffered. If the channel is not ready to receive an
|
||||||
|
// item, the tick is skipped.
|
||||||
func poller(interval, timeout time.Duration) WaitFunc {
|
func poller(interval, timeout time.Duration) WaitFunc {
|
||||||
return WaitFunc(func(done <-chan struct{}) <-chan struct{} {
|
return WaitFunc(func(done <-chan struct{}) <-chan struct{} {
|
||||||
ch := make(chan struct{})
|
ch := make(chan struct{})
|
||||||
|
7
tools/cache/controller.go
vendored
7
tools/cache/controller.go
vendored
@ -29,7 +29,7 @@ import (
|
|||||||
type Config struct {
|
type Config struct {
|
||||||
// The queue for your objects; either a FIFO or
|
// The queue for your objects; either a FIFO or
|
||||||
// a DeltaFIFO. Your Process() function should accept
|
// a DeltaFIFO. Your Process() function should accept
|
||||||
// the output of this Oueue's Pop() method.
|
// the output of this Queue's Pop() method.
|
||||||
Queue
|
Queue
|
||||||
|
|
||||||
// Something that can list and watch your objects.
|
// Something that can list and watch your objects.
|
||||||
@ -121,6 +121,11 @@ func (c *Controller) Requeue(obj interface{}) error {
|
|||||||
// TODO: Consider doing the processing in parallel. This will require a little thought
|
// TODO: Consider doing the processing in parallel. This will require a little thought
|
||||||
// to make sure that we don't end up processing the same object multiple times
|
// to make sure that we don't end up processing the same object multiple times
|
||||||
// concurrently.
|
// concurrently.
|
||||||
|
//
|
||||||
|
// TODO: Plumb through the stopCh here (and down to the queue) so that this can
|
||||||
|
// actually exit when the controller is stopped. Or just give up on this stuff
|
||||||
|
// ever being stoppable. Converting this whole package to use Context would
|
||||||
|
// also be helpful.
|
||||||
func (c *Controller) processLoop() {
|
func (c *Controller) processLoop() {
|
||||||
for {
|
for {
|
||||||
obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process))
|
obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process))
|
||||||
|
3
tools/cache/controller_test.go
vendored
3
tools/cache/controller_test.go
vendored
@ -283,6 +283,9 @@ func TestHammerController(t *testing.T) {
|
|||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
close(stop)
|
close(stop)
|
||||||
|
|
||||||
|
// TODO: Verify that no goroutines were leaked here and that everything shut
|
||||||
|
// down cleanly.
|
||||||
|
|
||||||
outputSetLock.Lock()
|
outputSetLock.Lock()
|
||||||
t.Logf("got: %#v", outputSet)
|
t.Logf("got: %#v", outputSet)
|
||||||
}
|
}
|
||||||
|
6
tools/cache/reflector.go
vendored
6
tools/cache/reflector.go
vendored
@ -74,12 +74,6 @@ var (
|
|||||||
// However, it can be modified to avoid periodic resync to break the
|
// However, it can be modified to avoid periodic resync to break the
|
||||||
// TCP connection.
|
// TCP connection.
|
||||||
minWatchTimeout = 5 * time.Minute
|
minWatchTimeout = 5 * time.Minute
|
||||||
// If we are within 'forceResyncThreshold' from the next planned resync
|
|
||||||
// and are just before issuing Watch(), resync will be forced now.
|
|
||||||
forceResyncThreshold = 3 * time.Second
|
|
||||||
// We try to set timeouts for Watch() so that we will finish about
|
|
||||||
// than 'timeoutThreshold' from next planned periodic resync.
|
|
||||||
timeoutThreshold = 1 * time.Second
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector
|
// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector
|
||||||
|
Loading…
Reference in New Issue
Block a user