-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
Description
Overview
As a user of NGF, I would like to add CEL tests for the ObservabilityPolicy CRD so that I can be confident that the CEL validation works as I expect
UACs
- Add test for the
targetRef
CEL validation - Add test for the
tracing
CEL validation
targetRef
validation:
x-kubernetes-validations:
- message: 'TargetRef Kind must be: HTTPRoute or GRPCRoute'
rule: (self.exists(t, t.kind=='HTTPRoute') || self.exists(t, t.kind=='GRPCRoute'))
- message: TargetRef Group must be gateway.networking.k8s.io
rule: self.all(t, t.group=='gateway.networking.k8s.io')
- message: TargetRef Kind and Name combination must be unique
rule: self.all(p1, self.exists_one(p2, (p1.name == p2.name) && (p1.kind
== p2.kind)))
tracing
validation:
x-kubernetes-validations:
- message: ratio can only be specified if strategy is of type ratio
rule: '!(has(self.ratio) && self.strategy != ''ratio'')'
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
🆕 New