kubernetes

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationKeyPublicKey = "wireguard/public_key"
	AnnotationKeyEndpoint  = "wireguard/endpoint"
)

Variables

This section is empty.

Functions

func EndpointAddress

func EndpointAddress(node *corev1.Node) (addr *net.UDPAddr, err error)

func GetNodeByPublicKey

func GetNodeByPublicKey(ctx context.Context, c client.Reader, publicKey string) (*corev1.Node, error)

func GetPreferredAddress

func GetPreferredAddress(node *corev1.Node, preferred []corev1.NodeAddressType) *corev1.NodeAddress

func IsEndpointNotFound

func IsEndpointNotFound(err error) bool

func IsNodeNotInitializedError

func IsNodeNotInitializedError(err error) bool

func IsPublicKeyNotFound

func IsPublicKeyNotFound(err error) bool

func PeerConfigForExistingPeer

func PeerConfigForExistingPeer(ctx context.Context, log *zap.Logger, r client.Reader, peer *wgtypes.Peer) (*wgtypes.PeerConfig, error)

func PeerConfigForNode

func PeerConfigForNode(log *zap.Logger, node *corev1.Node) (*wgtypes.PeerConfig, error)

func PublicKey

func PublicKey(node *corev1.Node) (key wgtypes.Key, err error)

func RegisterPublicKeyIndexer

func RegisterPublicKeyIndexer(ctx context.Context, indexer client.FieldIndexer) error

func SetEndpointAddress

func SetEndpointAddress(node *corev1.Node, address string) bool

func SetPublicKey

func SetPublicKey(node *corev1.Node, publicKey wgtypes.Key) bool

Types

type EndpointNotFoundError

type EndpointNotFoundError struct{}

func (EndpointNotFoundError) Error

func (e EndpointNotFoundError) Error() string

type Networks

type Networks []net.IPNet

func AllowedNetworks

func AllowedNetworks(node *corev1.Node) (networks Networks, err error)

func (Networks) String

func (n Networks) String() string

type NodeNotInitializedError

type NodeNotInitializedError struct {
	// contains filtered or unexported fields
}

func (NodeNotInitializedError) Error

func (e NodeNotInitializedError) Error() string

type PodCIDRIsEmptyError

type PodCIDRIsEmptyError struct{}

func (PodCIDRIsEmptyError) Error

func (e PodCIDRIsEmptyError) Error() string

type PublicKeyNotFoundError

type PublicKeyNotFoundError struct{}

func (PublicKeyNotFoundError) Error

func (e PublicKeyNotFoundError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL