validate

package
v1.16.15 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPv4ExpectedIPCount      = 1
	DualstackExpectedIPCount = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	IPv4 string `json:"ipv4"`
	IPv6 string `json:"ipv6"`
}

type AddressPool

type AddressPool struct {
	Addresses map[string]AddressRecord `json:"Addresses"`
}

type AddressRecord

type AddressRecord struct {
	Addr  net.IP
	InUse bool
}

type AddressSpace

type AddressSpace struct {
	Pools map[string]AddressPool `json:"Pools"`
}

type AddressSpaces

type AddressSpaces struct {
	AddrSpaces map[string]AddressSpace `json:"AddressSpaces"`
}

type AzureCniState

type AzureCniState struct {
	AzureCniState AzureVnetNetwork `json:"Network"`
}

parse azure-vnet.json azure cni manages endpoint state

type AzureVnet

type AzureVnet struct {
	NetworkInfo NetworkInfo `json:"Network"`
}

type AzureVnetEndpointInfo

type AzureVnetEndpointInfo struct {
	IfName      string
	MacAddress  string
	IPAddresses []Prefix
	PodName     string
}

type AzureVnetInfo

type AzureVnetInfo struct {
	Name     string
	Networks map[string]AzureVnetNetworkInfo // key: network name, value: NetworkInfo
}

type AzureVnetIpam

type AzureVnetIpam struct {
	IPAM AddressSpaces `json:"IPAM"`
}

type AzureVnetNetwork

type AzureVnetNetwork struct {
	Version            string                   `json:"Version"`
	TimeStamp          string                   `json:"TimeStamp"`
	ExternalInterfaces map[string]InterfaceInfo `json:"ExternalInterfaces"`
}

type AzureVnetNetworkInfo

type AzureVnetNetworkInfo struct {
	ID        string
	Mode      string
	Subnets   []Subnet
	Endpoints map[string]AzureVnetEndpointInfo // key: azure endpoint name, value: AzureVnetEndpointInfo
	PodName   string
}

type CNSLocalCache

type CNSLocalCache struct {
	IPConfigurationStatus []cns.IPConfigurationStatus `json:"IPConfigurationStatus"`
}

type CiliumEndpointStatus

type CiliumEndpointStatus struct {
	Status NetworkingStatus `json:"status"`
}

type CnsManagedState

type CnsManagedState struct {
	Endpoints map[string]restserver.EndpointInfo `json:"Endpoints"`
}

type Endpoint

type Endpoint struct {
	IPAddresses []net.IPNet `json:"IPAddresses"`
	IfName      string      `json:"IfName"`
}

type ExternalInterface

type ExternalInterface struct {
	Networks map[string]Network `json:"Networks"`
}

type HNSEndpoint

type HNSEndpoint struct {
	MacAddress       string `json:"MacAddress"`
	IPAddress        net.IP `json:"IPAddress"`
	IPv6Address      net.IP `json:"IPv6Address"`
	IsRemoteEndpoint bool   `json:",omitempty"`
}

type HNSNetwork

type HNSNetwork struct {
	Name           string `json:"Name"`
	IPv6           bool   `json:"IPv6"`
	ManagementIP   string `json:"ManagementIP"`
	ManagementIPv6 string `json:"ManagementIPv6"`
	State          int    `json:"State"`
}

type InterfaceInfo

type InterfaceInfo struct {
	Name     string                          `json:"Name"`
	Networks map[string]AzureVnetNetworkInfo `json:"Networks"` // key: networkName, value: AzureVnetNetworkInfo
}

type Network

type Network struct {
	Endpoints map[string]Endpoint `json:"Endpoints"`
}

type NetworkInfo

type NetworkInfo struct {
	ExternalInterfaces map[string]ExternalInterface `json:"ExternalInterfaces"`
}

type NetworkingAddressing

type NetworkingAddressing struct {
	Addresses     []Address `json:"addressing"`
	InterfaceName string    `json:"interface-name"`
}

type NetworkingStatus

type NetworkingStatus struct {
	Networking NetworkingAddressing `json:"networking"`
}

type Prefix

type Prefix struct {
	IP   string
	Mask string
}

type Subnet

type Subnet struct {
	Family    int
	Prefix    Prefix
	Gateway   string
	PrimaryIP string
}

type Validator

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

func CreateValidator

func CreateValidator(ctx context.Context, clientset *kubernetes.Clientset, config *rest.Config, namespace, cni string, restartCase bool, os string) (*Validator, error)

func (*Validator) Cleanup

func (v *Validator) Cleanup(ctx context.Context)

func (*Validator) Validate

func (v *Validator) Validate(ctx context.Context) error

func (*Validator) ValidateDualStackControlPlane

func (v *Validator) ValidateDualStackControlPlane(ctx context.Context) error

func (*Validator) ValidateStateFile

func (v *Validator) ValidateStateFile(ctx context.Context) error

func (*Validator) ValidateV4OverlayControlPlane

func (v *Validator) ValidateV4OverlayControlPlane(ctx context.Context) error

Jump to

Keyboard shortcuts

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