Skip to content

Commit

Permalink
Merge pull request #19 from softonic/fix_naming_endpoint
Browse files Browse the repository at this point in the history
service and address needs to have the same name
  • Loading branch information
santinoncs authored Nov 27, 2020
2 parents c7e56a6 + cd0a324 commit 56c2980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/envoyfilterobject.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (r *RateLimitReconciler) prepareUpdateEnvoyFilterObjects(rateLimitInstance
ApplyTo: "CLUSTER",
RawConfig: rawConfigCluster,
TypeConfigObjectMatch: "Cluster",
ClusterEndpoint: address,
ClusterEndpoint: fqdn,
Labels: labels,
}

Expand All @@ -86,7 +86,7 @@ func (r *RateLimitReconciler) prepareUpdateEnvoyFilterObjects(rateLimitInstance

domain := baseName

payload = []byte(fmt.Sprintf(`{"config":{"domain":"%s","rate_limit_service":{"grpc_service":{"envoy_grpc":{"cluster_name":"%s"},"timeout":"1.25s"}}},"name":"envoy.rate_limit"}`, domain, address))
payload = []byte(fmt.Sprintf(`{"config":{"domain":"%s","rate_limit_service":{"grpc_service":{"envoy_grpc":{"cluster_name":"rate_limit_service"},"timeout":"1.25s"}}},"name":"envoy.rate_limit"}`, domain))

rawConfigHTTPFilter := json.RawMessage(payload)

Expand Down

0 comments on commit 56c2980

Please sign in to comment.