Commit 2822e4fd authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #36651 from mwielgus/evict-from-b1

Automatic merge from submit-queue Switch pod eviction client from v1alpha1 to v1beta Generated client 1.5 has a function to evict a pod. The function uses v1alpha1.Eviction object instead of v1beta1. This pr changes the api version that is being used. cc: @davidopp @caesarxuchao
parents dd681f91 6f235de1
...@@ -44,7 +44,7 @@ go_library( ...@@ -44,7 +44,7 @@ go_library(
"//pkg/api/unversioned:go_default_library", "//pkg/api/unversioned:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/apimachinery/registered:go_default_library", "//pkg/apimachinery/registered:go_default_library",
"//pkg/apis/policy/v1alpha1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library",
"//pkg/client/restclient:go_default_library", "//pkg/client/restclient:go_default_library",
"//pkg/fields:go_default_library", "//pkg/fields:go_default_library",
"//pkg/runtime:go_default_library", "//pkg/runtime:go_default_library",
......
...@@ -42,7 +42,7 @@ go_library( ...@@ -42,7 +42,7 @@ go_library(
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//pkg/api/unversioned:go_default_library", "//pkg/api/unversioned:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/apis/policy/v1alpha1:go_default_library", "//pkg/apis/policy/v1beta1:go_default_library",
"//pkg/client/clientset_generated/release_1_5/typed/core/v1:go_default_library", "//pkg/client/clientset_generated/release_1_5/typed/core/v1:go_default_library",
"//pkg/client/restclient:go_default_library", "//pkg/client/restclient:go_default_library",
"//pkg/client/testing/core:go_default_library", "//pkg/client/testing/core:go_default_library",
......
...@@ -18,7 +18,7 @@ package fake ...@@ -18,7 +18,7 @@ package fake
import ( import (
"k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1"
policy "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
"k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/testing/core"
) )
......
...@@ -19,7 +19,7 @@ package v1 ...@@ -19,7 +19,7 @@ package v1
import ( import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1"
policy "k8s.io/kubernetes/pkg/apis/policy/v1alpha1" policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
"k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/restclient"
) )
......
...@@ -18,7 +18,7 @@ package fake ...@@ -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 ...@@ -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"
) )
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -289,6 +289,8 @@ type VolumeSource struct { ...@@ -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 { ...@@ -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 { ...@@ -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 (
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2033,6 +2033,9 @@ message PersistentVolumeSource { ...@@ -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 { ...@@ -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 { ...@@ -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.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -322,6 +322,8 @@ type VolumeSource struct { ...@@ -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 { ...@@ -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 { ...@@ -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{ ...@@ -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 { ...@@ -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{ ...@@ -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 { ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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. ...@@ -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 * ...@@ -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 { ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 { ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -326,8 +326,6 @@ type KubeletConfiguration struct { ...@@ -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 { ...@@ -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) { ...@@ -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 { ...@@ -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 { ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 * ...@@ -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 * ...@@ -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 ...@@ -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 ...@@ -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 ( ...@@ -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 = "*"
) )
......
...@@ -40,17 +40,10 @@ type PodDisruptionBudgetSpec struct { ...@@ -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 { ...@@ -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
......
...@@ -75,17 +75,10 @@ message PodDisruptionBudgetSpec { ...@@ -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 { ...@@ -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;
} }
...@@ -38,17 +38,10 @@ type PodDisruptionBudgetSpec struct { ...@@ -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 { ...@@ -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 { ...@@ -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 ...@@ -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 ...@@ -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{}, ...@@ -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{}, ...@@ -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{}, ...@@ -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{}, ...@@ -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 { ...@@ -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"
......
...@@ -29,7 +29,7 @@ import ( ...@@ -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 { ...@@ -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))
......
...@@ -283,6 +283,9 @@ func TestHammerController(t *testing.T) { ...@@ -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)
} }
......
...@@ -74,12 +74,6 @@ var ( ...@@ -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
......
...@@ -8951,7 +8951,7 @@ go_library( ...@@ -8951,7 +8951,7 @@ go_library(
"//vendor:k8s.io/client-go/pkg/api/unversioned", "//vendor:k8s.io/client-go/pkg/api/unversioned",
"//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/api/v1",
"//vendor:k8s.io/client-go/pkg/apimachinery/registered", "//vendor:k8s.io/client-go/pkg/apimachinery/registered",
"//vendor:k8s.io/client-go/pkg/apis/policy/v1alpha1", "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
"//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/fields",
"//vendor:k8s.io/client-go/pkg/runtime", "//vendor:k8s.io/client-go/pkg/runtime",
"//vendor:k8s.io/client-go/pkg/runtime/serializer", "//vendor:k8s.io/client-go/pkg/runtime/serializer",
...@@ -8994,7 +8994,7 @@ go_library( ...@@ -8994,7 +8994,7 @@ go_library(
"//vendor:k8s.io/client-go/pkg/api", "//vendor:k8s.io/client-go/pkg/api",
"//vendor:k8s.io/client-go/pkg/api/unversioned", "//vendor:k8s.io/client-go/pkg/api/unversioned",
"//vendor:k8s.io/client-go/pkg/api/v1", "//vendor:k8s.io/client-go/pkg/api/v1",
"//vendor:k8s.io/client-go/pkg/apis/policy/v1alpha1", "//vendor:k8s.io/client-go/pkg/apis/policy/v1beta1",
"//vendor:k8s.io/client-go/pkg/fields", "//vendor:k8s.io/client-go/pkg/fields",
"//vendor:k8s.io/client-go/pkg/labels", "//vendor:k8s.io/client-go/pkg/labels",
"//vendor:k8s.io/client-go/pkg/runtime", "//vendor:k8s.io/client-go/pkg/runtime",
...@@ -9870,11 +9870,13 @@ go_library( ...@@ -9870,11 +9870,13 @@ go_library(
"k8s.io/client-go/pkg/apis/componentconfig/doc.go", "k8s.io/client-go/pkg/apis/componentconfig/doc.go",
"k8s.io/client-go/pkg/apis/componentconfig/helpers.go", "k8s.io/client-go/pkg/apis/componentconfig/helpers.go",
"k8s.io/client-go/pkg/apis/componentconfig/register.go", "k8s.io/client-go/pkg/apis/componentconfig/register.go",
"k8s.io/client-go/pkg/apis/componentconfig/types.generated.go",
"k8s.io/client-go/pkg/apis/componentconfig/types.go", "k8s.io/client-go/pkg/apis/componentconfig/types.go",
"k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go", "k8s.io/client-go/pkg/apis/componentconfig/zz_generated.deepcopy.go",
], ],
tags = ["automanaged"], tags = ["automanaged"],
deps = [ deps = [
"//vendor:github.com/ugorji/go/codec",
"//vendor:k8s.io/client-go/pkg/api/unversioned", "//vendor:k8s.io/client-go/pkg/api/unversioned",
"//vendor:k8s.io/client-go/pkg/conversion", "//vendor:k8s.io/client-go/pkg/conversion",
"//vendor:k8s.io/client-go/pkg/runtime", "//vendor:k8s.io/client-go/pkg/runtime",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment