So far, sources referenced by Component
objects (typically flux sources) are expected to have a certain 'revision'. The revision more or less uniquely identifies the referenced content in the source system. For example, in case of a GitRepository
, the revision is a git SHA; in case of a HelmChart
, it is the helm chart's version.
Until now, component-operator used this revision to identify the source content, that is
- to decide whether components are up-to-date, respectively synced
- to pin dependent components.
However, this was not 100% accurate. Because the referenced content might change with revision remaining the same ('moving revision'), or a new revision might reference identical content.
Fortunately, the source types we are currently handling have also a content digest, which is more adequate to identify the content.
This PR tries to fix the relevant pieces of logic, such that
- whenever content is identified, the digest (or digest plus revision) is considered
- pinning can be done by revision (to stay backwards compatible), and also by digest; that is, a new spec field
spec.digest
is introduced.