plugin

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyImageInRequest           = errors.New("image in plugin request was empty")
	ErrNilCredentialProviderResponse = errors.New("CredentialProviderResponse from plugin was nil")
	ErrUnsupportedAPIVersion         = errors.New("unsupported API version")
)
View Source
var (
	ErrUnsupportedRequestKind = errors.New(
		"unsupported credential provider request kind",
	)
	ErrConversionFailure = errors.New("conversion failure")
)

Functions

This section is empty.

Types

type CredentialProvider

type CredentialProvider interface {
	GetCredentials(
		ctx context.Context,
		image string,
		args []string,
	) (*v1.CredentialProviderResponse, error)
}

CredentialProvider is an interface implemented by the kubelet credential provider plugin to fetch the username/password based on the provided image name.

type ExecPlugin

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

ExecPlugin implements the exec-based plugin for fetching credentials that is invoked by the kubelet.

func NewProvider

func NewProvider(plugin CredentialProvider) *ExecPlugin

NewProvider returns an instance of execPlugin that fetches credentials based on the provided plugin implementing the CredentialProvider interface.

func (*ExecPlugin) Run

func (e *ExecPlugin) Run(ctx context.Context) error

Run executes the credential provider plugin. Required information for the plugin request (in the form of v1.CredentialProviderRequest) is provided via stdin from the kubelet. The CredentialProviderResponse, containing the username/password required for pulling the provided image, will be sent back to the kubelet via stdout.

Jump to

Keyboard shortcuts

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