pubcontrol

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxUnavailablePodSize is the max size of PUB.DisruptedPods + PUB.UnavailablePods.
	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 (
	PodUnavailableBudgetMetrics = prometheus.NewCounterVec(
		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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL