Commit Graph

4 Commits

Author SHA1 Message Date
Hidde Beydals 272329d86a
action: add `:` separator between ts and msg logs
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-11-20 12:06:45 +01:00
Hidde Beydals ea81c8e099
action: include TS in LogBuffer
This provides more context to individual log entries (and the duration
between individual log lines) while e.g. printing them in an event.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:08 +01:00
Hidde Beydals 9812286bb4
action: add `Len` method to `LogBuffer`
This allows for requesting the count of non-empty values in the ring
buffer, and thus the number of log lines.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2023-11-20 12:06:05 +01:00
Hidde Beydals 89a6f497e5
Run individual Helm actions using HelmRelease
This commit introduces an `action` package which allows the consumer to
run Helm actions using the instructions from a `HelmRelease` v2beta2
API object.

The actions do not determine if there is a desire be run, nor do they
record state on the object. This can however be injected by the caller
using the simplified observing Helm storage driver, which now iterates
over a list of callback functions after persisting an object instead
of keeping state.

This separation of concerns would allow e.g. the Flux CLI later on
to run actions (but with a dry-run flag or different storage
configuration) using the object in the same manner as the controller.

Some minor changes have been made to the `postrender` and `runner`
package to allow the code to co-exist while we are inbetween API
versions.

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