bulk

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExpectedAPIVersion = "copa.sh/v1alpha1"
	ExpectedKind       = "PatchConfig"
)
View Source
const (
	StrategyList    = "list"
	StrategyPattern = "pattern"
	StrategyLatest  = "latest"
)

Variables

This section is empty.

Functions

func FindTagsToPatch

func FindTagsToPatch(spec *ImageSpec) ([]string, error)

FindTagsToPatch discovers image tags based on the specified strategy in the ImageSpec.

func PatchFromConfig

func PatchFromConfig(ctx context.Context, configPath string, opts *types.Options) error

PatchFromConfig orchestrates the bulk patching process based on a configuration file.

Types

type ImageSpec

type ImageSpec struct {
	Name      string      `yaml:"name"`
	Image     string      `yaml:"image"`
	Tags      TagStrategy `yaml:"tags"`
	Target    TargetSpec  `yaml:"target,omitempty"`
	Platforms []string    `yaml:"platforms,omitempty"`
}

ImageSpec defines the configuration for patching a single image.

type PatchConfig

type PatchConfig struct {
	APIVersion string      `yaml:"apiVersion"`
	Kind       string      `yaml:"kind"`
	Images     []ImageSpec `yaml:"images"`
}

PatchConfig represents the top-level structure for the bulk patching configuration.

type TagStrategy

type TagStrategy struct {
	Strategy string   `yaml:"strategy"`
	Pattern  string   `yaml:"pattern,omitempty"`
	MaxTags  int      `yaml:"maxTags,omitempty"`
	List     []string `yaml:"list,omitempty"`
	Exclude  []string `yaml:"exclude,omitempty"`
	// contains filtered or unexported fields
}

TagStrategy defines the method for discovering image tags to be patched.

func (*TagStrategy) UnmarshalYAML

func (t *TagStrategy) UnmarshalYAML(unmarshal func(interface{}) error) error

type TargetSpec

type TargetSpec struct {
	Tag string `yaml:"tag,omitempty"`
}

TargetSpec defines how the patched image's tag should be named.

Jump to

Keyboard shortcuts

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