Commit Graph

5 Commits

Author SHA1 Message Date
Stefan Prodan 7f78cdc368
Add the chart app version to events metadata
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-07 00:14:55 +03:00
Hidde Beydals c5a017cb76
api: record observed releases in `Status.History`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:53 +01:00
Hidde Beydals 94064da340
controller: add reconcile release tests
Plus some minor improvements to the logic, based on writing tests.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:42 +01:00
Hidde Beydals 64cc09ce5e
reconcile: test emitted events
Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:08 +01:00
Hidde Beydals dfebba2783
Add `ObservedRelease` and other release utils
This adds a `release` package which allows to create (minified)
`ObservedRelease` copy of a Helm release object. This
`ObservedRelease` contains sufficient data to detect changes
to the storage object made by Helm actions run manually, and a variety
of malicious changes (but not all, at present).

The data in an `ObservedRelease` can be filtered using a `DataFilter`,
this allows for example to filter out test hooks to prevent the
controller from taking action on a manually run `helm test`.

The consumer can combine the `ObservedRelease` with a Helm storage
observer to take snapshots of the release object as written to the
storage by a Helm action. To record this on a `HelmRelease` v2beta2 API
object, the `ObservedRelease` can be transformed into a
`HelmReleaseInfo` API object which can be recorded as either the
Current or Previous release in the status.

During the transformation, the digests of both the `ObservedRelease`
object and release config are calculated using the canonical algorithm.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:00 +01:00