Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyImageInRequest = errors.New("image in plugin request was empty") ErrNilCredentialProviderResponse = errors.New("CredentialProviderResponse from plugin was nil") ErrUnsupportedAPIVersion = errors.New("unsupported API version") )
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, ) (*v1beta1.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 v1beta1.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.