Documentation
¶
Overview ¶
Package app provides a sample controller demonstrating grace inconsistency suppression.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AddToScheme = sharedapp.AddToScheme
AddToScheme registers the ExampleApp types with the given scheme.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
client.Client
Scheme *runtime.Scheme
Recorder record.EventRecorder
Metrics component.Recorder
NewDeploymentResource func(*ExampleApp) (component.Resource, error)
}
Controller reconciles an ExampleApp with a Deployment that has a custom grace handler intentionally returning Healthy while the convergence handler may report non-healthy. The inconsistency warning is suppressed via the SuppressGraceInconsistencyWarning() option.
func (*Controller) BuildComponent ¶ added in v0.16.0
func (r *Controller) BuildComponent(owner *ExampleApp) (*component.Component, error)
BuildComponent assembles the monitoring component: a Deployment whose custom grace handler reports Healthy while the convergence handler may report non-healthy. The grace period and the SuppressGraceInconsistencyWarning option are the point of this example, so the controller and tests build the component the same way to keep the reconciled component and the golden snapshot in lockstep.
func (*Controller) Reconcile ¶
func (r *Controller) Reconcile(ctx context.Context, owner *ExampleApp) (err error)
Reconcile builds and reconciles a component with grace period and inconsistency suppression.
type ExampleApp ¶
type ExampleApp = sharedapp.ExampleApp
ExampleApp re-exports the shared CRD type so callers in this package need no import alias.
type ExampleAppList ¶
type ExampleAppList = sharedapp.ExampleAppList
ExampleAppList re-exports the shared list type.
type ExampleAppSpec ¶
type ExampleAppSpec = sharedapp.ExampleAppSpec
ExampleAppSpec re-exports the shared spec type.
type ExampleAppStatus ¶
type ExampleAppStatus = sharedapp.ExampleAppStatus
ExampleAppStatus re-exports the shared status type.