Documentation ¶
Index ¶
- func CanonicalizeApplyConfigurationRunResult(obj *ApplyConfigurationRunResult)
- 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 ApplyConfigurationRunResult
- type ClusterType
- type ControllerRunResult
- type ControllerRunStatus
- type ControllerWithInstanceName
- type ErrorDetails
- 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 CanonicalizeApplyConfigurationRunResult ¶
func CanonicalizeApplyConfigurationRunResult(obj *ApplyConfigurationRunResult)
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) (*ApplyConfigurationRunResult, 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 ControllerResults() *ApplyConfigurationRunResult AllDesiredMutationsGetter }
type ApplyConfigurationRunResult ¶
type ApplyConfigurationRunResult struct {
ControllerResults []ControllerRunResult `json:"controllerResults"`
}
type ClusterType ¶
type ClusterType string
var ( ClusterTypeConfiguration ClusterType = "Configuration" ClusterTypeManagement ClusterType = "Management" ClusterTypeUserWorkload ClusterType = "UserWorkload" AllClusterTypes = sets.New(ClusterTypeConfiguration, ClusterTypeManagement, ClusterTypeUserWorkload) )
type ControllerRunResult ¶
type ControllerRunResult struct { ControllerName string `json:"controllerName"` Status ControllerRunStatus `json:"status"` Errors []ErrorDetails `json:"errors,omitempty"` PanicStack string `json:"panicStack,omitempty"` }
type ControllerRunStatus ¶
type ControllerRunStatus string
var ( ControllerRunStatusUnknown ControllerRunStatus = "Unknown" ControllerRunStatusSucceeded ControllerRunStatus = "Succeeded" ControllerRunStatusSkipped ControllerRunStatus = "Skipped" ControllerRunStatusFailed ControllerRunStatus = "Failed" ControllerRunStatusPanicked ControllerRunStatus = "Panicked" )
type ControllerWithInstanceName ¶
type ControllerWithInstanceName interface {
ControllerInstanceName() string
}
type ErrorDetails ¶
type ErrorDetails struct {
Message string `json:"message"`
}
TODO perhaps we add indications about interfaces this matches?
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 OperatorStarter interface { RunOnce(ctx context.Context, input ApplyConfigurationInput) (*ApplyConfigurationRunResult, AllDesiredMutationsGetter, error) Start(ctx context.Context) error }
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 }
func (SimpleOperatorStarter) RunOnce ¶
func (a SimpleOperatorStarter) RunOnce(ctx context.Context, input ApplyConfigurationInput) (*ApplyConfigurationRunResult, AllDesiredMutationsGetter, error)
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.