Documentation
¶
Overview ¶
Package network contains the commands to manage the network of Liqo.
Index ¶
- type Cluster
- func (c *Cluster) CheckNetworkInitialized(ctx context.Context, remoteClusterIdentity *discoveryv1alpha1.ClusterIdentity) error
- func (c *Cluster) DeleteConfiguration(ctx context.Context, name string) error
- func (c *Cluster) DeleteGatewayClient(ctx context.Context, name string) error
- func (c *Cluster) DeleteGatewayServer(ctx context.Context, name string) error
- func (c *Cluster) EnsureGatewayClient(ctx context.Context, name string, opts *gatewayclient.ForgeOptions) (*networkingv1alpha1.GatewayClient, error)
- func (c *Cluster) EnsureGatewayServer(ctx context.Context, name string, opts *gatewayserver.ForgeOptions) (*networkingv1alpha1.GatewayServer, error)
- func (c *Cluster) EnsurePublicKey(ctx context.Context, remoteClusterIdentity *discoveryv1alpha1.ClusterIdentity, ...) error
- func (c *Cluster) GetGatewayClient(ctx context.Context, name string) (*networkingv1alpha1.GatewayClient, error)
- func (c *Cluster) GetGatewayServer(ctx context.Context, name string) (*networkingv1alpha1.GatewayServer, error)
- func (c *Cluster) Init(ctx context.Context) error
- func (c *Cluster) SetClusterIdentity(ctx context.Context) error
- func (c *Cluster) SetLocalConfiguration(ctx context.Context) error
- func (c *Cluster) SetNamespaces(ctx context.Context) error
- func (c *Cluster) SetupConfiguration(ctx context.Context, conf *networkingv1alpha1.Configuration) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
Cluster contains the information about a cluster.
func NewCluster ¶
NewCluster returns a new Cluster struct.
func (*Cluster) CheckNetworkInitialized ¶
func (c *Cluster) CheckNetworkInitialized(ctx context.Context, remoteClusterIdentity *discoveryv1alpha1.ClusterIdentity) error
CheckNetworkInitialized checks if the network is initialized correctly.
func (*Cluster) DeleteConfiguration ¶
DeleteConfiguration deletes a Configuration.
func (*Cluster) DeleteGatewayClient ¶
DeleteGatewayClient deletes a GatewayClient.
func (*Cluster) DeleteGatewayServer ¶
DeleteGatewayServer deletes a GatewayServer.
func (*Cluster) EnsureGatewayClient ¶
func (c *Cluster) EnsureGatewayClient(ctx context.Context, name string, opts *gatewayclient.ForgeOptions) (*networkingv1alpha1.GatewayClient, error)
EnsureGatewayClient create or updates a GatewayClient.
func (*Cluster) EnsureGatewayServer ¶
func (c *Cluster) EnsureGatewayServer(ctx context.Context, name string, opts *gatewayserver.ForgeOptions) (*networkingv1alpha1.GatewayServer, error)
EnsureGatewayServer create or updates a GatewayServer.
func (*Cluster) EnsurePublicKey ¶
func (c *Cluster) EnsurePublicKey(ctx context.Context, remoteClusterIdentity *discoveryv1alpha1.ClusterIdentity, key []byte, ownerGateway metav1.Object) error
EnsurePublicKey create or updates a PublicKey.
func (*Cluster) GetGatewayClient ¶
func (c *Cluster) GetGatewayClient(ctx context.Context, name string) (*networkingv1alpha1.GatewayClient, error)
GetGatewayClient retrieves a GatewayClient.
func (*Cluster) GetGatewayServer ¶
func (c *Cluster) GetGatewayServer(ctx context.Context, name string) (*networkingv1alpha1.GatewayServer, error)
GetGatewayServer retrieves a GatewayServer.
func (*Cluster) SetClusterIdentity ¶
SetClusterIdentity set cluster identities of both local and remote clusters retrieving it from the Liqo configmaps.
func (*Cluster) SetLocalConfiguration ¶
SetLocalConfiguration forges and set a local Configuration to be applied on remote clusters.
func (*Cluster) SetNamespaces ¶
SetNamespaces sets the local and remote namespaces to the liqo-tenants namespaces (creating them if necessary), unless the user has explicitly set custom namespaces with the `--namespace` and/or `--remote-namespace` flags. All the external network resources will be created in these namespaces in their respective clusters.
func (*Cluster) SetupConfiguration ¶
func (c *Cluster) SetupConfiguration(ctx context.Context, conf *networkingv1alpha1.Configuration) error
SetupConfiguration sets up the network configuration.
type Options ¶
type Options struct { LocalFactory *factory.Factory RemoteFactory *factory.Factory Timeout time.Duration Wait bool ServerGatewayType string ServerTemplateName string ServerTemplateNamespace string ServerServiceType *argsutils.StringEnum ServerPort int32 ServerNodePort int32 ServerLoadBalancerIP string ClientGatewayType string ClientTemplateName string ClientTemplateNamespace string MTU int DisableSharingKeys bool Proxy bool }
Options encapsulates the arguments of the network command.
func NewOptions ¶
NewOptions returns a new Options struct.
func (*Options) RunConnect ¶
RunConnect connect two clusters using liqo networking.
func (*Options) RunDisconnect ¶
RunDisconnect disconnects two clusters.