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 ConvertAPIStatusToModelRef(session istiov1alpha1.Session, ref *model.Ref)
- func ConvertAPIStatusesToModelRefs(session istiov1alpha1.Session) []*model.Ref
- func ConvertModelRefToAPIStatus(ref model.Ref, session *istiov1alpha1.Session)
- func NewStandaloneReconciler(c client.Client, m Manipulators) reconcile.Reconciler
- func RefUpdated(session istiov1alpha1.Session, ref model.Ref) bool
- type Manipulators
- type ReconcileSession
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"
)
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 ¶ added in v0.0.2
func ConvertAPIRefToModelRef(ref istiov1alpha1.Ref, namespace string) model.Ref
ConvertAPIRefToModelRef converts a Session.Spec.Ref to a model.Ref
func ConvertAPIRouteToModelRoute ¶ added in v0.0.2
func ConvertAPIRouteToModelRoute(session *istiov1alpha1.Session) model.Route
ConvertAPIRouteToModelRoute returns the defined route from the session or the Default
func ConvertAPIStatusToModelRef ¶ added in v0.0.2
func ConvertAPIStatusToModelRef(session istiov1alpha1.Session, ref *model.Ref)
ConvertAPIStatusToModelRef fills the ResourceStatus of a Ref based on the Session.Status.Refs with the same name
func ConvertAPIStatusesToModelRefs ¶ added in v0.0.2
func ConvertAPIStatusesToModelRefs(session istiov1alpha1.Session) []*model.Ref
ConvertAPIStatusesToModelRefs creates a List of Refs based on the Session.Status.Refs list
func ConvertModelRefToAPIStatus ¶ added in v0.0.2
func ConvertModelRefToAPIStatus(ref model.Ref, session *istiov1alpha1.Session)
ConvertModelRefToAPIStatus appends/replaces the Ref in the provided Session.Status.Ref list
func NewStandaloneReconciler ¶
func NewStandaloneReconciler(c client.Client, m Manipulators) reconcile.Reconciler
NewStandaloneReconciler returns a new reconcile.Reconciler. Primarily used for unit testing outside of the Manager
func RefUpdated ¶ added in v0.0.2
func RefUpdated(session istiov1alpha1.Session, ref model.Ref) bool
RefUpdated check if a Ref has been updated compared to current status
Types ¶
type Manipulators ¶
type Manipulators struct { Locators []model.Locator Mutators []model.Mutator Revertors []model.Revertor }
Manipulators holds the basic chain of manipulators that the ReconcileSession will use to perform it's actions
func DefaultManipulators ¶ added in v0.0.3
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