From 691c3c4f36d8cf2692757b5cbd66a921d6e6b46d Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Wed, 7 Aug 2019 10:22:07 +0300 Subject: [PATCH] Add missing fields to CRD validation spec --- artifacts/flagger/crd.yaml | 61 +++++++++++++++++++++++++++++++ charts/flagger/templates/crd.yaml | 61 +++++++++++++++++++++++++++++++ kustomize/base/flagger/crd.yaml | 61 +++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+) diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index 548ef6d2..842076d1 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -46,10 +46,13 @@ spec: - canaryAnalysis properties: provider: + description: Traffic managent provider type: string progressDeadlineSeconds: + description: Deployment progress deadline type: number targetRef: + description: Deployment selector type: object required: ['apiVersion', 'kind', 'name'] properties: @@ -60,6 +63,7 @@ spec: name: type: string autoscalerRef: + description: HPA selector anyOf: - type: string - type: object @@ -72,6 +76,7 @@ spec: name: type: string ingressRef: + description: NGINX ingress selector anyOf: - type: string - type: object @@ -88,15 +93,60 @@ spec: required: ['port'] properties: port: + description: Container port number type: number portName: + description: Container port name type: string portDiscovery: + description: Enable port dicovery type: boolean meshName: + description: AppMesh mesh name type: string + backends: + description: AppMesh backend array + anyOf: + - type: string + - type: object timeout: + description: Istio HTTP or gRPC request timeout type: string + trafficPolicy: + description: Istio traffic policy + anyOf: + - type: string + - type: object + match: + description: Istio URL match conditions + anyOf: + - type: string + - type: array + rewrite: + description: Istio URL rewrite + anyOf: + - type: string + - type: object + headers: + description: Istio headers operations + anyOf: + - type: string + - type: object + corsPolicy: + description: Istio CORS policy + anyOf: + - type: string + - type: object + gateways: + description: Istio gateways list + anyOf: + - type: string + - type: array + hosts: + description: Istio hosts list + anyOf: + - type: string + - type: array skipAnalysis: type: boolean canaryAnalysis: @@ -117,6 +167,11 @@ spec: stepWeight: description: Canary incremental traffic percentage step type: number + match: + description: A/B testing match conditions + anyOf: + - type: string + - type: array metrics: description: Prometheus query list for this canary type: array @@ -154,6 +209,7 @@ spec: type: string enum: - "" + - confirm-rollout - pre-rollout - rollout - post-rollout @@ -165,6 +221,11 @@ spec: description: Request timeout for this webhook type: string pattern: "^[0-9]+(m|s)" + metadata: + description: Metadata (key-value pairs) for this webhook + anyOf: + - type: string + - type: object status: properties: phase: diff --git a/charts/flagger/templates/crd.yaml b/charts/flagger/templates/crd.yaml index a60bf529..76d56ae8 100644 --- a/charts/flagger/templates/crd.yaml +++ b/charts/flagger/templates/crd.yaml @@ -47,10 +47,13 @@ spec: - canaryAnalysis properties: provider: + description: Traffic managent provider type: string progressDeadlineSeconds: + description: Deployment progress deadline type: number targetRef: + description: Deployment selector type: object required: ['apiVersion', 'kind', 'name'] properties: @@ -61,6 +64,7 @@ spec: name: type: string autoscalerRef: + description: HPA selector anyOf: - type: string - type: object @@ -73,6 +77,7 @@ spec: name: type: string ingressRef: + description: NGINX ingress selector anyOf: - type: string - type: object @@ -89,15 +94,60 @@ spec: required: ['port'] properties: port: + description: Container port number type: number portName: + description: Container port name type: string portDiscovery: + description: Enable port dicovery type: boolean meshName: + description: AppMesh mesh name type: string + backends: + description: AppMesh backend array + anyOf: + - type: string + - type: object timeout: + description: Istio HTTP or gRPC request timeout type: string + trafficPolicy: + description: Istio traffic policy + anyOf: + - type: string + - type: object + match: + description: Istio URL match conditions + anyOf: + - type: string + - type: array + rewrite: + description: Istio URL rewrite + anyOf: + - type: string + - type: object + headers: + description: Istio headers operations + anyOf: + - type: string + - type: object + corsPolicy: + description: Istio CORS policy + anyOf: + - type: string + - type: object + gateways: + description: Istio gateways list + anyOf: + - type: string + - type: array + hosts: + description: Istio hosts list + anyOf: + - type: string + - type: array skipAnalysis: type: boolean canaryAnalysis: @@ -118,6 +168,11 @@ spec: stepWeight: description: Canary incremental traffic percentage step type: number + match: + description: A/B testing match conditions + anyOf: + - type: string + - type: array metrics: description: Prometheus query list for this canary type: array @@ -155,6 +210,7 @@ spec: type: string enum: - "" + - confirm-rollout - pre-rollout - rollout - post-rollout @@ -166,6 +222,11 @@ spec: description: Request timeout for this webhook type: string pattern: "^[0-9]+(m|s)" + metadata: + description: Metadata (key-value pairs) for this webhook + anyOf: + - type: string + - type: object status: properties: phase: diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index 548ef6d2..842076d1 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -46,10 +46,13 @@ spec: - canaryAnalysis properties: provider: + description: Traffic managent provider type: string progressDeadlineSeconds: + description: Deployment progress deadline type: number targetRef: + description: Deployment selector type: object required: ['apiVersion', 'kind', 'name'] properties: @@ -60,6 +63,7 @@ spec: name: type: string autoscalerRef: + description: HPA selector anyOf: - type: string - type: object @@ -72,6 +76,7 @@ spec: name: type: string ingressRef: + description: NGINX ingress selector anyOf: - type: string - type: object @@ -88,15 +93,60 @@ spec: required: ['port'] properties: port: + description: Container port number type: number portName: + description: Container port name type: string portDiscovery: + description: Enable port dicovery type: boolean meshName: + description: AppMesh mesh name type: string + backends: + description: AppMesh backend array + anyOf: + - type: string + - type: object timeout: + description: Istio HTTP or gRPC request timeout type: string + trafficPolicy: + description: Istio traffic policy + anyOf: + - type: string + - type: object + match: + description: Istio URL match conditions + anyOf: + - type: string + - type: array + rewrite: + description: Istio URL rewrite + anyOf: + - type: string + - type: object + headers: + description: Istio headers operations + anyOf: + - type: string + - type: object + corsPolicy: + description: Istio CORS policy + anyOf: + - type: string + - type: object + gateways: + description: Istio gateways list + anyOf: + - type: string + - type: array + hosts: + description: Istio hosts list + anyOf: + - type: string + - type: array skipAnalysis: type: boolean canaryAnalysis: @@ -117,6 +167,11 @@ spec: stepWeight: description: Canary incremental traffic percentage step type: number + match: + description: A/B testing match conditions + anyOf: + - type: string + - type: array metrics: description: Prometheus query list for this canary type: array @@ -154,6 +209,7 @@ spec: type: string enum: - "" + - confirm-rollout - pre-rollout - rollout - post-rollout @@ -165,6 +221,11 @@ spec: description: Request timeout for this webhook type: string pattern: "^[0-9]+(m|s)" + metadata: + description: Metadata (key-value pairs) for this webhook + anyOf: + - type: string + - type: object status: properties: phase: