cni

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BinPath is the path to the cni plugins binary.
	BinPath = "/opt/cni/bin"

	// TgzPath is the path to install the cni-plugins tgz file
	TgzPath = "/opt/cni/plugins/cni-plugins.tgz"
)

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, opts InstallOptions) error

func Uninstall

func Uninstall() error

func Upgrade added in v1.0.4

func Upgrade(ctx context.Context, src Source, log *zap.Logger) error

Upgrade re-installs the cni-plugins available from the source Since cni-plugins is delivered as a tarball, its not possible to check if they are due for an upgrade todo: (@vignesh-goutham) check if we can publish cni-plugins independently with their checksum on our manifest

Types

type InstallOptions added in v1.0.4

type InstallOptions struct {
	// InstallRoot is optionally the root directory of the installation
	// If not provided, the default will be /
	InstallRoot string
	Logger      *zap.Logger
	Source      Source
	Tracker     *tracker.Tracker
}

type Source

type Source interface {
	GetCniPlugins(context.Context) (artifact.Source, error)
}

Source represents a source that serves a cni plugins binary.

Jump to

Keyboard shortcuts

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