registries

package
v1.9.28 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StagingURL of SUSE Staging registry
	StagingURL string = "stgregistry.suse.com/"
	// DockerURL of images
	DockerURL string = "docker.io/"
)

Variables

View Source
var LoadImageVersionList = config.LoadImageVersionList

Functions

func DockerCheckRCTags

func DockerCheckRCTags(ctx context.Context, repoRoot string) map[string][]string

DockerCheckRCTags checks for any images that have RC tags

func DockerScan added in v1.6.7

func DockerScan(ctx context.Context) error

DockerScan lists the repository tags from the local assets/ folder, compares them against the corresponding Docker Hub repository tags, and reports any discrepancies. It returns an error if an image tag from the assets/ folder is not found on Docker Hub, or if a repository is not in the `rancher` namespace.

func GenerateFilteredImageTagMap

func GenerateFilteredImageTagMap(ctx context.Context, filter map[string][]string) (map[string][]string, error)

GenerateFilteredImageTagMap returns a map of container images and their tags

func PushChartToOCI added in v1.9.9

func PushChartToOCI(ctx context.Context, rootFs billy.Filesystem, ociDNS, customPath, ociUser, ociPass string, debug, overwrite bool) error

PushChartToOCI reads release.yaml and pushes all listed chart versions to an OCI registry. It validates credentials, sets up an authenticated Helm registry client, then runs a two-phase check-and-push: pre-flight validation first, then push of only the new assets. Existing versions in the registry are skipped rather than overwritten.

func Scan

func Scan(ctx context.Context, primeRegistry string) error

Scan will untar and map all images/tags dependencies, scan the staging registry, prime registry and if they are available there, it will create 2 yaml files:

  • dockerToPrime.yaml
  • stagingToPrime.yaml

Which will be used by another process to sync images/tags to Prime registry.

func Sync

func Sync(ctx context.Context, primeURL, customPath string) error

Sync will load the sync yaml files and iterate through each image/tags copying and pushing without overwriting anything. There can be 2 sources:

  • Docker Hub
  • Staging Registry

There is only one destination:

  • Prime Registry

Types

type CVEReport added in v1.9.28

type CVEReport struct {
	Chart           string           `json:"chart"`
	Version         string           `json:"version"`
	CVECounts       SeverityCounts   `json:"CVEs"`
	Images          []ImageCVEResult `json:"images"`
	PreviousVersion string           `json:"previousVersion,omitempty"`
	Delta           *SeverityCounts  `json:"delta,omitempty"`
}

CVEReport is the top-level output of CheckChartCVEs.

func CheckChartCVEs added in v1.9.28

func CheckChartCVEs(ctx context.Context, repoRoot, chart, version string) (CVEReport, error)

CheckChartCVEs scans every image used by chart/version with Trivy, and if a previous released version with the same major exists, scans it too and reports the CVE delta.

type ImageCVEResult added in v1.9.28

type ImageCVEResult struct {
	Repository string         `json:"repository"`
	Tag        string         `json:"tag"`
	CVECounts  SeverityCounts `json:"CVEs"`
}

ImageCVEResult holds the CVE counts found for a single image:tag.

type ImageResult added in v1.9.26

type ImageResult struct {
	Repository      string `json:"repository"`
	CurrentTag      string `json:"currentTag"`
	LatestAvailable string `json:"latestAvailable"`
	NeedsUpdate     bool   `json:"needsUpdate"`
}

ImageResult holds the version-check result for one image.

type LintWarning added in v1.9.12

type LintWarning struct {
	Asset      string // path to the .tgz file
	YAMLPath   string // dot-notation path to the offending node, e.g. "httpHeaderInjectorWebhook.proxy.image"
	Repository string // the repository value found
	Tag        string // the tag value found (empty string if missing/null)
	Reason     string // "orphan_repository" | "wrong_namespace"
}

LintWarning represents a violation of image block rules in a chart's values.yaml.

func LintImageTags added in v1.9.12

func LintImageTags(ctx context.Context, baseBranch, tgzOverride string) ([]LintWarning, error)

LintImageTags enforces three rules on every image block found in the values.yaml of each PR-changed .tgz asset:

  1. repository present + tag missing/empty/null → block (orphan_repository)
  2. repository present + tag valid + repository not rancher/* → block (wrong_namespace)
  3. repository present + tag valid + repository is rancher/* → pass

type Report added in v1.9.26

type Report struct {
	Chart              string        `json:"chart"`
	NeedsUpdate        bool          `json:"needsUpdate"`
	Images             []ImageResult `json:"images"`
	MissingFromChart   []string      `json:"missingFromChart,omitempty"`
	SkippedUnsupported []string      `json:"skippedUnsupported,omitempty"`
}

Report is the top-level output of ValidateImageVersions.

func ValidateImageVersions added in v1.9.26

func ValidateImageVersions(ctx context.Context, repoRoot, chart, version string) (Report, error)

ValidateImageVersions checks whether the images listed in configPath are on their latest minor/patch version within the chart at <repoRoot>/charts/<chart>/<version>.

type SeverityCounts added in v1.9.28

type SeverityCounts struct {
	Critical int64 `json:"critical"`
	High     int64 `json:"high"`
	Medium   int64 `json:"medium"`
	Low      int64 `json:"low"`
	Unknown  int64 `json:"unknown"`
}

SeverityCounts holds the number of CVEs found for each severity level.

Jump to

Keyboard shortcuts

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