Documentation
¶
Index ¶
- Constants
- func BuildImageValuesMap(infoGetter *InfoGetter) (map[string]interface{}, error)
- func BuildStubImageValuesMap(repo, tag string) map[string]interface{}
- func ExtractRepoDigest(inspectRepoDigests []string, repository string) string
- func GetDigestAndCreationTsFromLocalStageImageTag(repoStageImageTag string) (string, int64, error)
- func Init() error
- func MustParseTimestampString(timestampString string) time.Time
- func MutateAndPushImage(ctx context.Context, storage Storage, ...) error
- func NormalizeRepository(repository string) (res string)
- func ParseCreationTs(creationTs string) (int64, error)
- func ParseRepositoryAndTag(ref string) (string, string)
- func UpdateConfigFile(updates SpecConfig, target *v1.ConfigFile)
- type Container
- type ContainerFilter
- type ContainerList
- type CustomTagFunc
- type ExportTagFunc
- type HealthConfig
- type ImagesList
- type Info
- type InfoGetter
- type InfoGetterOptions
- type ManifestCache
- func (cache *ManifestCache) DeleteImageInfo(ctx context.Context, storageName, imageName string) error
- func (cache *ManifestCache) GetImageInfo(ctx context.Context, storageName, imageName string) (*Info, error)
- func (cache *ManifestCache) StoreImageInfo(ctx context.Context, storageName string, imgInfo *Info) error
- type ManifestCacheRecord
- type SpecConfig
- type StageDesc
- type StageDescSet
- type StageID
- type Storage
- type Summary
Constants ¶
View Source
const ( WerfLabelPrefix = "werf" WerfLabel = "werf" WerfVersionLabel = "werf-version" WerfStageContentDigestLabel = "werf-stage-content-digest" WerfProjectRepoCommitLabel = "werf-project-repo-commit" WerfImportChecksumLabelPrefix = "werf-import-checksum-" WerfImportSourceStageIDLabelPrefix = "werf-import-source-stage-id-" WerfImportSourceExternalImagePrefix = "external-image" WerfDependencySourceStageIDLabelPrefix = "werf-dependency-stage-id-" WerfBaseImageIDLabel = "werf.io/base-image-id" WerfParentStageID = "werf.io/parent-stage-id" WerfImportMetadataChecksumLabel = "checksum" WerfImportMetadataSourceStageIDLabel = "source-stage-id" WerfImportMetadataImportSourceIDLabel = "import-source-id" WerfCustomTagMetadataStageIDLabel = "stage-id" WerfCustomTagMetadataTag = "tag" WerfMountTmpDirLabel = "werf-mount-type-tmp-dir" WerfMountBuildDirLabel = "werf-mount-type-build-dir" WerfMountCustomDirLabelPrefix = "werf-mount-type-custom-dir-" BuildCacheVersion = "1.2" StageContainerNamePrefix = "werf.build." ImportServerContainerNamePrefix = "import-server-" AssemblingContainerNamePrefix = "werf.stapel." )
View Source
const ( DockerHubRepositoryPrefix = "docker.io/library/" IndexDockerHubRepositoryPrefix = "index.docker.io/library/" )
View Source
const (
ManifestCacheVersion = "5"
)
Variables ¶
This section is empty.
Functions ¶
func BuildImageValuesMap ¶ added in v2.65.0
func BuildImageValuesMap(infoGetter *InfoGetter) (map[string]interface{}, error)
func BuildStubImageValuesMap ¶ added in v2.65.0
func ExtractRepoDigest ¶
ExtractRepoDigest return repo@digest from the list.
func GetDigestAndCreationTsFromLocalStageImageTag ¶ added in v2.60.0
func MutateAndPushImage ¶ added in v2.53.0
func NormalizeRepository ¶
func ParseCreationTs ¶ added in v2.6.6
func ParseRepositoryAndTag ¶
func UpdateConfigFile ¶ added in v2.53.0
func UpdateConfigFile(updates SpecConfig, target *v1.ConfigFile)
Types ¶
type ContainerFilter ¶
type ContainerList ¶
type ContainerList []Container
type CustomTagFunc ¶
type ExportTagFunc ¶
type HealthConfig ¶ added in v2.24.0
type ImagesList ¶
type ImagesList []Summary
func (ImagesList) ConvertToStages ¶
func (list ImagesList) ConvertToStages() ([]StageID, error)
FIXME(multiarch): take into account multiarch stages, which does not use creationTs
type Info ¶
type Info struct {
Name string `json:"name"`
Repository string `json:"repository"`
Tag string `json:"tag"`
// FIXME remove RepoDigest from Info and use Digest everywhere instead cause it's more clear and repo part is not needed.
// repo@sha256:digest
RepoDigest string `json:"repoDigest"`
OnBuild []string `json:"onBuild"`
Env []string `json:"env"`
ID string `json:"ID"`
ParentID string `json:"parentID"`
Labels map[string]string `json:"labels"`
Size int64 `json:"size"`
CreatedAtUnixNano int64 `json:"createdAtUnixNano"`
Volumes map[string]struct{} `json:"volumes"`
IsIndex bool
Index []*Info
}
func (*Info) GetCreatedAt ¶
func (*Info) SetCreatedAtUnix ¶
func (*Info) SetCreatedAtUnixNano ¶
type InfoGetter ¶
type InfoGetter struct {
WerfImageName string
Repo string
Tag string
Digest string
InfoGetterOptions
}
func NewInfoGetter ¶
func NewInfoGetter(imageName, ref, digest string, opts InfoGetterOptions) *InfoGetter
func (*InfoGetter) GetName ¶
func (d *InfoGetter) GetName() string
func (*InfoGetter) GetTag ¶
func (d *InfoGetter) GetTag() string
func (*InfoGetter) GetWerfImageName ¶
func (d *InfoGetter) GetWerfImageName() string
func (*InfoGetter) IsNameless ¶
func (d *InfoGetter) IsNameless() bool
type InfoGetterOptions ¶
type InfoGetterOptions struct {
CustomTagFunc CustomTagFunc
OnlyFinal bool
}
type ManifestCache ¶
type ManifestCache struct {
CacheDir string
}
var CommonManifestCache *ManifestCache
func NewManifestCache ¶
func NewManifestCache(cacheDir string) *ManifestCache
func (*ManifestCache) DeleteImageInfo ¶ added in v2.62.2
func (cache *ManifestCache) DeleteImageInfo(ctx context.Context, storageName, imageName string) error
func (*ManifestCache) GetImageInfo ¶
func (*ManifestCache) StoreImageInfo ¶
type ManifestCacheRecord ¶
type SpecConfig ¶ added in v2.53.0
type SpecConfig struct {
Created string `json:"created"`
Author string `json:"author"`
User string `json:"User"`
ExposedPorts map[string]struct{} `json:"ExposedPorts"`
Env []string `json:"Env"`
Entrypoint []string `json:"Entrypoint"`
Cmd []string `json:"Cmd"`
Volumes map[string]struct{} `json:"Volumes"`
WorkingDir string `json:"WorkingDir"`
Labels map[string]string `json:"Labels"`
StopSignal string `json:"StopSignal"`
HealthConfig *HealthConfig `json:"Healthcheck,omitempty"`
ClearHistory bool
ClearCmd bool
ClearEntrypoint bool
ClearUser bool
ClearWorkingDir bool
}
ImageSpecConfig represents OCI image configuration https://github.com/opencontainers/image-spec/blob/main/config.md
type StageDescSet ¶ added in v2.14.0
func NewStageDescSet ¶ added in v2.14.0
func NewStageDescSet(descList ...*StageDesc) StageDescSet
type StageID ¶
type StageID struct {
Digest string `json:"digest"`
// FIXME: rename to CreationTs / update cacheVersion
CreationTs int64 `json:"uniqueID"`
IsMultiplatform bool `json:"isMultiplatform"`
}
func NewStageID ¶
func (StageID) CreationTsToTime ¶ added in v2.6.6
Click to show internal directories.
Click to hide internal directories.