From 9f1bc5a69c0469ca9d5b02af3cdeb45c943f9043 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Thu, 21 Jun 2018 14:22:09 -0700 Subject: [PATCH] Integrate paymentservice to skaffold/k8s Signed-off-by: Ahmet Alp Balkan --- kubernetes-manifests/checkoutservice.yaml | 22 ++++++++++-------- kubernetes-manifests/paymentservice.yaml | 27 +++++++++++++++++++++++ skaffold.yaml | 2 ++ 3 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 kubernetes-manifests/paymentservice.yaml diff --git a/kubernetes-manifests/checkoutservice.yaml b/kubernetes-manifests/checkoutservice.yaml index bf2bfe9..dcdbc5b 100644 --- a/kubernetes-manifests/checkoutservice.yaml +++ b/kubernetes-manifests/checkoutservice.yaml @@ -10,15 +10,19 @@ spec: app: checkoutservice spec: containers: - - name: server - image: checkoutservice - ports: - - containerPort: 5050 - env: - - name: PRODUCT_CATALOG_SERVICE_ADDR - value: "productcatalogservice:3550" - - name: SHIPPING_SERVICE_ADDR - value: "shippingservice:50051" + - name: server + image: checkoutservice + ports: + - containerPort: 5050 + env: + - name: PRODUCT_CATALOG_SERVICE_ADDR + value: "productcatalogservice:3550" + - name: SHIPPING_SERVICE_ADDR + value: "shippingservice:50051" + - name: PAYMENT_SERVICE_ADDR + value: "paymentservice:50051" + - name: EMAIL_SERVICE_ADDR + value: "emailservice:5000" --- apiVersion: v1 kind: Service diff --git a/kubernetes-manifests/paymentservice.yaml b/kubernetes-manifests/paymentservice.yaml new file mode 100644 index 0000000..28ca6b8 --- /dev/null +++ b/kubernetes-manifests/paymentservice.yaml @@ -0,0 +1,27 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: paymentservice +spec: + template: + metadata: + labels: + app: paymentservice + spec: + containers: + - name: server + image: paymentservice + ports: + - containerPort: 50051 +--- +apiVersion: v1 +kind: Service +metadata: + name: paymentservice +spec: + type: ClusterIP + selector: + app: paymentservice + ports: + - port: 50051 + targetPort: 50051 diff --git a/skaffold.yaml b/skaffold.yaml index 6c8f024..e36a167 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -12,6 +12,8 @@ build: workspace: src/shippingservice - imageName: checkoutservice workspace: src/checkoutservice + - imageName: paymentservice + workspace: src/paymentservice deploy: kubectl: manifests: