internal

package
v0.4.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build_kernel_info_annotations

func Build_kernel_info_annotations(p *gobpfman.ListResponse_ListResult) map[string]string

Convert a list result into a set of kernel info annotations

func DoesProgExist

func DoesProgExist(actual *gobpfman.ListResponse_ListResult, expected *gobpfman.LoadRequest) (bool, []string)

Look at using https://pkg.go.dev/google.golang.org/protobuf/testing/protocmp to simplify. Is state equal, ignoring UUID and GRPC type fields.

func GetBpfmanProgram

func GetBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, uuid types.UID) (*gobpfman.ListResponse_ListResult, error)

func GetID

get the program ID from a bpfProgram

func GetPrimaryNodeInterface

func GetPrimaryNodeInterface(ourNode *v1.Node) (string, error)

func ListAllPrograms

func ListAllPrograms(ctx context.Context, bpfmanClient gobpfman.BpfmanClient) ([]*gobpfman.ListResponse_ListResult, error)

func ListBpfmanPrograms

func ListBpfmanPrograms(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, programType internal.ProgramType) (map[string]*gobpfman.ListResponse_ListResult, error)

func LoadBpfmanProgram

func LoadBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient,
	loadRequest *gobpfman.LoadRequest) (*uint32, error)

func UnloadBpfmanProgram

func UnloadBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, id uint32) error

Types

type ContainerConfig

type ContainerConfig map[string]ContainerConfigEntry

DockerConfig represents the config file used by the docker CLI. This config that represents the credentials that should be used when pulling images from specific image repositories.

func ParseAuth

func ParseAuth(c client.Client, secretName, secretNamespace string) (*ContainerConfig, error)

Mimicking exactly what Kubernetes does to pull out auths from secrets: https://github.com/kubernetes/kubernetes/blob/master/pkg/credentialprovider/secrets/secrets.go#L29

type ContainerConfigEntry

type ContainerConfigEntry struct {
	Username string
	Password string
	Email    string
}

ContainerConfigEntry wraps a container config as a entry

func (*ContainerConfigEntry) UnmarshalJSON

func (ident *ContainerConfigEntry) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type ContainerConfigEntryWithAuth

type ContainerConfigEntryWithAuth struct {
	// +optional
	Username string `json:"username,omitempty"`
	// +optional
	Password string `json:"password,omitempty"`
	// +optional
	Email string `json:"email,omitempty"`
	// +optional
	Auth string `json:"auth,omitempty"`
}

dockerConfigEntryWithAuth is used solely for deserializing the Auth field into a dockerConfigEntry during JSON deserialization.

type ContainerConfigJSON

type ContainerConfigJSON struct {
	Auths ContainerConfig `json:"auths"`
	// +optional
	HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"`
}

ContainerConfigJSON represents ~/.docker/config.json file info See https://github.com/docker/docker/pull/12009 Structure from https://github.com/kubernetes/kubernetes/blob/master/pkg/credentialprovider/config.go#L39

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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