Documentation ¶
Overview ¶
package preflight implements preflight checks for PKO APIs.
Index ¶
- func NewContextWithPhase(ctx context.Context, phase corev1alpha1.ObjectSetTemplatePhase) context.Context
- type APIExistence
- type CheckerFn
- type DryRun
- type EmptyNamespaceNoDefault
- type Error
- type List
- type NamespaceEscalation
- type NoOwnerReferences
- type ObjectDuplicate
- type PhasesCheckerList
- type Violation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextWithPhase ¶
func NewContextWithPhase(ctx context.Context, phase corev1alpha1.ObjectSetTemplatePhase) context.Context
Types ¶
type APIExistence ¶
type APIExistence struct {
// contains filtered or unexported fields
}
Prevents the use of APIs not registered into the kube-apiserver.
func NewAPIExistence ¶
func NewAPIExistence(restMapper restMapper, sub preflightChecker) *APIExistence
type CheckerFn ¶
type EmptyNamespaceNoDefault ¶
type EmptyNamespaceNoDefault struct {
// contains filtered or unexported fields
}
Prevents the use of APIs not registered into the kube-apiserver.
func NewEmptyNamespaceNoDefault ¶
func NewEmptyNamespaceNoDefault(restMapper meta.RESTMapper) *EmptyNamespaceNoDefault
type List ¶
type List []checker
Runs a list of preflight checks and aggregates the result into a single list of violations.
type NamespaceEscalation ¶
type NamespaceEscalation struct {
// contains filtered or unexported fields
}
Prevents namespace escalation from users specifying cluster-scoped resources or resources in other namespaces in non-cluster-scoped APIs.
func NewNamespaceEscalation ¶
func NewNamespaceEscalation(restMapper meta.RESTMapper) *NamespaceEscalation
type NoOwnerReferences ¶ added in v1.11.0
type NoOwnerReferences struct {
// contains filtered or unexported fields
}
Prevents the use of APIs not registered into the kube-apiserver.
func NewNoOwnerReferences ¶ added in v1.11.0
func NewNoOwnerReferences(restMapper meta.RESTMapper) *NoOwnerReferences
type ObjectDuplicate ¶ added in v1.8.4
type ObjectDuplicate struct{}
func NewObjectDuplicate ¶ added in v1.8.4
func NewObjectDuplicate() *ObjectDuplicate
func (*ObjectDuplicate) Check ¶ added in v1.8.4
func (od *ObjectDuplicate) Check( _ context.Context, phases []corev1alpha1.ObjectSetTemplatePhase, ) (violations []Violation, err error)
type PhasesCheckerList ¶ added in v1.8.4
type PhasesCheckerList []phasesChecker
func (PhasesCheckerList) Check ¶ added in v1.8.4
func (l PhasesCheckerList) Check( ctx context.Context, phases []corev1alpha1.ObjectSetTemplatePhase, ) (violations []Violation, err error)
type Violation ¶
type Violation struct { // Position the violation was found. Position string // Error describing the violation. Error string }
func CheckAllInPhase ¶
func CheckAllInPhase( ctx context.Context, checker checker, owner client.Object, phase corev1alpha1.ObjectSetTemplatePhase, objs []unstructured.Unstructured, ) (violations []Violation, err error)
Click to show internal directories.
Click to hide internal directories.