Fix issue with apiVersion v1 lock digest

When apiVersion v1 chart dependencies are built with Helm 2
and then built with Helm 3, the lock digests differ. To avoid
this issue, a depdendency update is forced.

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
pull/7261/head
Martin Hickey 6 years ago
parent ecc0070417
commit 255e47e4a4

@ -86,6 +86,11 @@ func (m *Manager) Build() error {
}
if sum, err := resolver.HashReq(req, lock.Dependencies); err != nil || sum != lock.Digest {
// If lock digest differs and chart is apiVersion v1, it maybe because the lock was built
// with Helm 2 and should therefore be regenerated
if c.Metadata.APIVersion == chart.APIVersionV1 {
return m.Update()
}
return errors.New("Chart.lock is out of sync with Chart.yaml")
}

Loading…
Cancel
Save