Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func ConvertAPIRefToModelRef(ref istiov1alpha1.Ref, namespace string) model.Ref
- func ConvertAPIRouteToModelRoute(session *istiov1alpha1.Session) model.Route
- func ConvertModelRouteToAPIRoute(route model.Route) *istiov1alpha1.Route
- func TargetFound(store model.LocatorStatusStore) (string, error)
- type InstrumentedClient
- func (i *InstrumentedClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (i *InstrumentedClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (i *InstrumentedClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (i *InstrumentedClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (i *InstrumentedClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (i *InstrumentedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (i *InstrumentedClient) RESTMapper() meta.RESTMapper
- func (i *InstrumentedClient) Scheme() *runtime.Scheme
- func (i *InstrumentedClient) Status() client.StatusWriter
- func (i *InstrumentedClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- type InstrumentedStatusWriter
- type Manipulators
- type ReconcileSession
- type Validator
Constants ¶
const ( // DefaultRouteHeaderName holds the name of the Header used to route traffic if no Route is provided. DefaultRouteHeaderName = "x-workspace-route" // RouteStrategyHeader holds the Route Type keyword for a Header based Route strategy. RouteStrategyHeader = "header" )
const (
// Finalizer defines the Finalizer name owned by the Session reconciler.
Finalizer = "finalizers.istio.workspace.session"
)
const (
ValidationReason = "Validation"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new Session Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func ConvertAPIRefToModelRef ¶
func ConvertAPIRefToModelRef(ref istiov1alpha1.Ref, namespace string) model.Ref
ConvertAPIRefToModelRef converts a Session.Spec.Ref to a model.Ref.
func ConvertAPIRouteToModelRoute ¶
func ConvertAPIRouteToModelRoute(session *istiov1alpha1.Session) model.Route
ConvertAPIRouteToModelRoute returns the defined route from the session or the Default.
func ConvertModelRouteToAPIRoute ¶ added in v0.0.7
func ConvertModelRouteToAPIRoute(route model.Route) *istiov1alpha1.Route
ConvertModelRouteToAPIRoute returns Model route as a session Route.
func TargetFound ¶ added in v0.4.0
func TargetFound(store model.LocatorStatusStore) (string, error)
Types ¶
type InstrumentedClient ¶ added in v0.5.0
type InstrumentedClient struct {
// contains filtered or unexported fields
}
func NewInstrumentedClient ¶ added in v0.5.0
func NewInstrumentedClient(c client.Client) *InstrumentedClient
func (*InstrumentedClient) Create ¶ added in v0.5.0
func (i *InstrumentedClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*InstrumentedClient) Delete ¶ added in v0.5.0
func (i *InstrumentedClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*InstrumentedClient) DeleteAllOf ¶ added in v0.5.0
func (i *InstrumentedClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*InstrumentedClient) List ¶ added in v0.5.0
func (i *InstrumentedClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*InstrumentedClient) Patch ¶ added in v0.5.0
func (i *InstrumentedClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*InstrumentedClient) RESTMapper ¶ added in v0.5.0
func (i *InstrumentedClient) RESTMapper() meta.RESTMapper
func (*InstrumentedClient) Scheme ¶ added in v0.5.0
func (i *InstrumentedClient) Scheme() *runtime.Scheme
func (*InstrumentedClient) Status ¶ added in v0.5.0
func (i *InstrumentedClient) Status() client.StatusWriter
func (*InstrumentedClient) Update ¶ added in v0.5.0
func (i *InstrumentedClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type InstrumentedStatusWriter ¶ added in v0.5.0
type InstrumentedStatusWriter struct {
// contains filtered or unexported fields
}
func (*InstrumentedStatusWriter) Patch ¶ added in v0.5.0
func (i *InstrumentedStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*InstrumentedStatusWriter) Update ¶ added in v0.5.0
func (i *InstrumentedStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
type Manipulators ¶
type Manipulators struct { Locators []model.Locator Handlers []model.ModificatorRegistrar }
Manipulators holds the basic chain of manipulators that the ReconcileSession will use to perform it's actions.
func DefaultManipulators ¶
func DefaultManipulators() Manipulators
DefaultManipulators contains the default config for the reconciler.
type ReconcileSession ¶
type ReconcileSession struct {
// contains filtered or unexported fields
}
ReconcileSession reconciles a Session object.
func NewStandaloneReconciler ¶
func NewStandaloneReconciler(c client.Client, m Manipulators, validators ...Validator) *ReconcileSession
NewStandaloneReconciler returns a new reconcile.Reconciler. Primarily used for unit testing outside of the Manager.
func (*ReconcileSession) Reconcile ¶
func (r *ReconcileSession) Reconcile(orgCtx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a Session object and makes changes based on the state read and what is in the Session.Spec.
func (ReconcileSession) WatchTypes ¶ added in v0.0.8
func (r ReconcileSession) WatchTypes() []client.Object
WatchTypes returns a list of client.Objects to watch for changes.
type Validator ¶ added in v0.4.0
type Validator func(store model.LocatorStatusStore) (string, error)
Validator returns a string of Type and a possible error.
func DefaultValidators ¶ added in v0.4.0
func DefaultValidators() []Validator