From 59f5a0654afaf8efc56ed63ae58defe0b958341b Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sat, 16 Mar 2019 14:11:24 +0200 Subject: [PATCH] Add AppMesh fields to Canary CRD --- pkg/apis/flagger/v1alpha3/types.go | 8 ++++-- .../flagger/v1alpha3/zz_generated.deepcopy.go | 25 +++++++++++-------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/pkg/apis/flagger/v1alpha3/types.go b/pkg/apis/flagger/v1alpha3/types.go index cf43691d..a6d9441c 100755 --- a/pkg/apis/flagger/v1alpha3/types.go +++ b/pkg/apis/flagger/v1alpha3/types.go @@ -111,14 +111,18 @@ type CanaryStatus struct { // and Istio Virtual Service type CanaryService struct { Port int32 `json:"port"` - Gateways []string `json:"gateways"` - 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"` Headers *istiov1alpha3.Headers `json:"headers,omitempty"` CorsPolicy *istiov1alpha3.CorsPolicy `json:"corsPolicy,omitempty"` + //Istio + Gateways []string `json:"gateways,omitempty"` + Hosts []string `json:"hosts,omitempty"` + // App Mesh + MeshName string `json:"meshName,omitempty"` + Backends []string `json:"backends,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 7567dff0..7533a204 100644 --- a/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go +++ b/pkg/apis/flagger/v1alpha3/zz_generated.deepcopy.go @@ -141,16 +141,6 @@ func (in *CanaryMetric) DeepCopy() *CanaryMetric { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CanaryService) DeepCopyInto(out *CanaryService) { *out = *in - if in.Gateways != nil { - in, out := &in.Gateways, &out.Gateways - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]string, len(*in)) - copy(*out, *in) - } if in.Match != nil { in, out := &in.Match, &out.Match *out = make([]istiov1alpha3.HTTPMatchRequest, len(*in)) @@ -178,6 +168,21 @@ func (in *CanaryService) DeepCopyInto(out *CanaryService) { *out = new(istiov1alpha3.CorsPolicy) (*in).DeepCopyInto(*out) } + if in.Gateways != nil { + in, out := &in.Gateways, &out.Gateways + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Hosts != nil { + in, out := &in.Hosts, &out.Hosts + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Backends != nil { + in, out := &in.Backends, &out.Backends + *out = make([]string, len(*in)) + copy(*out, *in) + } return }