Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement metric range validation #424

Merged
merged 5 commits into from
Feb 9, 2020
Merged

Implement metric range validation #424

merged 5 commits into from
Feb 9, 2020

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Feb 8, 2020

This PR adds range validation for the canary analysis metrics. The thresholdRange takes precedence over threshold when both are specified.

Changes:

  • add CanaryThresholdRange type to Canary API
  • add optional thresholdRange field to the analysis metric object
  • implement min/max metric result validation
  • add e2e and unit tests for metric checks
  • improve Canary CRD schema

Range validation example:

  canaryAnalysis:
    metrics:
      - name: "database connections"
        interval: 1m
        templateRef:
          name: db-con
        thresholdRange:
          min: 2
          max: 120

Fix: #125
Fix: #387

- add CanaryThresholdRange type to Canary API
- add optional thresholdRange field to the analysis metric object
- implement min/max metric result validation
- thresholdRange takes precedence over threshold when both are specified
- add thresholdRange validation
- add Kubernetes Kind validation for target, autoscaler and ingress
- add validation for webhook metadata map[string]string
- add missing Istio types to schema validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cover metrics.Observer code in scheduler tests Range validation for Custom Metrics
1 participant