-
Notifications
You must be signed in to change notification settings - Fork 140
Labels
communityrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.testsPull requests that update testsPull requests that update tests
Milestone
Description
Overview
As a user of NGF, I would like to add CEL tests for the NginxPolicy CRD so that I can be confident that the CEL validation works as I expect
UACs
- Add test for the
kubernetesCEL validation - Add test for the
rewriteClientIPCEL validation - Add test for the
autoscalingCEL validation
kubernetes validation:
x-kubernetes-validations:
- message: only one of deployment or daemonSet can be set
rule: (!has(self.deployment) && !has(self.daemonSet)) || ((has(self.deployment)
&& !has(self.daemonSet)) || (!has(self.deployment) && has(self.daemonSet)))rewriteClientIP validation:
x-kubernetes-validations:
- message: if mode is set, trustedAddresses is a required field
rule: '!(has(self.mode) && (!has(self.trustedAddresses) || size(self.trustedAddresses)
== 0))'autoscaling validation:
x-kubernetes-validations:
- message: minReplicas must be less than or equal to maxReplicas
rule: (!has(self.minReplicas)) || (self.minReplicas <= self.maxReplicas)Metadata
Metadata
Assignees
Labels
communityrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.testsPull requests that update testsPull requests that update tests
Type
Projects
Status
✅ Done