Skip to content

Commit

Permalink
PC-14075 Add field
Browse files Browse the repository at this point in the history
  • Loading branch information
BSski committed Sep 27, 2024
1 parent 0f2c9a4 commit a69def8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifest/v1alpha/slo/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

// Attachment represents user defined URL attached to SLO.
Expand Down
3 changes: 3 additions & 0 deletions manifest/v1alpha/slo/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down

0 comments on commit a69def8

Please sign in to comment.