Documentation ¶
Index ¶
- Constants
- Variables
- func InitPubControl(cli client.Client, finder *controllerfinder.ControllerFinder, ...)
- func IsReferenceEqual(ref1, ref2 *policyv1alpha1.TargetReference) bool
- func PodUnavailableBudgetValidatePod(pod *corev1.Pod, operation policyv1alpha1.PubOperation, username string, ...) (allowed bool, reason string, err error)
Constants ¶
View Source
const (
MaxUnavailablePodSize = 2000
)
View Source
const (
// related-pub annotation in pod
PodRelatedPubAnnotation = "kruise.io/related-pub"
)
Variables ¶
View Source
var ConflictRetry = wait.Backoff{ Steps: 4, Duration: 500 * time.Millisecond, Factor: 1.0, Jitter: 0.1, }
View Source
var ( prometheus.CounterOpts{ Name: "pod_unavailable_budget", Help: "Pod Unavailable Budget Metrics", }, []string{"kind_namespace_name", "username"}, ) )
View Source
var PubControl pubControl
Functions ¶
func InitPubControl ¶ added in v1.5.1
func InitPubControl(cli client.Client, finder *controllerfinder.ControllerFinder, rec record.EventRecorder)
func IsReferenceEqual ¶ added in v1.2.0
func IsReferenceEqual(ref1, ref2 *policyv1alpha1.TargetReference) bool
check APIVersion, Kind, Name
func PodUnavailableBudgetValidatePod ¶
func PodUnavailableBudgetValidatePod(pod *corev1.Pod, operation policyv1alpha1.PubOperation, username string, dryRun bool) (allowed bool, reason string, err error)
parameters: 1. allowed(bool) indicates whether to allow this update operation 2. err(error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.