Documentation ¶
Overview ¶
Package forge contains utility functions to forge resources of the networking module.
Index ¶
- Constants
- func Configuration(name, namespace string, remoteClusterID liqov1beta1.ClusterID, ...) *networkingv1beta1.Configuration
- func ConfigurationForRemoteCluster(ctx context.Context, cl client.Client, namespace, liqoNamespace string) (*networkingv1beta1.Configuration, error)
- func GatewayClient(namespace string, name *string, o *GwClientOptions) (*networkingv1beta1.GatewayClient, error)
- func GatewayServer(namespace string, name *string, o *GwServerOptions) (*networkingv1beta1.GatewayServer, error)
- func MutateConfiguration(conf *networkingv1beta1.Configuration, remoteClusterID liqov1beta1.ClusterID, ...)
- func MutateGatewayClient(gwClient *networkingv1beta1.GatewayClient, o *GwClientOptions) error
- func MutateGatewayServer(gwServer *networkingv1beta1.GatewayServer, o *GwServerOptions) error
- func MutatePublicKey(pubKey *networkingv1beta1.PublicKey, remoteClusterID liqov1beta1.ClusterID, ...) error
- func PublicKey(namespace string, name *string, remoteClusterID liqov1beta1.ClusterID, ...) (*networkingv1beta1.PublicKey, error)
- func PublicKeyForRemoteCluster(ctx context.Context, cl client.Client, ...) (*networkingv1beta1.PublicKey, error)
- type GwClientOptions
- type GwServerOptions
Constants ¶
const ( DefaultMTU = 1340 DefaultProtocol = "UDP" )
Common default values for the networking module.
const ( DefaultGwClientType = "networking.liqo.io/v1beta1/wggatewayclienttemplates" DefaultGwClientTemplateName = "wireguard-client" )
Default values for the GatewayClient.
const ( DefaultGwServerType = "networking.liqo.io/v1beta1/wggatewayservertemplates" DefaultGwServerTemplateName = "wireguard-server" DefaultGwServerServiceType = corev1.ServiceTypeLoadBalancer DefaultGwServerPort = 51840 DefaultKeysDir = "/etc/wireguard/keys" )
Default values for the GatewayServer.
Variables ¶
This section is empty.
Functions ¶
func Configuration ¶
func Configuration(name, namespace string, remoteClusterID liqov1beta1.ClusterID, podCIDR, externalCIDR string) *networkingv1beta1.Configuration
Configuration forges a Configuration resource of a remote cluster.
func ConfigurationForRemoteCluster ¶
func ConfigurationForRemoteCluster(ctx context.Context, cl client.Client, namespace, liqoNamespace string) (*networkingv1beta1.Configuration, error)
ConfigurationForRemoteCluster forges a Configuration of the local cluster to be applied to a remote cluster. It retrieves the local configuration settings starting from the cluster identity and the IPAM storage.
func GatewayClient ¶
func GatewayClient(namespace string, name *string, o *GwClientOptions) (*networkingv1beta1.GatewayClient, error)
GatewayClient forges a GatewayClient.
func GatewayServer ¶
func GatewayServer(namespace string, name *string, o *GwServerOptions) (*networkingv1beta1.GatewayServer, error)
GatewayServer forges a GatewayServer.
func MutateConfiguration ¶
func MutateConfiguration(conf *networkingv1beta1.Configuration, remoteClusterID liqov1beta1.ClusterID, podCIDR, externalCIDR string)
MutateConfiguration mutates a Configuration resource of a remote cluster.
func MutateGatewayClient ¶
func MutateGatewayClient(gwClient *networkingv1beta1.GatewayClient, o *GwClientOptions) error
MutateGatewayClient mutates a GatewayClient.
func MutateGatewayServer ¶
func MutateGatewayServer(gwServer *networkingv1beta1.GatewayServer, o *GwServerOptions) error
MutateGatewayServer mutates a GatewayServer.
func MutatePublicKey ¶
func MutatePublicKey(pubKey *networkingv1beta1.PublicKey, remoteClusterID liqov1beta1.ClusterID, key []byte) error
MutatePublicKey mutates a PublicKey.
func PublicKey ¶
func PublicKey(namespace string, name *string, remoteClusterID liqov1beta1.ClusterID, key []byte) (*networkingv1beta1.PublicKey, error)
PublicKey forges a PublicKey.
func PublicKeyForRemoteCluster ¶
func PublicKeyForRemoteCluster(ctx context.Context, cl client.Client, liqoNamespace, namespace, gatewayName, gatewayType string) (*networkingv1beta1.PublicKey, error)
PublicKeyForRemoteCluster forges a PublicKey to be applied on a remote cluster.
Types ¶
type GwClientOptions ¶
type GwClientOptions struct { KubeClient kubernetes.Interface RemoteClusterID liqov1beta1.ClusterID GatewayType string TemplateName string TemplateNamespace string MTU int Addresses []string Port int32 Protocol string }
GwClientOptions encapsulate the options to forge a GatewayClient.
type GwServerOptions ¶
type GwServerOptions struct { KubeClient kubernetes.Interface RemoteClusterID liqov1beta1.ClusterID GatewayType string TemplateName string TemplateNamespace string ServiceType corev1.ServiceType MTU int Port int32 NodePort *int32 LoadBalancerIP *string }
GwServerOptions encapsulate the options to forge a GatewayServer.