upstream

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package upstream stores credentials for third-party registries (§5.9). Nodes pull public images directly from their registries; with a stored credential (e.g. a Docker Hub account against rate limits, or a private GHCR image) the controller passes it along with the pull.

Index

Constants

View Source
const DockerHub = "docker.io"

DockerHub is the canonical host for Docker Hub images.

Variables

This section is empty.

Functions

func ImageHost

func ImageHost(image string) string

ImageHost returns the registry host of an image reference, the way Docker resolves it: "nginx" and "acme/app" are on Docker Hub.

func NormalizeHost

func NormalizeHost(h string) string

NormalizeHost maps Docker Hub's aliases to docker.io and lowercases.

Types

type ErrInvalid

type ErrInvalid struct{ Err error }

ErrInvalid wraps validation errors.

func (ErrInvalid) Error

func (e ErrInvalid) Error() string

type Manager

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

func New

func New(st *store.Store, box *secrets.Box) *Manager

func (*Manager) Credential added in v0.1.7

func (m *Manager) Credential(ctx context.Context, host string) (string, string, bool)

Credential returns the username and password stored for a registry host.

func (*Manager) DockerConfigAuths

func (m *Manager) DockerConfigAuths(ctx context.Context) map[string]any

DockerConfigAuths are the "auths" of a Docker config.json holding every credential (for BuildKit pulling private FROM images).

func (*Manager) Put

func (m *Manager) Put(ctx context.Context, host, username, password string) (store.UpstreamCredential, error)

func (*Manager) RegistryAuth

func (m *Manager) RegistryAuth(ctx context.Context, image string) string

RegistryAuth is the X-Registry-Auth header value for pulling image, or "" when no credential matches its registry.

Jump to

Keyboard shortcuts

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