Documentation ¶
Index ¶
- Constants
- func ARTImages(ctx context.Context, client ctrlruntimeclient.Client, artImages []ArtImage, ...) (map[string]Source, error)
- func AddToManager(manager manager.Manager, configAgent agents.ConfigAgent, ...) error
- func LoadConfigFromReleaseRepo(configPath string) ([]byte, error)
- func NewClientFactory(opts ...ClientFactoryOpt) clientFactory
- func ObserveMirroringDuration(state string, value float64)
- func RegisterMetrics() error
- func SetMirrorQueueDepth(value float64)
- type ArtImage
- type CIImagesMirrorConfig
- type ClientFactoryOpt
- type ClientFactoryOpts
- type Config
- type IgnoredSource
- type ImageInfo
- type MirrorConsumerController
- type MirrorStore
- type MirrorTask
- type OCClient
- type OCImageInfoOptions
- type OCImageMirrorOptions
- type QuayIOImageHelper
- type Source
Constants ¶
View Source
const ControllerName = "quay_io_ci_images_distributor"
Variables ¶
This section is empty.
Functions ¶
func ARTImages ¶
func ARTImages(ctx context.Context, client ctrlruntimeclient.Client, artImages []ArtImage, ignoredSources []IgnoredSource) (map[string]Source, error)
func AddToManager ¶
func AddToManager(manager manager.Manager, configAgent agents.ConfigAgent, resolver registryResolver, additionalImageStreamTags, additionalImageStreams, additionalImageStreamNamespaces, ignoreImageStreamTags sets.Set[string], quayIOImageHelper QuayIOImageHelper, mirrorStore MirrorStore, registryConfig string, onlyValidManifestV2Images bool) error
func NewClientFactory ¶
func NewClientFactory(opts ...ClientFactoryOpt) clientFactory
NewClientFactory return a client factory for the images from quay.io
func ObserveMirroringDuration ¶
ObserveMirroringDuration observe the mirroring duration
func SetMirrorQueueDepth ¶
func SetMirrorQueueDepth(value float64)
SetMirrorQueueDepth sets the mirroring mirror queue's depth
Types ¶
type CIImagesMirrorConfig ¶
type CIImagesMirrorConfig struct { SupplementalCIImages map[string]Source `json:"supplementalCIImages"` IgnoredSources []IgnoredSource `json:"ignoredSources"` ArtImages []ArtImage `json:"artImages,omitempty"` }
func LoadConfig ¶
func LoadConfig(bytes []byte) (*CIImagesMirrorConfig, error)
func LoadConfigFromFile ¶
func LoadConfigFromFile(path string) (*CIImagesMirrorConfig, error)
type ClientFactoryOpt ¶
type ClientFactoryOpt func(*ClientFactoryOpts)
type ClientFactoryOpts ¶
type ClientFactoryOpts struct {
// contains filtered or unexported fields
}
type IgnoredSource ¶
type MirrorConsumerController ¶
type MirrorConsumerController struct {
// contains filtered or unexported fields
}
func NewMirrorConsumer ¶
func NewMirrorConsumer(mirrorStore MirrorStore, quayIOImageHelper QuayIOImageHelper, registryConfig string, dryRun bool) *MirrorConsumerController
type MirrorStore ¶
type MirrorStore interface { Put(t ...MirrorTask) error Take(n int) ([]MirrorTask, error) Show(n int) ([]MirrorTask, int, error) Summarize() (map[string]any, error) }
type MirrorTask ¶
type MirrorTask struct { SourceTagRef cioperatorapi.ImageStreamTagReference `json:"source_tag_ref"` Source string `json:"source"` Destination string `json:"destination"` CurrentQuayDigest string `json:"current_quay_digest"` CreatedAt time.Time `json:"created_at"` Stale bool `json:"stale"` Owner string `json:"owner"` }
type OCClient ¶
type OCClient interface { ImageInfo(image string, options OCImageInfoOptions) (ImageInfo, error) ImageMirror(pairs []string, options OCImageMirrorOptions) error }
type OCImageInfoOptions ¶
type OCImageMirrorOptions ¶
type QuayIOImageHelper ¶
type QuayIOImageHelper interface { ImageInfo(image string, options OCImageInfoOptions) (ImageInfo, error) ImageMirror(pairs []string, options OCImageMirrorOptions) error }
type Source ¶
type Source struct { api.ImageStreamTagReference `json:",inline"` // Image is an image that can be pulled in either form of tag or digest. // When image is set, Tag will be ignored. Image string `json:"image"` }
Click to show internal directories.
Click to hide internal directories.