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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
244 changes: 220 additions & 24 deletions artifacts/flagger/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,40 +78,43 @@ spec:
description: Deployment progress deadline
type: number
targetRef:
description: Deployment selector
description: Target selector
type: object
required: ["apiVersion", "kind", "name"]
properties:
apiVersion:
type: string
kind:
type: string
enum:
- Deployment
- Service
name:
type: string
autoscalerRef:
description: HPA selector
anyOf:
- type: string
- type: object
type: object
required: ["apiVersion", "kind", "name"]
properties:
apiVersion:
type: string
kind:
type: string
enum:
- HorizontalPodAutoscaler
name:
type: string
ingressRef:
description: NGINX ingress selector
anyOf:
- type: string
- type: object
type: object
required: ["apiVersion", "kind", "name"]
properties:
apiVersion:
type: string
kind:
type: string
enum:
- Ingress
name:
type: string
service:
Expand All @@ -136,6 +139,9 @@ spec:
portDiscovery:
description: Enable port dicovery
type: boolean
timeout:
description: HTTP or gRPC request timeout
type: string
meshName:
description: AppMesh mesh name
type: string
Expand All @@ -144,33 +150,190 @@ spec:
type: array
items:
type: string
timeout:
description: Istio HTTP or gRPC request timeout
type: string
hosts:
description: The list of host names for this service
type: array
items:
type: string
trafficPolicy:
description: Istio traffic policy
description: Istio mTLS traffic policy
type: object
properties:
tls:
description: TLS related settings for connections to the upstream service
type: object
properties:
caCertificates:
format: string
type: string
clientCertificate:
description: REQUIRED if mode is `MUTUAL`.
format: string
type: string
mode:
enum:
- DISABLE
- SIMPLE
- MUTUAL
- ISTIO_MUTUAL
type: string
privateKey:
description: REQUIRED if mode is `MUTUAL`.
format: string
type: string
sni:
description: SNI string to present to the server
during TLS handshake.
format: string
type: string
subjectAltNames:
items:
format: string
type: string
type: array
match:
description: URL match conditions
description: URI match conditions
type: array
items:
type: object
properties:
uri:
type: object
oneOf:
- required: ["exact"]
- required: ["prefix"]
- required: ["suffix"]
- required: ["regex"]
properties:
exact:
format: string
type: string
prefix:
format: string
type: string
suffix:
format: string
type: string
regex:
format: string
type: string
retries:
description: Retry policy for HTTP requests
type: object
properties:
attempts:
description: Number of retries for a given request
format: int32
type: integer
perTryTimeout:
description: Timeout per retry attempt for a given request
type: string
retryOn:
description: Specifies the conditions under which retry takes place
format: string
type: string
rewrite:
description: URL rewrite
description: Rewrite HTTP URIs
type: object
properties:
uri:
format: string
type: string
headers:
description: Headers operations
type: object
properties:
request:
properties:
add:
additionalProperties:
format: string
type: string
type: object
remove:
items:
format: string
type: string
type: array
set:
additionalProperties:
format: string
type: string
type: object
type: object
response:
properties:
add:
additionalProperties:
format: string
type: string
type: object
remove:
items:
format: string
type: string
type: array
set:
additionalProperties:
format: string
type: string
type: object
type: object
corsPolicy:
description: CORS policy
description: Cross-Origin Resource Sharing policy (CORS)
type: object
properties:
allowCredentials:
type: boolean
allowHeaders:
items:
format: string
type: string
type: array
allowMethods:
description: List of HTTP methods allowed to access the resource
items:
format: string
type: string
type: array
allowOrigin:
description: The list of origins that are allowed to perform
CORS requests.
items:
format: string
type: string
type: array
allowOrigins:
description: String patterns that match allowed origins
type: array
items:
type: object
oneOf:
- required:
- exact
- required:
- prefix
- required:
- regex
properties:
exact:
format: string
type: string
prefix:
format: string
type: string
regex:
format: string
type: string
exposeHeaders:
items:
format: string
type: string
type: array
maxAge:
type: string
gateways:
description: Gateway list
type: array
items:
type: string
hosts:
description: Host list
description: The list of Istio gateway for this virtual service
type: array
items:
type: string
Expand Down Expand Up @@ -205,12 +368,35 @@ spec:
type: array
items:
type: object
properties:
headers:
type: object
additionalProperties:
oneOf:
- required: ["exact"]
- required: ["prefix"]
- required: ["suffix"]
- required: ["regex"]
type: object
properties:
exact:
format: string
type: string
prefix:
format: string
type: string
suffix:
format: string
type: string
regex:
format: string
type: string
metrics:
description: Metric check list for this canary
type: array
items:
type: object
required: ["name", "threshold"]
required: ["name"]
properties:
name:
description: Name of the metric
Expand All @@ -222,6 +408,16 @@ spec:
threshold:
description: Max value accepted for this metric
type: number
thresholdRange:
description: Range accepted for this metric
type: object
properties:
min:
description: Min value accepted for this metric
type: number
max:
description: Max value accepted for this metric
type: number
query:
description: Prometheus query
type: string
Expand Down Expand Up @@ -268,9 +464,9 @@ spec:
pattern: "^[0-9]+(m|s)"
metadata:
description: Metadata (key-value pairs) for this webhook
anyOf:
- type: string
- type: object
type: object
additionalProperties:
type: string
status:
properties:
phase:
Expand Down
Loading