Documentation ¶
Overview ¶
package preflight implements preflight checks for PKO APIs.
Index ¶
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 meta.RESTMapper) *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 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.