Documentation ¶
Overview ¶
package preflight implements preflight checks for PKO APIs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContextWithPhase ¶ added in v1.4.0
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 ¶ added in v1.4.0
type EmptyNamespaceNoDefault ¶ added in v1.4.0
type EmptyNamespaceNoDefault struct {
// contains filtered or unexported fields
}
Prevents the use of APIs not registered into the kube-apiserver.
func NewEmptyNamespaceNoDefault ¶ added in v1.4.0
func NewEmptyNamespaceNoDefault(restMapper meta.RESTMapper) *EmptyNamespaceNoDefault
func (*EmptyNamespaceNoDefault) CheckPhase ¶ added in v1.4.0
func (p *EmptyNamespaceNoDefault) CheckPhase( _ context.Context, owner client.Object, phase corev1alpha1.ObjectSetTemplatePhase, ) (violations []Violation, err error)
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 ¶ added in v1.4.0
func CheckAllInPhase( ctx context.Context, checker checker, owner client.Object, phase corev1alpha1.ObjectSetTemplatePhase, ) (violations []Violation, err error)
Click to show internal directories.
Click to hide internal directories.