Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DeprecatedMutationEnabled = flag.Bool("enable-mutation", false, "Deprecated. This used to enable the mutation feature, now it has no effect. Use --operation=mutation-webhook and --operation=mutation-status instead.") MutationLoggingEnabled *bool MutationAnnotationsEnabled *bool )
var ErrNotConverging = errors.New("mutation not converging")
ErrNotConverging reports that applying all Mutators isn't converging.
var ErrNotRemoved = errors.New("failed to find mutator on sorted list")
ErrNotRemoved reports that we were unable to remove a Mutator properly as System was in an inconsistent state.
Functions ¶
Types ¶
type StatsReporter ¶
type StatsReporter interface {
ReportIterationConvergence(scs SystemConvergenceStatus, iterations int) error
}
StatsReporter reports mutator-related metrics.
func NewStatsReporter ¶
func NewStatsReporter() StatsReporter
NewStatsReporter creates a reporter for webhook metrics.
type System ¶
type System struct {
// contains filtered or unexported fields
}
System keeps the list of mutators and provides an interface to apply mutations.
func NewSystem ¶
func NewSystem(options SystemOpts) *System
NewSystem initializes an empty mutation system.
func (*System) Mutate ¶
Mutate applies the mutation in place to the given object. Returns true if applying Mutators caused any changes to the object.
type SystemConvergenceStatus ¶
type SystemConvergenceStatus string
SystemConvergenceStatus defines the outcomes of the attempted mutation of an object by the mutation System. The System is meant to converge on a fully mutated object.
const ( // SystemConvergenceTrue denotes a successfully converged mutation system request. SystemConvergenceTrue SystemConvergenceStatus = "true" // SystemConvergenceFalse denotes an unsuccessfully converged mutation system request. SystemConvergenceFalse SystemConvergenceStatus = "false" )
type SystemOpts ¶
type SystemOpts struct { Reporter StatsReporter NewUUID func() uuid.UUID ProviderCache *externaldata.ProviderCache SendRequestToExternalDataProvider externaldata.SendRequestToProvider ClientCertWatcher *certwatcher.CertWatcher }
SystemOpts allows for optional dependencies to be passed into the mutation System.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
+kubebuilder:object:generate=true +groupName=match.gatekeeper.sh
|
+kubebuilder:object:generate=true +groupName=match.gatekeeper.sh |
path
|
|
parser
Package parser provides a parser for a path specification language used in expressing Kubernetes object paths.
|
Package parser provides a parser for a path specification language used in expressing Kubernetes object paths. |