diff --git a/deploy/all.yaml b/deploy/all.yaml index 75027da37..e952006e3 100644 --- a/deploy/all.yaml +++ b/deploy/all.yaml @@ -312,6 +312,23 @@ spec: type: string weight: type: integer + retryPolicy: + type: object + properties: + perRetryTimeoutMillis: + type: integer + maxRetries: + type: integer + httpRetryEvents: + type: array + items: + type: string + tcpRetryEvents: + type: array + items: + type: string + enum: + - 'connection-error' tcp: type: object properties: diff --git a/deploy/controller-deployment.yaml.template b/deploy/controller-deployment.yaml.template index 666fac178..493c773d2 100644 --- a/deploy/controller-deployment.yaml.template +++ b/deploy/controller-deployment.yaml.template @@ -1,9 +1,4 @@ --- -apiVersion: v1 -kind: Namespace -metadata: - name: appmesh-system ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -27,36 +22,4 @@ spec: image: ${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com/amazon/app-mesh-controller:latest imagePullPolicy: Always ports: - - containerPort: 10555 ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: app-mesh-sa - namespace: appmesh-system ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: app-mesh-controller -rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["*"] - - apiGroups: ["appmesh.k8s.aws"] - resources: ["meshes", "virtualnodes", "virtualservices", "meshes/status", "virtualnodes/status", "virtualservices/status"] - verbs: ["*"] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: app-mesh-controller-binding -subjects: - - kind: ServiceAccount - name: app-mesh-sa - namespace: appmesh-system - apiGroup: "" -roleRef: - kind: ClusterRole - name: app-mesh-controller - apiGroup: "" \ No newline at end of file + - containerPort: 10555 \ No newline at end of file diff --git a/deploy/mesh-definition.yaml b/deploy/mesh-definition.yaml deleted file mode 100644 index 6c6635884..000000000 --- a/deploy/mesh-definition.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: meshes.appmesh.k8s.aws -spec: - group: appmesh.k8s.aws - versions: - - name: v1beta1 - served: true - storage: true - - name: v1alpha1 - served: true - storage: false - version: v1beta1 - scope: Cluster - names: - plural: meshes - singular: mesh - kind: Mesh - categories: - - all - - appmesh - subresources: - status: {} - validation: - openAPIV3Schema: - properties: - spec: - properties: - serviceDiscoveryType: - type: string - enum: - - dns - status: - properties: - meshArn: - type: string - conditions: - type: array - items: - type: object - required: - - type - properties: - type: - type: string - enum: - - MeshActive - status: - type: string - enum: - - "True" - - "False" - - Unknown - lastTransitionTime: - type: string - reason: - type: string - message: - type: string \ No newline at end of file diff --git a/deploy/virtual-node-definition.yaml b/deploy/virtual-node-definition.yaml deleted file mode 100644 index 0987f9928..000000000 --- a/deploy/virtual-node-definition.yaml +++ /dev/null @@ -1,138 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualnodes.appmesh.k8s.aws -spec: - group: appmesh.k8s.aws - versions: - - name: v1beta1 - served: true - storage: true - - name: v1alpha1 - served: true - storage: false - version: v1beta1 - scope: Namespaced - names: - plural: virtualnodes - singular: virtualnode - kind: VirtualNode - categories: - - all - - appmesh - subresources: - status: {} - validation: - openAPIV3Schema: - required: - - spec - properties: - spec: - required: - - meshName - properties: - meshName: - type: string - listeners: - type: array - items: - type: object - properties: - portMapping: - properties: - port: - type: integer - protocol: - type: string - enum: - - tcp - - http - - grpc - - http2 - - https - healthCheck: - properties: - healthyThreshold: - type: integer - intervalMillis: - type: integer - path: - type: string - port: - type: integer - protocol: - type: string - enum: - - tcp - - http - timeoutMillis: - type: integer - unhealthyThreshold: - type: integer - serviceDiscovery: - type: object - properties: - cloudMap: - type: object - properties: - serviceName: - type: string - namespaceName: - type: string - dns: - type: object - properties: - hostName: - type: string - backends: - type: array - items: - oneOf: - - type: object - properties: - backendService: - type: object - properties: - name: - type: string - logging: - type: object - properties: - accessLog: - type: object - properties: - file: - type: object - properties: - path: - type: string - status: - properties: - meshArn: - type: string - virtualNodeArn: - type: string - conditions: - type: array - items: - type: object - required: - - type - properties: - type: - type: string - enum: - - VirtualNodeActive - - MeshMarkedForDeletion - status: - type: string - enum: - - "True" - - "False" - - Unknown - lastTransitionTime: - type: string - reason: - type: string - message: - type: string \ No newline at end of file diff --git a/deploy/virtual-service-definition.yaml b/deploy/virtual-service-definition.yaml deleted file mode 100644 index 4a9e980b5..000000000 --- a/deploy/virtual-service-definition.yaml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: virtualservices.appmesh.k8s.aws -spec: - group: appmesh.k8s.aws - versions: - - name: v1beta1 - served: true - storage: true - - name: v1alpha1 - served: true - storage: false - version: v1beta1 - scope: Namespaced - names: - plural: virtualservices - singular: virtualservice - kind: VirtualService - categories: - - all - - appmesh - subresources: - status: {} - validation: - openAPIV3Schema: - required: - - spec - properties: - spec: - properties: - meshName: - type: string - virtualRouter: - type: object - properties: - name: - type: string - routes: - type: array - items: - type: object - properties: - http: - type: object - properties: - priority: - type: integer - match: - type: object - properties: - prefix: - type: string - method: - type: string - scheme: - type: string - headers: - type: array - items: - type: object - properties: - name: - type: string - invert: - type: boolean - match: - type: object - properties: - exact: - type: string - prefix: - type: string - regex: - type: string - suffix: - type: string - range: - type: object - properties: - start: - type: integer - end: - type: integer - action: - type: object - properties: - weightedTargets: - type: array - items: - type: object - properties: - virtualNodeName: - type: string - weight: - type: integer - tcp: - type: object - properties: - action: - type: object - properties: - weightedTargets: - type: array - items: - type: object - properties: - virtualNodeName: - type: string - weight: - type: integer - status: - properties: - virtualServiceArn: - type: string - virtualRouterArn: - type: string - routeArns: - type: array - items: - type: string - conditions: - type: array - items: - type: object - required: - - type - properties: - type: - type: string - enum: - - VirtualServiceActive - - VirtualRouterActive - - RoutesActive - - MeshMarkedForDeletion - status: - type: string - enum: - - "True" - - "False" - - Unknown - lastTransitionTime: - type: string - reason: - type: string - message: - type: string \ No newline at end of file diff --git a/go.mod b/go.mod index 786756ffa..50aedffe8 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/aws/aws-app-mesh-controller-for-k8s require ( github.com/BurntSushi/toml v0.3.1 // indirect - github.com/aws/aws-sdk-go v1.23.2 + github.com/aws/aws-sdk-go v1.23.18 github.com/deckarep/golang-set v1.7.1 github.com/ghodss/yaml v1.0.0 // indirect github.com/gogo/protobuf v1.2.1 // indirect diff --git a/go.sum b/go.sum index 7ad21c66a..8bb81976f 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/aws/aws-sdk-go v1.23.2 h1:QSdnxlC29v6b2+C6mkriHhElh02ZlsRBoPX15SOZ6jU= github.com/aws/aws-sdk-go v1.23.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.23.18 h1:ADU/y1EO8yPzUJJYjcvJ0V9/suezxPh0u6hb5bSYIGQ= +github.com/aws/aws-sdk-go v1.23.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= diff --git a/pkg/apis/appmesh/v1beta1/types.go b/pkg/apis/appmesh/v1beta1/types.go index dc3e6b158..8fa1beb15 100644 --- a/pkg/apis/appmesh/v1beta1/types.go +++ b/pkg/apis/appmesh/v1beta1/types.go @@ -120,8 +120,9 @@ type Route struct { } type HttpRoute struct { - Match HttpRouteMatch `json:"match"` - Action HttpRouteAction `json:"action"` + Match HttpRouteMatch `json:"match"` + Action HttpRouteAction `json:"action"` + RetryPolicy *HttpRetryPolicy `json:"retryPolicy,omitempty"` } type HttpRouteMatch struct { @@ -154,6 +155,21 @@ type HttpRouteAction struct { WeightedTargets []WeightedTarget `json:"weightedTargets"` } +type HttpRetryPolicy struct { + PerRetryTimeoutMillis *int64 `json:"perRetryTimeoutMillis,omitempty"` + MaxRetries *int64 `json:"maxRetries,omitempty"` + HttpRetryPolicyEvents []HttpRetryPolicyEvent `json:"httpRetryEvents,omitempty"` + TcpRetryPolicyEvents []TcpRetryPolicyEvent `json:"tcpRetryEvents,omitempty"` +} + +type HttpRetryPolicyEvent string + +type TcpRetryPolicyEvent string + +const ( + TcpRetryPolicyEventConnectionError TcpRetryPolicyEvent = "connection-error" +) + type TcpRoute struct { Action TcpRouteAction `json:"action"` } diff --git a/pkg/apis/appmesh/v1beta1/zz_generated.deepcopy.go b/pkg/apis/appmesh/v1beta1/zz_generated.deepcopy.go index 72a3863b6..64355e046 100644 --- a/pkg/apis/appmesh/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/appmesh/v1beta1/zz_generated.deepcopy.go @@ -231,11 +231,52 @@ func (in *HealthCheckPolicy) DeepCopy() *HealthCheckPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HttpRetryPolicy) DeepCopyInto(out *HttpRetryPolicy) { + *out = *in + if in.PerRetryTimeoutMillis != nil { + in, out := &in.PerRetryTimeoutMillis, &out.PerRetryTimeoutMillis + *out = new(int64) + **out = **in + } + if in.MaxRetries != nil { + in, out := &in.MaxRetries, &out.MaxRetries + *out = new(int64) + **out = **in + } + if in.HttpRetryPolicyEvents != nil { + in, out := &in.HttpRetryPolicyEvents, &out.HttpRetryPolicyEvents + *out = make([]HttpRetryPolicyEvent, len(*in)) + copy(*out, *in) + } + if in.TcpRetryPolicyEvents != nil { + in, out := &in.TcpRetryPolicyEvents, &out.TcpRetryPolicyEvents + *out = make([]TcpRetryPolicyEvent, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpRetryPolicy. +func (in *HttpRetryPolicy) DeepCopy() *HttpRetryPolicy { + if in == nil { + return nil + } + out := new(HttpRetryPolicy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HttpRoute) DeepCopyInto(out *HttpRoute) { *out = *in in.Match.DeepCopyInto(&out.Match) in.Action.DeepCopyInto(&out.Action) + if in.RetryPolicy != nil { + in, out := &in.RetryPolicy, &out.RetryPolicy + *out = new(HttpRetryPolicy) + (*in).DeepCopyInto(*out) + } return } diff --git a/pkg/aws/appmesh.go b/pkg/aws/appmesh.go index 4e9feed42..51070ec10 100644 --- a/pkg/aws/appmesh.go +++ b/pkg/aws/appmesh.go @@ -775,6 +775,30 @@ func (r *Route) WeightedTargetSet() set.Set { return s } +func (r *Route) HttpRouteRetryPolicy() *appmeshv1beta1.HttpRetryPolicy { + if r.Data.Spec.HttpRoute == nil || r.Data.Spec.HttpRoute.RetryPolicy == nil { + return nil + } + + input := r.Data.Spec.HttpRoute.RetryPolicy + result := &appmeshv1beta1.HttpRetryPolicy{ + PerRetryTimeoutMillis: durationToMillis(input.PerRetryTimeout), + MaxRetries: input.MaxRetries, + } + + for _, inputEvent := range input.HttpRetryEvents { + resultEvent := appmeshv1beta1.HttpRetryPolicyEvent(aws.StringValue(inputEvent)) + result.HttpRetryPolicyEvents = append(result.HttpRetryPolicyEvents, resultEvent) + } + + for _, inputEvent := range input.TcpRetryEvents { + resultEvent := appmeshv1beta1.TcpRetryPolicyEvent(aws.StringValue(inputEvent)) + result.TcpRetryPolicyEvents = append(result.TcpRetryPolicyEvents, resultEvent) + } + + return result +} + func (r *Route) HttpRouteMatch() *appmeshv1beta1.HttpRouteMatch { if r.Data.Spec.HttpRoute == nil || r.Data.Spec.HttpRoute.Match == nil { return nil @@ -1009,6 +1033,7 @@ func (c *Cloud) buildRouteSpec(route *appmeshv1beta1.Route) *appmesh.RouteSpec { Action: &appmesh.HttpRouteAction{ WeightedTargets: c.buildWeightedTargets(route.Http.Action.WeightedTargets), }, + RetryPolicy: c.buildHttpRetryPolicy(route.Http.RetryPolicy), }, } } @@ -1080,6 +1105,33 @@ func (c *Cloud) buildHttpRouteHeader(input appmeshv1beta1.HttpRouteHeader) *appm return appmeshHeader } +func (c *Cloud) buildHttpRetryPolicy(input *appmeshv1beta1.HttpRetryPolicy) *appmesh.HttpRetryPolicy { + if input == nil { + return nil + } + + appmeshRetryPolicy := &appmesh.HttpRetryPolicy{ + MaxRetries: input.MaxRetries, + } + + if input.PerRetryTimeoutMillis != nil { + appmeshRetryPolicy.PerRetryTimeout = &appmesh.Duration{ + Unit: aws.String(appmesh.DurationUnitMs), + Value: input.PerRetryTimeoutMillis, + } + } + + for _, inputEvent := range input.HttpRetryPolicyEvents { + appmeshRetryPolicy.HttpRetryEvents = append(appmeshRetryPolicy.HttpRetryEvents, aws.String(string(inputEvent))) + } + + for _, inputEvent := range input.TcpRetryPolicyEvents { + appmeshRetryPolicy.TcpRetryEvents = append(appmeshRetryPolicy.TcpRetryEvents, aws.String(string(inputEvent))) + } + + return appmeshRetryPolicy +} + func defaultInt64(v *int64, defaultVal int64) *int64 { if v != nil { return v @@ -1093,3 +1145,18 @@ func defaultString(v *string, defaultVal string) *string { } return aws.String(defaultVal) } + +func durationToMillis(d *appmesh.Duration) *int64 { + if d == nil { + return nil + } + + switch aws.StringValue(d.Unit) { + case appmesh.DurationUnitMs: + return d.Value + case appmesh.DurationUnitS: + return aws.Int64(aws.Int64Value(d.Value) * 1000) + } + + return nil +} diff --git a/pkg/controller/virtualservice.go b/pkg/controller/virtualservice.go index faf0249a4..82061aaa1 100644 --- a/pkg/controller/virtualservice.go +++ b/pkg/controller/virtualservice.go @@ -438,6 +438,11 @@ func routeNeedsUpdate(desired appmeshv1beta1.Route, target aws.Route) bool { if !reflect.DeepEqual(desired.Http.Match, *targetRouteMatch) { return true } + + targetRouteRetryPolicy := target.HttpRouteRetryPolicy() + if !reflect.DeepEqual(desired.Http.RetryPolicy, targetRouteRetryPolicy) { + return true + } } else if target.Data.Spec.HttpRoute != nil { return true } @@ -454,6 +459,7 @@ func routeNeedsUpdate(desired appmeshv1beta1.Route, target aws.Route) bool { } } } + return false } diff --git a/pkg/controller/virtualservice_test.go b/pkg/controller/virtualservice_test.go index a9829cefd..4adfc535b 100644 --- a/pkg/controller/virtualservice_test.go +++ b/pkg/controller/virtualservice_test.go @@ -580,3 +580,134 @@ func TestHttpRouteWithHeaderNeedUpdate(t *testing.T) { }) } } + +func TestHttpRouteWithRetryPolicyNeedUpdate(t *testing.T) { + var ( + // shared defaults + defaultRouteName = "example-route" + defaultPrefix = "/" + defaultNodeName = "example-node" + defaultPerRetryTimeoutMillis = int64(1000) + defaultMaxRetries = int64(5) + defaultHttpRetryPolicyEvent = "http-error" + defaultTcpRetryPolicyEvent = appmesh.TcpRetryPolicyEventConnectionError + + // Targets for default custom resource spec + defaultTargets = []appmeshv1beta1.WeightedTarget{ + {Weight: int64(1), VirtualNodeName: defaultNodeName}, + } + + nilSpec *appmeshv1beta1.HttpRetryPolicy + nilResult *appmesh.HttpRetryPolicy + + emptySpec = &appmeshv1beta1.HttpRetryPolicy{} + emptyResult = &appmesh.HttpRetryPolicy{} + + specWithHttpEvent = &appmeshv1beta1.HttpRetryPolicy{ + HttpRetryPolicyEvents: []appmeshv1beta1.HttpRetryPolicyEvent{ + appmeshv1beta1.HttpRetryPolicyEvent(defaultHttpRetryPolicyEvent), + }, + } + resultWithHttpEvent = &appmesh.HttpRetryPolicy{ + HttpRetryEvents: []*string{ + awssdk.String(defaultHttpRetryPolicyEvent), + }, + } + resultWithDifferentHttpEvent = &appmesh.HttpRetryPolicy{ + HttpRetryEvents: []*string{ + awssdk.String("diff-http-error"), + }, + } + + specWithPerTryTimeout = &appmeshv1beta1.HttpRetryPolicy{ + PerRetryTimeoutMillis: awssdk.Int64(defaultPerRetryTimeoutMillis), + } + resultWithPerTryTimeout = &appmesh.HttpRetryPolicy{ + PerRetryTimeout: &appmesh.Duration{ + Unit: awssdk.String(appmesh.DurationUnitMs), + Value: awssdk.Int64(defaultPerRetryTimeoutMillis), + }, + } + resultWithDifferentPerTryTimeout = &appmesh.HttpRetryPolicy{ + PerRetryTimeout: &appmesh.Duration{ + Unit: awssdk.String(appmesh.DurationUnitMs), + Value: awssdk.Int64(defaultPerRetryTimeoutMillis + 1), + }, + } + resultWithSamePerTryTimeoutAndDiffUnit = &appmesh.HttpRetryPolicy{ + PerRetryTimeout: &appmesh.Duration{ + Unit: awssdk.String(appmesh.DurationUnitS), + Value: awssdk.Int64(defaultPerRetryTimeoutMillis / 1000), + }, + } + + specWithMaxRetries = &appmeshv1beta1.HttpRetryPolicy{ + MaxRetries: awssdk.Int64(defaultMaxRetries), + } + resultWithMaxRetries = &appmesh.HttpRetryPolicy{ + MaxRetries: awssdk.Int64(defaultMaxRetries), + } + resultWithDifferentMaxRetries = &appmesh.HttpRetryPolicy{ + MaxRetries: awssdk.Int64(defaultMaxRetries + 1), + } + + specWithTcpEvent = &appmeshv1beta1.HttpRetryPolicy{ + TcpRetryPolicyEvents: []appmeshv1beta1.TcpRetryPolicyEvent{ + appmeshv1beta1.TcpRetryPolicyEvent(defaultTcpRetryPolicyEvent), + }, + } + resultWithTcpEvent = &appmesh.HttpRetryPolicy{ + TcpRetryEvents: []*string{ + awssdk.String(defaultTcpRetryPolicyEvent), + }, + } + resultWithDifferentTcpEvent = &appmesh.HttpRetryPolicy{ + TcpRetryEvents: []*string{ + awssdk.String("diff-tcp-error"), + }, + } + ) + + var tests = []struct { + name string + desired *appmeshv1beta1.HttpRetryPolicy + target *appmesh.HttpRetryPolicy + different bool + }{ + {"Nil spec", nilSpec, nilResult, false}, + {"Empty spec", emptySpec, emptyResult, false}, + + {"PerTryTimeout: match", specWithPerTryTimeout, resultWithPerTryTimeout, false}, + {"PerTryTimeout: match with different unit", specWithPerTryTimeout, resultWithSamePerTryTimeoutAndDiffUnit, false}, + {"PerTryTimeout: missing in desired", emptySpec, resultWithPerTryTimeout, true}, + {"PerTryTimeout: missing in target", specWithPerTryTimeout, emptyResult, true}, + {"PerTryTimeout: diff", specWithPerTryTimeout, resultWithDifferentPerTryTimeout, true}, + + {"MaxRetries: match", specWithMaxRetries, resultWithMaxRetries, false}, + {"MaxRetries: missing in desired", emptySpec, resultWithMaxRetries, true}, + {"MaxRetries: missing in target", specWithMaxRetries, emptyResult, true}, + {"MaxRetries: diff", specWithMaxRetries, resultWithDifferentMaxRetries, true}, + + {"HttpRetryPolicyEvent: match", specWithHttpEvent, resultWithHttpEvent, false}, + {"HttpRetryPolicyEvent: missing in desired", emptySpec, resultWithHttpEvent, true}, + {"HttpRetryPolicyEvent: missing in target", specWithHttpEvent, emptyResult, true}, + {"HttpRetryPolicyEvent: diff", specWithHttpEvent, resultWithDifferentHttpEvent, true}, + + {"TcpRetryPolicyEvent: match", specWithTcpEvent, resultWithTcpEvent, false}, + {"TcpRetryPolicyEvent: missing in desired", emptySpec, resultWithTcpEvent, true}, + {"TcpRetryPolicyEvent: missing in target", specWithTcpEvent, emptyResult, true}, + {"TcpRetryPolicyEvent: diff", specWithTcpEvent, resultWithDifferentTcpEvent, true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + spec := newAPIHttpRoute(defaultRouteName, defaultPrefix, defaultTargets) + spec.Http.RetryPolicy = tt.desired + result := newAWSHttpRoute(defaultRouteName, defaultPrefix, defaultTargets) + result.Data.Spec.HttpRoute.RetryPolicy = tt.target + if res := routeNeedsUpdate(spec, result); res != tt.different { + t.Errorf("got %v, want %v", res, tt.different) + } + }) + } +} diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 077733a82..331e9bc01 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -17,10 +17,9 @@ DIR=$(cd "$(dirname "$0")"; pwd)/.. OUT_DIR="${DIR}/_output/deploy/" mkdir -p ${OUT_DIR} -kubectl apply -f ${DIR}/deploy/mesh-definition.yaml -kubectl apply -f ${DIR}/deploy/virtual-service-definition.yaml -kubectl apply -f ${DIR}/deploy/virtual-node-definition.yaml +kubectl apply -f ${DIR}/deploy/all.yaml +# override controller deployment with dev deployment eval "cat <