Skip to content

Revisions are immutable but image in their spec don't capture a digest #12475

@steren

Description

@steren

/area API
/kind spec

A core idea of the Knative resource model is that Revisions are immutable, i.e. developers do not update Revisions, they update a Configuration or Service resource that will as an outcome create Revisions. Revisions contain the "configuration" (e.g. env vars) and the container image(s).

Because Revision are immutable, so should be the container they capture. So if an image is referenced by tag in the Configuration or Service object, I believe it is resolved to a specific digest before the Revision is created.

It took me a few years to realize that Revision.spec.containers[].image could be a digest or a tag. The digest is returned in Revision.status.imageDigest.

Because of this "tag to digest resolution", I was expecting Revision.spec.containers[].image to always explicitly capture a digest, even if a tag is passed in the spec of the Service or Configuration. This would have made it crystal clear that Revisions always point at image digests.

What is the rationale behind the current design?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/APIAPI objects and controllerskind/questionFurther information is requestedkind/specDiscussion of how a feature should be exposed to customers.triage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions