knative / knative/serving

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

Open
#12,475 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/API kind/question kind/spec triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

/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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Revision API fields named in the issue, especially spec.containers[].image and status.imageDigest, and trace how tag-to-digest resolution is represented. The issue does not identify files or tests; completion would require deciding and documenting the rationale or changing the API behavior so immutable Revisions clearly capture image digests.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.