Documentation
¶
Overview ¶
Package network contains the commands to manage the network of Liqo.
Index ¶
- type Cluster
- func (c *Cluster) CheckAlreadyEstablishedForGwClient(ctx context.Context) (bool, error)
- func (c *Cluster) CheckAlreadyEstablishedForGwServer(ctx context.Context) (bool, error)
- func (c *Cluster) CheckNetworkInitialized(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
- func (c *Cluster) CheckTemplateGwClient(ctx context.Context, opts *Options) error
- func (c *Cluster) CheckTemplateGwServer(ctx context.Context, opts *Options) error
- func (c *Cluster) DeleteConfiguration(ctx context.Context, remoteClusterID liqov1beta1.ClusterID, namespace string) error
- func (c *Cluster) DeleteGatewayClient(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
- func (c *Cluster) DeleteGatewayServer(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
- func (c *Cluster) EnsureGatewayClient(ctx context.Context, opts *forge.GwClientOptions) (*networkingv1beta1.GatewayClient, error)
- func (c *Cluster) EnsureGatewayServer(ctx context.Context, opts *forge.GwServerOptions) (*networkingv1beta1.GatewayServer, error)
- func (c *Cluster) EnsurePublicKey(ctx context.Context, remoteClusterID liqov1beta1.ClusterID, key []byte, ...) error
- func (c *Cluster) SetClusterIDs(ctx context.Context) error
- func (c *Cluster) SetLocalConfiguration(ctx context.Context) error
- func (c *Cluster) SetNamespaces(ctx context.Context, createTenantNs bool) error
- func (c *Cluster) SetupConfiguration(ctx context.Context, conf *networkingv1beta1.Configuration) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster contains the information about a cluster.
func NewCluster ¶
func NewCluster(ctx context.Context, local, remote *factory.Factory, createTenantNs bool) (*Cluster, error)
NewCluster returns a new Cluster struct.
func (*Cluster) CheckAlreadyEstablishedForGwClient ¶
CheckAlreadyEstablishedForGwClient checks if a GatewayClient is already established.
func (*Cluster) CheckAlreadyEstablishedForGwServer ¶
CheckAlreadyEstablishedForGwServer checks if a GatewayServer is already established.
func (*Cluster) CheckNetworkInitialized ¶
func (c *Cluster) CheckNetworkInitialized(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
CheckNetworkInitialized checks if the network is initialized correctly in the current cluster.
func (*Cluster) CheckTemplateGwClient ¶
CheckTemplateGwClient checks if the GatewayClient template is correctly set up.
func (*Cluster) CheckTemplateGwServer ¶
CheckTemplateGwServer checks if the GatewayServer template is correctly set up.
func (*Cluster) DeleteConfiguration ¶
func (c *Cluster) DeleteConfiguration(ctx context.Context, remoteClusterID liqov1beta1.ClusterID, namespace string) error
DeleteConfiguration deletes a Configuration. If tenantNamespace is empty this function searches in all the namespaces in the cluster.
func (*Cluster) DeleteGatewayClient ¶
func (c *Cluster) DeleteGatewayClient(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
DeleteGatewayClient deletes a GatewayClient.
func (*Cluster) DeleteGatewayServer ¶
func (c *Cluster) DeleteGatewayServer(ctx context.Context, remoteClusterID liqov1beta1.ClusterID) error
DeleteGatewayServer deletes a GatewayServer.
func (*Cluster) EnsureGatewayClient ¶
func (c *Cluster) EnsureGatewayClient(ctx context.Context, opts *forge.GwClientOptions) (*networkingv1beta1.GatewayClient, error)
EnsureGatewayClient create or updates a GatewayClient.
func (*Cluster) EnsureGatewayServer ¶
func (c *Cluster) EnsureGatewayServer(ctx context.Context, opts *forge.GwServerOptions) (*networkingv1beta1.GatewayServer, error)
EnsureGatewayServer create or updates a GatewayServer.
func (*Cluster) EnsurePublicKey ¶
func (c *Cluster) EnsurePublicKey(ctx context.Context, remoteClusterID liqov1beta1.ClusterID, key []byte, ownerGateway metav1.Object) error
EnsurePublicKey create or updates a PublicKey.
func (*Cluster) SetClusterIDs ¶
SetClusterIDs set the local and remote cluster id 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 specified), 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 *networkingv1beta1.Configuration) error
SetupConfiguration sets up the network configuration.
type Options ¶
type Options struct {
LocalFactory *factory.Factory
RemoteFactory *factory.Factory
Timeout time.Duration
Wait bool
SkipValidation bool
ServerGatewayType string
ServerTemplateName string
ServerTemplateNamespace string
ServerServiceType *argsutils.StringEnum
ServerServicePort int32
ServerServiceNodePort int32
ServerServiceLoadBalancerIP string
ClientGatewayType string
ClientTemplateName string
ClientTemplateNamespace string
// ClientConnectAddress is the address used by the client to connect to the gateway server. When this value is specified
// liqoctl ignores the values of server and port written in the GatewayServer status.
ClientConnectAddress string
// ClientConnectPort is the port used by the client to connect to the gateway server. When this value is specified
// liqoctl ignores the values of server and port written in the GatewayServer status.
ClientConnectPort int32
MTU int
DisableSharingKeys 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. It deletes the gateways (if present) on both clusters. Cluster1 and Cluster2 are optional, if not provided they will be created and initialized.