Skip to content

Provide image digest instead of a tag #1723

@Zebradil

Description

@Zebradil

All or most of victoriametrics custom resource definitions have .spec.image.tag and .spec.image.repository.
But there's no .spec.image.digest. What's the way to set image digest?

Setting tag to something like v1.123.0@sha256xxx... should work in theory.
However, in case of active license, the tag gets a special handling:

func addEntSuffixToTag(versionTag string) string {
// expected version tag is:
// vX.Y.Z with optional suffix -
if !strings.HasPrefix(versionTag, "v") || strings.Count(versionTag, ".") != 2 {
return versionTag
}
idx := strings.Index(versionTag, "-")
if idx > 0 {
suffix := versionTag[idx:]
switch suffix {
case "-enterprise", "-enterprise-cluster":
case "-cluster":
versionTag = versionTag[:idx] + "-enterprise-cluster"
}
} else {
versionTag += "-enterprise"
}
return versionTag
}

It seems that it should work fine for values like v1.123.0-enterprise@sha256xxx..., but I'm not sure if this won't suddenly break in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions