api: introduce `Digest` field to `Artifact`

As discussed in RFC-0005, this introduces a `Digest` field to the
`Artifact` in favor of the now deprecated `Checksum`.

Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
Hidde Beydals 2022-11-07 12:30:01 +00:00
parent ade77ec95a
commit bda4b0bffe
6 changed files with 37 additions and 1 deletions

View File

@ -43,9 +43,15 @@ type Artifact struct {
Revision string `json:"revision"`
// Checksum is the SHA256 checksum of the Artifact file.
// Deprecated, use Artifact.Digest instead.
// +optional
Checksum string `json:"checksum"`
// Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
// +optional
// +kubebuilder:validation:Pattern="^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$"
Digest string `json:"digest"`
// LastUpdateTime is the timestamp corresponding to the last update of the
// Artifact.
// +required

View File

@ -378,6 +378,11 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact file.
Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to

View File

@ -553,6 +553,11 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact file.
Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to
@ -675,7 +680,12 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact
file.
file. Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of
'<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to

View File

@ -453,6 +453,11 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact file.
Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to

View File

@ -370,6 +370,11 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact file.
Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to

View File

@ -196,6 +196,11 @@ spec:
properties:
checksum:
description: Checksum is the SHA256 checksum of the Artifact file.
Deprecated, use Artifact.Digest instead.
type: string
digest:
description: Digest is the digest of the file in the form of '<algorithm>:<checksum>'.
pattern: ^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$
type: string
lastUpdateTime:
description: LastUpdateTime is the timestamp corresponding to