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
parent 7c83802b9e
commit 21909b4674
3 changed files with 3 additions and 2 deletions

View file

@ -19,7 +19,7 @@ spec:
- name: CART_SERVICE_PORT
value: "7070"
- name: CART_SERVICE_ADDR
value: "127.0.0.1"
value: "0.0.0.0"
resources:
requests:
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})
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
}

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=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=shippingservice -o=name | head -n 1) 50051:50051 &
set +x
trap "exit" INT TERM ERR