From 44d7e96e9601cb969e4388657b1ab72cd32e7c15 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 28 Feb 2019 00:02:01 +0200 Subject: [PATCH] Add timeout and retries fields to Canary CRD --- artifacts/flagger/crd.yaml | 2 ++ charts/flagger/templates/crd.yaml | 2 ++ pkg/apis/flagger/v1alpha3/types.go | 2 ++ pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index b101d7be..c628d577 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -73,6 +73,8 @@ spec: properties: port: type: number + timeout: + type: string skipAnalysis: type: boolean canaryAnalysis: diff --git a/charts/flagger/templates/crd.yaml b/charts/flagger/templates/crd.yaml index 5e3c40a3..efd880e6 100644 --- a/charts/flagger/templates/crd.yaml +++ b/charts/flagger/templates/crd.yaml @@ -74,6 +74,8 @@ spec: properties: port: type: number + timeout: + type: string skipAnalysis: type: boolean canaryAnalysis: diff --git a/pkg/apis/flagger/v1alpha3/types.go b/pkg/apis/flagger/v1alpha3/types.go index f6bead85..0690695c 100755 --- a/pkg/apis/flagger/v1alpha3/types.go +++ b/pkg/apis/flagger/v1alpha3/types.go @@ -114,6 +114,8 @@ type CanaryService struct { Hosts []string `json:"hosts"` Match []istiov1alpha3.HTTPMatchRequest `json:"match,omitempty"` Rewrite *istiov1alpha3.HTTPRewrite `json:"rewrite,omitempty"` + Timeout string `json:"timeout,omitempty"` + Retries *istiov1alpha3.HTTPRetry `json:"retries,omitempty"` } // CanaryAnalysis is used to describe how the analysis should be done diff --git a/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go b/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go index 23ff1c58..bded64e4 100644 --- a/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go +++ b/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go @@ -156,6 +156,11 @@ func (in *CanaryService) DeepCopyInto(out *CanaryService) { *out = new(istiov1alpha3.HTTPRewrite) **out = **in } + if in.Retries != nil { + in, out := &in.Retries, &out.Retries + *out = new(istiov1alpha3.HTTPRetry) + **out = **in + } return }