cni

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CalicoNetworkIPIPAll IPIP-All mode
	CalicoNetworkIPIPAll = "Overlay-IPIP-All"
	// CalicoNetworkIPIPSubnet IPIP-Cross-Subnet mode
	CalicoNetworkIPIPSubnet = "Overlay-IPIP-Cross-Subnet"
	// CalicoNetworkVXLANAll Vxlan-All mode
	CalicoNetworkVXLANAll = "Overlay-Vxlan-All"
	// CalicoNetworkVXLANSubnet Vxlan-Cross-Subnet mode
	CalicoNetworkVXLANSubnet = "Overlay-Vxlan-Cross-Subnet"
	// CalicoNetworkBGP BGP mode
	CalicoNetworkBGP = "BGP"
)
View Source
const CalicoV3224 = `` /* 223203-byte string literal not displayed */

apiVersion: policy/v1beta1 => apiVersion: policy/v1 https://projectcalico.docs.tigera.io/archive/v3.22/manifests/calico.yaml

Variables

This section is empty.

Functions

func ApplyYaml

func ApplyYaml(yamlName string, nodes []v1.StepNode) v1.Step

func LoadImage

func LoadImage(name string, custom []byte, nodes []v1.StepNode) v1.Step

func RecoveryCNICmd

func RecoveryCNICmd(metadata *component.ExtraMetadata) (cmdList map[string]string, err error)

RecoveryCNICmd get recovery cni cmd

func Register

func Register(factory CniFactory)

func RemoveImage

func RemoveImage(name string, custom []byte, nodes []v1.StepNode) v1.Step

func RenderYaml

func RenderYaml(name string, custom []byte, nodes []v1.StepNode) v1.Step

Types

type BaseCni

type BaseCni struct {
	v1.CNI
	DualStack   bool   `json:"dualStack"`
	PodIPv4CIDR string `json:"podIPv4CIDR"`
	PodIPv6CIDR string `json:"podIPv6CIDR"`
}

func (*BaseCni) Install

func (runnable *BaseCni) Install(ctx context.Context, opts component.Options) ([]byte, error)

func (*BaseCni) NewInstance

func (runnable *BaseCni) NewInstance() component.ObjectMeta

func (*BaseCni) Uninstall

func (runnable *BaseCni) Uninstall(ctx context.Context, opts component.Options) ([]byte, error)

type CalicoRunnable

type CalicoRunnable struct {
	BaseCni
}

func (*CalicoRunnable) CalicoTemplate

func (runnable *CalicoRunnable) CalicoTemplate() (string, error)

func (*CalicoRunnable) CmdList

func (runnable *CalicoRunnable) CmdList(namespace string) map[string]string

CmdList cni kubectl cmd list

func (*CalicoRunnable) Create

func (runnable *CalicoRunnable) Create() Stepper

func (*CalicoRunnable) InitStep

func (runnable *CalicoRunnable) InitStep(metadata *component.ExtraMetadata, cni *v1.CNI, networking *v1.Networking) Stepper

func (*CalicoRunnable) InstallSteps

func (runnable *CalicoRunnable) InstallSteps(nodes []v1.StepNode) ([]v1.Step, error)

func (*CalicoRunnable) LoadImage

func (runnable *CalicoRunnable) LoadImage(nodes []v1.StepNode) ([]v1.Step, error)

func (*CalicoRunnable) NewInstance

func (runnable *CalicoRunnable) NewInstance() component.ObjectMeta

func (*CalicoRunnable) Render

func (runnable *CalicoRunnable) Render(ctx context.Context, opts component.Options) error

func (*CalicoRunnable) Type

func (runnable *CalicoRunnable) Type() string

func (*CalicoRunnable) UninstallSteps

func (runnable *CalicoRunnable) UninstallSteps(nodes []v1.StepNode) ([]v1.Step, error)

type CniFactory

type CniFactory interface {
	Type() string
	Create() Stepper
}

func Load

func Load(cniType string) (CniFactory, error)

type Stepper

type Stepper interface {
	InitStep(metadata *component.ExtraMetadata, cni *v1.CNI, networking *v1.Networking) Stepper
	LoadImage(nodes []v1.StepNode) ([]v1.Step, error)
	InstallSteps(nodes []v1.StepNode) ([]v1.Step, error)
	UninstallSteps(nodes []v1.StepNode) ([]v1.Step, error)
	CmdList(namespace string) map[string]string
}

Jump to

Keyboard shortcuts

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