pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
218 stars 55 forks source link

Use digest field for Flux source artifact if present #459

Closed rquitales closed 1 year ago

rquitales commented 1 year ago

Proposed changes

v1 of the Flux source artifact type removed the .status.artifact.checksum field in favor of .status.artifact.digest. This PR adds logic to use the digest field with a fallback for checksum.

Note: we need to normalize the digest field since the current verifier function only accepts a hash, instead of the digest format (<algorithm>:<hash>"). We'd have to update github.com/fluxcd/pkg/http/fetch to at least v0.4.0 or higher to remove this normalization. However, upgrading our dependencies isn't as simple as go get -u ./... && go mod tidy since our dependencies are relatively old and the project will need to be refactored.

Related issues (optional)

Fixes: #457