Documentation ¶
Index ¶
- func EquivalentApplyConfigurationResultIgnoringEvents(lhs, rhs ApplyConfigurationResult) []string
- func EquivalentClusterApplyResultIgnoringEvents(field string, lhs, rhs SingleClusterDesiredMutationGetter) []string
- func FilterSerializedRequests(requests []manifestclient.SerializedRequestish, ...) []manifestclient.SerializedRequestish
- func NewApplyConfigurationCommand(applyConfigurationFn ApplyConfigurationFunc, ...) *cobra.Command
- func NewApplyConfigurationFromClient(...) *applyConfiguration
- func NewNamedRunOnce(controllerInstanceName string, runOnce RunOnceFunc) *namedRunOnce
- func RemoveEvents(requests []manifestclient.SerializedRequestish) []manifestclient.SerializedRequestish
- func UnspecifiedOutputResources(allDesiredMutationsGetter AllDesiredMutationsGetter, ...) []manifestclient.SerializedRequestish
- func ValidateAllDesiredMutationsGetter(allDesiredMutationsGetter AllDesiredMutationsGetter, ...) error
- func WriteApplyConfiguration(desiredApplyConfiguration AllDesiredMutationsGetter, outputDirectory string) error
- type AllDesiredMutationsGetter
- type ApplyConfigurationFunc
- type ApplyConfigurationInput
- type ApplyConfigurationResult
- type ClusterType
- type ControllerWithInstanceName
- type GeneratedInformerFactory
- type GeneratedNamespacedInformerFactory
- type MutationActionReader
- type NamedRunOnce
- type OperatorStarter
- type RunFunc
- type RunOnceFunc
- type SimpleOperatorStarter
- type SimplifiedInformerFactory
- func DynamicInformerFactoryAdapter(in dynamicinformer.DynamicSharedInformerFactory) SimplifiedInformerFactory
- func GeneratedInformerFactoryAdapter(in GeneratedInformerFactory) SimplifiedInformerFactory
- func GeneratedNamespacedInformerFactoryAdapter(in GeneratedNamespacedInformerFactory) SimplifiedInformerFactory
- type SingleClusterDesiredMutationGetter
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EquivalentApplyConfigurationResultIgnoringEvents ¶
func EquivalentApplyConfigurationResultIgnoringEvents(lhs, rhs ApplyConfigurationResult) []string
func EquivalentClusterApplyResultIgnoringEvents ¶
func EquivalentClusterApplyResultIgnoringEvents(field string, lhs, rhs SingleClusterDesiredMutationGetter) []string
func FilterSerializedRequests ¶
func FilterSerializedRequests(requests []manifestclient.SerializedRequestish, allowedResources *libraryoutputresources.ResourceList) []manifestclient.SerializedRequestish
func NewApplyConfigurationCommand ¶
func NewApplyConfigurationCommand(applyConfigurationFn ApplyConfigurationFunc, outputResourcesFn libraryoutputresources.OutputResourcesFunc, streams genericiooptions.IOStreams) *cobra.Command
func NewApplyConfigurationFromClient ¶
func NewApplyConfigurationFromClient( mutationTracker *manifestclient.AllActionsTracker[manifestclient.TrackedSerializedRequest], ) *applyConfiguration
func NewNamedRunOnce ¶
func NewNamedRunOnce(controllerInstanceName string, runOnce RunOnceFunc) *namedRunOnce
func RemoveEvents ¶
func RemoveEvents(requests []manifestclient.SerializedRequestish) []manifestclient.SerializedRequestish
func UnspecifiedOutputResources ¶
func UnspecifiedOutputResources(allDesiredMutationsGetter AllDesiredMutationsGetter, allAllowedOutputResources *libraryoutputresources.OutputResources) []manifestclient.SerializedRequestish
func ValidateAllDesiredMutationsGetter ¶
func ValidateAllDesiredMutationsGetter(allDesiredMutationsGetter AllDesiredMutationsGetter, allAllowedOutputResources *libraryoutputresources.OutputResources) error
func WriteApplyConfiguration ¶
func WriteApplyConfiguration(desiredApplyConfiguration AllDesiredMutationsGetter, outputDirectory string) error
Types ¶
type AllDesiredMutationsGetter ¶
type AllDesiredMutationsGetter interface {
MutationsForClusterType(clusterType ClusterType) SingleClusterDesiredMutationGetter
}
AllDesiredMutationsGetter provides access to mutations targeted at all available types of clusters
func FilterAllDesiredMutationsGetter ¶
func FilterAllDesiredMutationsGetter( in AllDesiredMutationsGetter, allAllowedOutputResources *libraryoutputresources.OutputResources, ) AllDesiredMutationsGetter
type ApplyConfigurationFunc ¶
type ApplyConfigurationFunc func(ctx context.Context, applyConfigurationInput ApplyConfigurationInput) (AllDesiredMutationsGetter, error)
ApplyConfigurationFunc is a function called for applying configuration.
type ApplyConfigurationInput ¶
type ApplyConfigurationInput struct { // MutationTrackingClient is offered as an alternative to the inputDirectory to make it easier to provide mocks to code. // This forces all downstream code to rely on the client reading aspects and not grow an odd dependency to disk. MutationTrackingClient manifestclient.MutationTrackingClient // Now is the declared time that this function was called at. It doesn't necessarily bear any relationship to // the actual time. This is another aspect that makes unit and integration testing easier. Clock clock.Clock // Streams is for I/O. The StdIn will usually be nil'd out. Streams genericiooptions.IOStreams // Controllers holds a list of controller names to run. Controllers []string }
ApplyConfigurationInput is provided to the ApplyConfigurationFunc
type ApplyConfigurationResult ¶
type ApplyConfigurationResult interface { Error() error OutputDirectory() (string, error) Stdout() string Stderr() string AllDesiredMutationsGetter }
type ClusterType ¶
type ClusterType string
var ( ClusterTypeConfiguration ClusterType = "Configuration" ClusterTypeManagement ClusterType = "Management" ClusterTypeUserWorkload ClusterType = "UserWorkload" AllClusterTypes = sets.New(ClusterTypeConfiguration, ClusterTypeManagement, ClusterTypeUserWorkload) )
type ControllerWithInstanceName ¶
type ControllerWithInstanceName interface {
ControllerInstanceName() string
}
type MutationActionReader ¶
type MutationActionReader interface { ListActions() []manifestclient.Action RequestsForAction(action manifestclient.Action) []manifestclient.SerializedRequestish AllRequests() []manifestclient.SerializedRequestish }
MutationActionReader provides access to serialized mutation requests
type NamedRunOnce ¶
func AdaptNamedController ¶
func AdaptNamedController(eventRecorder events.Recorder, controller Syncer) NamedRunOnce
func AdaptSyncFn ¶
func AdaptSyncFn(eventRecorder events.Recorder, controllerName string, originalRunOnce func(ctx context.Context, syncCtx factory.SyncContext) error) NamedRunOnce
type OperatorStarter ¶
type RunOnceFunc ¶
type SimpleOperatorStarter ¶
type SimpleOperatorStarter struct { Informers []SimplifiedInformerFactory ControllerNamedRunOnceFns []NamedRunOnce // ControllerRunFns is useful during a transition to coalesce the operator launching flow. ControllerRunFns []RunFunc // Controllers hold an optional list of controller names to run. // '*' means "all controllersFromFlags are enabled by default" // 'foo' means "enable 'foo'" // '-foo' means "disable 'foo'" Controllers []string }
type SimplifiedInformerFactory ¶
type SimplifiedInformerFactory interface { Start(ctx context.Context) WaitForCacheSync(ctx context.Context) }
func DynamicInformerFactoryAdapter ¶
func DynamicInformerFactoryAdapter(in dynamicinformer.DynamicSharedInformerFactory) SimplifiedInformerFactory
func GeneratedInformerFactoryAdapter ¶
func GeneratedInformerFactoryAdapter(in GeneratedInformerFactory) SimplifiedInformerFactory
func GeneratedNamespacedInformerFactoryAdapter ¶
func GeneratedNamespacedInformerFactoryAdapter(in GeneratedNamespacedInformerFactory) SimplifiedInformerFactory
type SingleClusterDesiredMutationGetter ¶
type SingleClusterDesiredMutationGetter interface { GetClusterType() ClusterType Requests() MutationActionReader }
SingleClusterDesiredMutationGetter provides access to mutations targeted at a single type of cluster
Click to show internal directories.
Click to hide internal directories.