k8s: cartservice listen addr

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-27 22:31:31 -07:00 committed by Simon Zeltser
parent 6040585996
commit 83333c9f6b
3 changed files with 3 additions and 2 deletions

View file

@ -19,7 +19,7 @@ spec:
- name: CART_SERVICE_PORT - name: CART_SERVICE_PORT
value: "7070" value: "7070"
- name: CART_SERVICE_ADDR - name: CART_SERVICE_ADDR
value: "127.0.0.1" value: "0.0.0.0"
resources: resources:
requests: requests:
cpu: 200m cpu: 200m

View file

@ -184,7 +184,7 @@ func (cs *checkoutService) getUserCart(ctx context.Context, userID string) ([]*p
cart, err := pb.NewCartServiceClient(conn).GetCart(ctx, &pb.GetCartRequest{UserId: userID}) cart, err := pb.NewCartServiceClient(conn).GetCart(ctx, &pb.GetCartRequest{UserId: userID})
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get user cart: %+v", err) return nil, fmt.Errorf("failed to get user cart during checkout: %+v", err)
} }
return cart.GetItems(), nil return cart.GetItems(), nil
} }

View file

@ -6,6 +6,7 @@ kubectl port-forward $(kubectl get pods -l app=recommendationservice -o=name | h
kubectl port-forward $(kubectl get pods -l app=cartservice -o=name | head -n 1) 7070:7070 & kubectl port-forward $(kubectl get pods -l app=cartservice -o=name | head -n 1) 7070:7070 &
kubectl port-forward $(kubectl get pods -l app=productcatalogservice -o=name | head -n 1) 3550:3550 & kubectl port-forward $(kubectl get pods -l app=productcatalogservice -o=name | head -n 1) 3550:3550 &
kubectl port-forward $(kubectl get pods -l app=checkoutservice -o=name | head -n 1) 5050:5050 & kubectl port-forward $(kubectl get pods -l app=checkoutservice -o=name | head -n 1) 5050:5050 &
kubectl port-forward $(kubectl get pods -l app=shippingservice -o=name | head -n 1) 50051:50051 &
set +x set +x
trap "exit" INT TERM ERR trap "exit" INT TERM ERR