Documentation ¶
Index ¶
- Variables
- func NewWWWAuthenticateRequest(wwwAuthenticate string) (string, *http.Request, error)
- func RegistryLabeller(req *http.Request, resp *http.Response) prometheus.Labels
- func WithAuthenticator(authenticator Authenticator) func(*PlainRegistry)
- func WithDockerProxies(proxies []RegistryProxy) func(*PlainRegistry)
- func WithRegistryMetricRegistry(reg metrics.RegistererGatherer) func(*PlainRegistry)
- func WithSchedulableArchitectures(archs []string) func(*PlainRegistry)
- func WithTransport(transport http.RoundTripper) func(*PlainRegistry)
- type AnonymousAuthenticator
- type AuthenticationSourceRef
- type AuthenticationToken
- type Authenticator
- type AuthenticatorFunc
- type Authenticators
- type Cache
- func (c *Cache[T]) CleanUp(now time.Time)
- func (c *Cache[T]) Load(cacheKey string) (*T, bool)
- func (c *Cache[T]) LoadOrCall(cacheKey string, miss func() (T, error)) (T, bool, error)
- func (c *Cache[T]) Store(cacheKey string, value *T, mutations ...func(*CacheEntry[T]))
- func (c *Cache[T]) WithExpiry(expiry time.Time) func(*CacheEntry[T])
- type CacheEntry
- type CacheMetrics
- type CacheOption
- type CachedRegistry
- type ContainerDAuthenticator
- type ContainerdConfig
- type ContainerdHeader
- type ContainerdHostConfig
- type ContainerdServerHeader
- type DockerAuth
- type DockerAuths
- type DockerConfig
- type DockerConfigAuthenticator
- type DockerConfigFileAuthenticator
- type ImagePullSecretAuthenticator
- type KubeletAuthenticator
- type PlainRegistry
- type Platform
- type Registry
- type RegistryFunc
- type RegistryMetrics
- type RegistryProxy
- type WWWAuthenticateTransport
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRegistry = NewPlainRegistry()
Functions ¶
func RegistryLabeller ¶
func WithAuthenticator ¶
func WithAuthenticator(authenticator Authenticator) func(*PlainRegistry)
func WithDockerProxies ¶
func WithDockerProxies(proxies []RegistryProxy) func(*PlainRegistry)
func WithRegistryMetricRegistry ¶
func WithRegistryMetricRegistry(reg metrics.RegistererGatherer) func(*PlainRegistry)
func WithSchedulableArchitectures ¶
func WithSchedulableArchitectures(archs []string) func(*PlainRegistry)
func WithTransport ¶
func WithTransport(transport http.RoundTripper) func(*PlainRegistry)
Types ¶
type AnonymousAuthenticator ¶
type AnonymousAuthenticator struct {
PrivateRegistryPatterns []string
}
func (AnonymousAuthenticator) Authenticate ¶
func (r AnonymousAuthenticator) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type AuthenticationSourceRef ¶
type AuthenticationSourceRef struct {
Provider string
}
type AuthenticationToken ¶
type AuthenticationToken struct { Kind string Token string Ref AuthenticationSourceRef }
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
}
type AuthenticatorFunc ¶
type AuthenticatorFunc func(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
func (AuthenticatorFunc) Authenticate ¶
func (f AuthenticatorFunc) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type Authenticators ¶
type Authenticators []Authenticator
func NewAuthenticator ¶
func NewAuthenticator(kubeletConfigFile, kubeletBinDir string, privateRegistryPaterns []string) Authenticators
func (Authenticators) Authenticate ¶
func (a Authenticators) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type Cache ¶
type Cache[T any] struct { CleanUpPeriod time.Duration CacheDuration time.Duration // contains filtered or unexported fields }
func (*Cache[T]) LoadOrCall ¶
func (*Cache[T]) Store ¶
func (c *Cache[T]) Store(cacheKey string, value *T, mutations ...func(*CacheEntry[T]))
func (*Cache[T]) WithExpiry ¶
func (c *Cache[T]) WithExpiry(expiry time.Time) func(*CacheEntry[T])
type CacheEntry ¶
type CacheMetrics ¶
type CacheMetrics struct { Requests *prometheus.CounterVec Responses *prometheus.CounterVec }
func NewCacheMetrics ¶
func NewCacheMetrics(prefix, system string) *CacheMetrics
func (CacheMetrics) MustRegister ¶
func (m CacheMetrics) MustRegister(reg metrics.RegistererGatherer)
type CacheOption ¶
type CacheOption func(*CachedRegistry)
func WithCacheMetricsRegistry ¶
func WithCacheMetricsRegistry(reg metrics.RegistererGatherer) CacheOption
type CachedRegistry ¶
type CachedRegistry struct {
// contains filtered or unexported fields
}
func NewCachedRegistry ¶
func NewCachedRegistry(registry Registry, cacheDuration time.Duration, opts ...CacheOption) *CachedRegistry
type ContainerDAuthenticator ¶
type ContainerDAuthenticator struct {
// contains filtered or unexported fields
}
func (ContainerDAuthenticator) Authenticate ¶
func (r ContainerDAuthenticator) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type ContainerdConfig ¶
type ContainerdConfig struct { Server string `toml:"server"` Hosts map[string]ContainerdHostConfig `toml:"host"` }
type ContainerdHeader ¶
type ContainerdHeader struct {
Authorization string `toml:"authorization"`
}
type ContainerdHostConfig ¶
type ContainerdHostConfig struct { Capabilities []string `toml:"capabilities"` Header ContainerdHeader `toml:"header"` }
type ContainerdServerHeader ¶
type DockerAuth ¶
type DockerAuth struct {
Auth string `json:"auth"`
}
type DockerAuths ¶
type DockerAuths map[string]DockerAuth
type DockerConfig ¶
type DockerConfig struct { Auths DockerAuths `json:"auths"` CredsStore string `json:"credsStore"` }
type DockerConfigAuthenticator ¶
type DockerConfigAuthenticator struct { KubeletAuthenticator Authenticator Provider string // contains filtered or unexported fields }
func (DockerConfigAuthenticator) Authenticate ¶
func (r DockerConfigAuthenticator) Authenticate(ctx context.Context, cfg DockerConfig, registry, image, tag string, candidates chan AuthenticationToken)
type DockerConfigFileAuthenticator ¶
type DockerConfigFileAuthenticator struct { DockerConfigAuthenticator // contains filtered or unexported fields }
func (DockerConfigFileAuthenticator) Authenticate ¶
func (r DockerConfigFileAuthenticator) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type ImagePullSecretAuthenticator ¶
type ImagePullSecretAuthenticator struct {
DockerConfigAuthenticator
}
func (ImagePullSecretAuthenticator) Authenticate ¶
func (r ImagePullSecretAuthenticator) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type KubeletAuthenticator ¶
type KubeletAuthenticator struct { BinDir string Config string // contains filtered or unexported fields }
func (KubeletAuthenticator) Authenticate ¶
func (r KubeletAuthenticator) Authenticate(ctx context.Context, imagePullSecret, registry, image, tag string, candidates chan AuthenticationToken)
type PlainRegistry ¶
type PlainRegistry struct { Scheme string Transport http.RoundTripper Authenticator Authenticator Proxies []RegistryProxy Metrics *RegistryMetrics SchedulableArchitectures []string // contains filtered or unexported fields }
func NewPlainRegistry ¶
func NewPlainRegistry(builders ...func(*PlainRegistry)) *PlainRegistry
type RegistryFunc ¶
type RegistryMetrics ¶
type RegistryMetrics struct { Requests *prometheus.CounterVec Errors *prometheus.CounterVec Responses *prometheus.CounterVec RateLimitRemaining *prometheus.GaugeVec RateLimitLimit *prometheus.GaugeVec RateLimitWindow *prometheus.GaugeVec }
func NewRegistryMetrics ¶
func NewRegistryMetrics(prefix string) *RegistryMetrics
func (RegistryMetrics) MustRegister ¶
func (m RegistryMetrics) MustRegister(reg metrics.RegistererGatherer)
type RegistryProxy ¶
func ParseRegistryProxies ¶
func ParseRegistryProxies(proxies string) []RegistryProxy
type WWWAuthenticateTransport ¶
type WWWAuthenticateTransport struct { Transport http.RoundTripper // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.