You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an outstanding feature request for the Helm Operator to be able to run the Helm test action on an interval. The goal of this discussion is to decide if we accept this feature, and if so, what the (behavioural) design would look like.
Proposal
Spec changes
Test
Interval defines the interval at which a test should be run at. If the interval is a lower value than the HelmReleaseSpec.Interval, it will take precedence when scheduling the next reconciliation.
diff --git a/docs/spec/v2alpha1/helmreleases.md b/docs/spec/v2alpha1/helmreleases.md
index bf6010d..a57f5df 100644
--- a/docs/spec/v2alpha1/helmreleases.md+++ b/docs/spec/v2alpha1/helmreleases.md@@ -179,6 +201,11 @@ type Test struct {
// +optional
Enable bool `json:"enable,omitempty"`
+ // Interval at which to perform the Helm test action.+ // Defaults to none.+ // +optional+ Interval *metav1.Duration `json:"interval,omitempty"`+
// Timeout is the time to wait for any individual Kubernetes operation
// during the performance of a Helm test action. Defaults to
// 'HelmReleaseSpec.Timeout'.
Status
The HelmReleaseStatus struct requires a new field to be able to determine when we should perform the test during reconciliation.
diff --git a/api/v2alpha1/helmrelease_types.go b/api/v2alpha1/helmrelease_types.go
index da5d475..ba66f70 100644
--- a/api/v2alpha1/helmrelease_types.go+++ b/api/v2alpha1/helmrelease_types.go@@ -352,6 +352,10 @@ type HelmReleaseStatus struct {
// +optional
LastReleaseRevision int `json:"lastReleaseRevision,omitempty"`
+ // LastTestRun is the timestamp of the last test run.+ // +optional+ LastTestRun *metav1.Timestamp `json:"lastTestRun,omitempty"`+
// HelmChart is the namespaced name of the HelmChart resource created by
// the controller for the HelmRelease.
// +optional
Annotation
The TestAtAnnotation behaves like the ReconcileAtAnnotation, and schedules a new reconciliation. The reason it is a separate annotation is because the value of the annotation takes precedence over the interval.
If a test is run because of the annotation, the timestamp value of the annotation is pushed to the HelmReleaseStatus.LastTestRun to only run the test once for the annotation.
const (
// TestAtAnnotation is the annotation used for triggering a Helm// test action outside of the specified schedule.TestAtAnnotationstring="fluxcd.io/testAt"
)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Outline
There is an outstanding feature request for the Helm Operator to be able to run the Helm test action on an interval. The goal of this discussion is to decide if we accept this feature, and if so, what the (behavioural) design would look like.
Proposal
Spec changes
Test
Interval
defines the interval at which a test should be run at. If the interval is a lower value than theHelmReleaseSpec.Interval
, it will take precedence when scheduling the next reconciliation.Status
The
HelmReleaseStatus
struct requires a new field to be able to determine when we should perform the test during reconciliation.Annotation
The
TestAtAnnotation
behaves like theReconcileAtAnnotation
, and schedules a new reconciliation. The reason it is a separate annotation is because the value of the annotation takes precedence over the interval.If a test is run because of the annotation, the timestamp value of the annotation is pushed to the
HelmReleaseStatus.LastTestRun
to only run the test once for the annotation.Beta Was this translation helpful? Give feedback.
All reactions