cloudprivateipconfig

package
v0.0.0-...-f648c78 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFamily

type IPFamily string

IPFamily string representing ip family

const (
	// IPv4 IPFamily constant ipv4 family
	IPv4 IPFamily = "ipv4"
	// IPv6 IPFamily constant ipv6 family
	IPv6 IPFamily = "ipv6"
)

func NameToIP

func NameToIP(name string) (net.IP, IPFamily, error)

NameToIP converts the resource name to net.IP. Given a limitation in the Kubernetes API server (see: https://github.com/kubernetes/kubernetes/pull/100950) CloudPrivateIPConfig.metadata.name cannot represent an IPv6 address. To work-around this limitation it was decided that the network plugin creating the CR will fully expand the IPv6 address and replace all colons with dots, Example: The IPv6 address fc00:f853:ccd:e793::54 will be represented as: fc00.f853.0ccd.e793.0000.0000.0000.0054, We thus need to replace every fifth character's dot with a colon.

Jump to

Keyboard shortcuts

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