package disruption
import "k8s.io/kubernetes/pkg/controller/disruption"
Index ¶
- Constants
- type DisruptionController
- func NewDisruptionController( ctx context.Context, podInformer coreinformers.PodInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, rcInformer coreinformers.ReplicationControllerInformer, rsInformer appsv1informers.ReplicaSetInformer, dInformer appsv1informers.DeploymentInformer, ssInformer appsv1informers.StatefulSetInformer, kubeClient clientset.Interface, restMapper apimeta.RESTMapper, scaleNamespacer scaleclient.ScalesGetter, discoveryClient discovery.DiscoveryInterface, ) *DisruptionController
- func NewDisruptionControllerInternal(ctx context.Context, podInformer coreinformers.PodInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, rcInformer coreinformers.ReplicationControllerInformer, rsInformer appsv1informers.ReplicaSetInformer, dInformer appsv1informers.DeploymentInformer, ssInformer appsv1informers.StatefulSetInformer, kubeClient clientset.Interface, restMapper apimeta.RESTMapper, scaleNamespacer scaleclient.ScalesGetter, discoveryClient discovery.DiscoveryInterface, clock clock.WithTicker, stalePodDisruptionTimeout time.Duration, ) *DisruptionController
- func (dc *DisruptionController) Run(ctx context.Context)
Constants ¶
const ( // DeletionTimeout sets maximum time from the moment a pod is added to DisruptedPods in PDB.Status // to the time when the pod is expected to be seen by PDB controller as having been marked for deletion. // If the pod was not marked for deletion during that time it is assumed that it won't be deleted at // all and the corresponding entry can be removed from pdb.Status.DisruptedPods. It is assumed that // pod/pdb apiserver to controller latency is relatively small (like 1-2sec) so the below value should // be more than enough. // If the controller is running on a different node it is important that the two nodes have synced // clock (via ntp for example). Otherwise PodDisruptionBudget controller may not provide enough // protection against unwanted pod disruptions. DeletionTimeout = 2 * time.Minute )
Types ¶
type DisruptionController ¶
type DisruptionController struct {
// contains filtered or unexported fields
}
func NewDisruptionController ¶
func NewDisruptionController( ctx context.Context, podInformer coreinformers.PodInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, rcInformer coreinformers.ReplicationControllerInformer, rsInformer appsv1informers.ReplicaSetInformer, dInformer appsv1informers.DeploymentInformer, ssInformer appsv1informers.StatefulSetInformer, kubeClient clientset.Interface, restMapper apimeta.RESTMapper, scaleNamespacer scaleclient.ScalesGetter, discoveryClient discovery.DiscoveryInterface, ) *DisruptionController
func NewDisruptionControllerInternal ¶
func NewDisruptionControllerInternal(ctx context.Context, podInformer coreinformers.PodInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, rcInformer coreinformers.ReplicationControllerInformer, rsInformer appsv1informers.ReplicaSetInformer, dInformer appsv1informers.DeploymentInformer, ssInformer appsv1informers.StatefulSetInformer, kubeClient clientset.Interface, restMapper apimeta.RESTMapper, scaleNamespacer scaleclient.ScalesGetter, discoveryClient discovery.DiscoveryInterface, clock clock.WithTicker, stalePodDisruptionTimeout time.Duration, ) *DisruptionController
NewDisruptionControllerInternal allows to set a clock and stalePodDisruptionTimeout It is only supposed to be used by tests.
func (*DisruptionController) Run ¶
func (dc *DisruptionController) Run(ctx context.Context)
Source Files ¶
disruption.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 35 packages
- Last checked
- 3 hours ago –
Tools for package owners.