diff --git a/manifest/v1alpha/slo/slo.go b/manifest/v1alpha/slo/slo.go index 2176c757..c5130c02 100644 --- a/manifest/v1alpha/slo/slo.go +++ b/manifest/v1alpha/slo/slo.go @@ -57,6 +57,7 @@ type Spec struct { // Deprecated: this implementation of Composite will be removed and replaced with SLO.Spec.Objectives.Composite. Composite *Composite `json:"composite,omitempty"` AnomalyConfig *AnomalyConfig `json:"anomalyConfig,omitempty"` + Tier string `json:"tier,omitempty"` } // Attachment represents user defined URL attached to SLO. diff --git a/manifest/v1alpha/slo/validation.go b/manifest/v1alpha/slo/validation.go index 17dfa757..ffb86bdd 100644 --- a/manifest/v1alpha/slo/validation.go +++ b/manifest/v1alpha/slo/validation.go @@ -138,6 +138,9 @@ var specValidation = govy.New[Spec]( _, err := ParseBudgetingMethod(v) return err })), + govy.For(func(s Spec) string { return s.Tier }). + WithName("tier"). + Rules(rules.StringLength(0, 63)), govy.For(func(s Spec) string { return s.Service }). WithName("service"). Required().