Documentation ¶
Overview ¶
Package route contains the logic to manage the routesconfiguration for the external-network.
Index ¶
- func GenerateRouteConfigurationName(cfg *networkingv1beta1.Configuration) string
- func GetGatewayMode(ctx context.Context, cl client.Client, remoteClusterID liqov1beta1.ClusterID) (gateway.Mode, error)
- func GetRemoteClusterID(cfg *networkingv1beta1.Configuration) (liqov1beta1.ClusterID, error)
- type ConfigurationReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRouteConfigurationName ¶
func GenerateRouteConfigurationName(cfg *networkingv1beta1.Configuration) string
GenerateRouteConfigurationName generates the name of the RouteConfiguration object.
func GetGatewayMode ¶
func GetGatewayMode(ctx context.Context, cl client.Client, remoteClusterID liqov1beta1.ClusterID) (gateway.Mode, error)
GetGatewayMode returns the mode of the Gateway related to the Configuration.
func GetRemoteClusterID ¶
func GetRemoteClusterID(cfg *networkingv1beta1.Configuration) (liqov1beta1.ClusterID, error)
GetRemoteClusterID returns the remote cluster ID of the Configuration.
Types ¶
type ConfigurationReconciler ¶
type ConfigurationReconciler struct { client.Client Scheme *runtime.Scheme EventsRecorder record.EventRecorder }
ConfigurationReconciler manage Configuration.
func NewConfigurationReconciler ¶
func NewConfigurationReconciler(cl client.Client, s *runtime.Scheme, er record.EventRecorder) *ConfigurationReconciler
NewConfigurationReconciler returns a new ConfigurationReconciler.
func (*ConfigurationReconciler) Reconcile ¶
func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile manage Configurations.
func (*ConfigurationReconciler) SetupWithManager ¶
func (r *ConfigurationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager register the ConfigurationReconciler to the manager. We need to watch GatewayServer and GatewayClient to trigger the reconcile of the Configuration when we are aware if the gateway pod will act as a server or a client. This allows us to set the correct gateway IP inside the route.