package plugin

import "k8s.io/kubernetes/pkg/credentialprovider/plugin"

Index

Constants

const (
	KubeletSubsystem = "kubelet"
)

Functions

func NewExternalCredentialProviderDockerKeyring

func NewExternalCredentialProviderDockerKeyring(podNamespace, podName, podUID, serviceAccountName string) credentialprovider.DockerKeyring

func RegisterCredentialProviderPlugins

func RegisterCredentialProviderPlugins(pluginConfigPath, pluginBinDir string,
	getServiceAccountToken getServiceAccountTokenFunc,
	getServiceAccount GetServiceAccountFunc,
) error

RegisterCredentialProviderPlugins is called from kubelet to register external credential provider plugins according to the CredentialProviderConfig config file.

Types

type GetServiceAccountFunc

type GetServiceAccountFunc func(namespace, name string) (*v1.ServiceAccount, error)

GetServiceAccountFunc is a function type that returns a service account for the given namespace and name.

type Plugin

type Plugin interface {
	ExecPlugin(ctx context.Context, image, serviceAccountToken string, serviceAccountAnnotations map[string]string) (*credentialproviderapi.CredentialProviderResponse, error)
}

Plugin is the interface calling ExecPlugin. This is mainly for testability so tests don't have to actually exec any processes.

Source Files

config.go metrics.go plugin.go plugins.go

Version
v1.34.0-beta.0
Published
Jul 16, 2025
Platform
windows/amd64
Imports
42 packages
Last checked
3 minutes ago

Tools for package owners.