one manifest file, separating script
This commit is contained in:
parent
dbc8eac2ca
commit
0ba941624e
17 changed files with 698 additions and 779 deletions
29
hack/build-push.sh
Normal file
29
hack/build-push.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# set vars
|
||||
if [ -n "$1" ]; then
|
||||
DOCKER_REPO=$1
|
||||
else
|
||||
echo "Must provide a docker repo"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
TAG=$2
|
||||
else
|
||||
echo "Must provide a version tag."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
for dir in ./src/*/
|
||||
do
|
||||
# build image
|
||||
svcname=$(basename $dir)
|
||||
image="$DOCKER_REPO/$svcname:$TAG"
|
||||
echo "Building and pushing $image..."
|
||||
docker build -t $image -f $dir/Dockerfile $dir
|
||||
|
||||
# push image
|
||||
docker push $image
|
||||
done
|
29
hack/inject-yaml.sh
Normal file
29
hack/inject-yaml.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# set vars
|
||||
if [ -n "$1" ]; then
|
||||
DOCKER_REPO=$1
|
||||
else
|
||||
echo "Must provide a docker repo"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
TAG=$2
|
||||
else
|
||||
echo "Must provide a version tag."
|
||||
exit
|
||||
fi
|
||||
|
||||
# inject new tag into the relevant k8s manifest
|
||||
manifestfile="./release/kubernetes-manifests/demo.yaml"
|
||||
|
||||
for dir in ./src/*/
|
||||
do
|
||||
svcname=$(basename $dir)
|
||||
image="$DOCKER_REPO/$svcname:$TAG"
|
||||
|
||||
pattern=".*image:.*$svcname.*"
|
||||
replace=" image: $image"
|
||||
sed -i '' "s|$pattern|$replace|g" $manifestfile
|
||||
done
|
|
@ -22,25 +22,15 @@ else
|
|||
exit
|
||||
fi
|
||||
|
||||
# iterate over all services: build + push image, inject tag into k8s manifest.
|
||||
for dir in ./src/*/
|
||||
do
|
||||
# docker build + push
|
||||
svcname=$(basename $dir)
|
||||
image="$DOCKER_REPO/$svcname:$TAG"
|
||||
echo "Building and pushing $image..."
|
||||
docker build -t $image -f $dir/Dockerfile $dir
|
||||
docker push $image
|
||||
# build and push images
|
||||
./build-push.sh $DOCKER_REPO $TAG
|
||||
|
||||
# inject new tag into the relevant k8s manifest
|
||||
pattern=".*image:.*"
|
||||
replace=" image: $image"
|
||||
manifestfile="./release/kubernetes-manifests/$svcname.yaml"
|
||||
sed -i '' "s|$pattern|$replace|g" $manifestfile
|
||||
done
|
||||
|
||||
|
||||
# create + push new release tag
|
||||
# update yaml
|
||||
./inject-yaml.sh $DOCKER_REPO $TAG
|
||||
|
||||
|
||||
# git tag
|
||||
echo "Pushing git tag..."
|
||||
git tag $TAG
|
||||
git push --tags
|
||||
|
|
14
hack/restore.sh
Normal file
14
hack/restore.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
manifestfile="./release/kubernetes-manifests/demo.yaml"
|
||||
|
||||
# restore release/ manifest images to skaffold default, eg. "adservice"
|
||||
for dir in ./src/*/
|
||||
do
|
||||
svcname=$(basename $dir)
|
||||
image="$DOCKER_REPO/$svcname:$TAG"
|
||||
|
||||
pattern=".*image:.*$svcname.*"
|
||||
replace=" image: $svcname"
|
||||
sed -i '' "s|$pattern|$replace|g" $manifestfile
|
||||
done
|
|
@ -1,65 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: adservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: adservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: adservice
|
||||
ports:
|
||||
- containerPort: 9555
|
||||
env:
|
||||
- name: PORT
|
||||
value: "9555"
|
||||
#- name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 180Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 300Mi
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:9555"]
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:9555"]
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: adservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: adservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 9555
|
||||
targetPort: 9555
|
|
@ -1,66 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cartservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cartservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: cartservice
|
||||
ports:
|
||||
- containerPort: 7070
|
||||
env:
|
||||
- name: REDIS_ADDR
|
||||
value: "redis-cart:6379"
|
||||
- name: PORT
|
||||
value: "7070"
|
||||
- name: LISTEN_ADDR
|
||||
value: "0.0.0.0"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 128Mi
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7070"]
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7070"]
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: cartservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: cartservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7070
|
||||
targetPort: 7070
|
|
@ -1,70 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: checkoutservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: checkoutservice
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: checkoutservice
|
||||
ports:
|
||||
- containerPort: 5050
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:5050"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=: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"
|
||||
- name: CURRENCY_SERVICE_ADDR
|
||||
value: "currencyservice:7000"
|
||||
- name: CART_SERVICE_ADDR
|
||||
value: "cartservice:7070"
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: checkoutservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 5050
|
||||
targetPort: 5050
|
|
@ -1,57 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: currencyservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: currencyservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: currencyservice
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: 7000
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7000"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7000"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: currencyservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: currencyservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7000
|
||||
targetPort: 7000
|
619
release/kubernetes-manifests/demo.yaml
Normal file
619
release/kubernetes-manifests/demo.yaml
Normal file
|
@ -0,0 +1,619 @@
|
|||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: adservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: adservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: adservice
|
||||
ports:
|
||||
- containerPort: 9555
|
||||
env:
|
||||
- name: PORT
|
||||
value: "9555"
|
||||
#- name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 180Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 300Mi
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:9555"]
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:9555"]
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: adservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: adservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 9555
|
||||
targetPort: 9555
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cartservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cartservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: cartservice
|
||||
ports:
|
||||
- containerPort: 7070
|
||||
env:
|
||||
- name: REDIS_ADDR
|
||||
value: "redis-cart:6379"
|
||||
- name: PORT
|
||||
value: "7070"
|
||||
- name: LISTEN_ADDR
|
||||
value: "0.0.0.0"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 128Mi
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 15
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7070"]
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7070"]
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: cartservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: cartservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7070
|
||||
targetPort: 7070
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: checkoutservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: checkoutservice
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: checkoutservice
|
||||
ports:
|
||||
- containerPort: 5050
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:5050"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=: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"
|
||||
- name: CURRENCY_SERVICE_ADDR
|
||||
value: "currencyservice:7000"
|
||||
- name: CART_SERVICE_ADDR
|
||||
value: "cartservice:7070"
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: checkoutservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 5050
|
||||
targetPort: 5050
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: currencyservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: currencyservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: currencyservice
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: 7000
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7000"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:7000"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: currencyservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: currencyservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7000
|
||||
targetPort: 7000
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: emailservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: emailservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: emailservice
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: emailservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: emailservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 5000
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: frontend
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 10
|
||||
httpGet:
|
||||
path: "/_healthz"
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: "Cookie"
|
||||
value: "shop_session-id=x-readiness-probe"
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 10
|
||||
httpGet:
|
||||
path: "/_healthz"
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: "Cookie"
|
||||
value: "shop_session-id=x-liveness-probe"
|
||||
env:
|
||||
- name: PRODUCT_CATALOG_SERVICE_ADDR
|
||||
value: "productcatalogservice:3550"
|
||||
- name: CURRENCY_SERVICE_ADDR
|
||||
value: "currencyservice:7000"
|
||||
- name: CART_SERVICE_ADDR
|
||||
value: "cartservice:7070"
|
||||
- name: RECOMMENDATION_SERVICE_ADDR
|
||||
value: "recommendationservice:8080"
|
||||
- name: SHIPPING_SERVICE_ADDR
|
||||
value: "shippingservice:50051"
|
||||
- name: CHECKOUT_SERVICE_ADDR
|
||||
value: "checkoutservice:5050"
|
||||
- name: AD_SERVICE_ADDR
|
||||
value: "adservice:9555"
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: frontend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-external
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: frontend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: loadgenerator
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: loadgenerator
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
restartPolicy: Always
|
||||
initContainers:
|
||||
- name: wait-frontend
|
||||
image: loadgenerator
|
||||
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
||||
until timeout -t 2 curl -f "http://${FRONTEND_ADDR}"; do
|
||||
echo "waiting for http://${FRONTEND_ADDR}";
|
||||
sleep 2;
|
||||
done;']
|
||||
env:
|
||||
- name: FRONTEND_ADDR
|
||||
value: "frontend:80"
|
||||
containers:
|
||||
- name: main
|
||||
image: loadgenerator
|
||||
env:
|
||||
- name: FRONTEND_ADDR
|
||||
value: "frontend:80"
|
||||
- name: USERS
|
||||
value: "10"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 300m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: paymentservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: paymentservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: paymentservice
|
||||
ports:
|
||||
- containerPort: 50051
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: paymentservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: paymentservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 50051
|
||||
targetPort: 50051
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: productcatalogservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: productcatalogservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: productcatalogservice
|
||||
ports:
|
||||
- containerPort: 3550
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:3550"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:3550"]
|
||||
# env:
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: productcatalogservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: productcatalogservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 3550
|
||||
targetPort: 3550
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: recommendationservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: recommendationservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: recommendationservice
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
env:
|
||||
- name: PRODUCT_CATALOG_SERVICE_ADDR
|
||||
value: "productcatalogservice:3550"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 220Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 450Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: recommendationservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: recommendationservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-cart
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis-cart
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: redis-data
|
||||
resources:
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 125m
|
||||
requests:
|
||||
cpu: 70m
|
||||
memory: 200Mi
|
||||
volumes:
|
||||
- name: redis-data
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-cart
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: redis-cart
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shippingservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shippingservice
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: shippingservice
|
||||
ports:
|
||||
- containerPort: 50051
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
# env:
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shippingservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: shippingservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 50051
|
||||
targetPort: 50051
|
|
@ -1,58 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: emailservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: emailservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: emailservice
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: emailservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: emailservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 5000
|
||||
targetPort: 8080
|
|
@ -1,95 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: frontend
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 10
|
||||
httpGet:
|
||||
path: "/_healthz"
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: "Cookie"
|
||||
value: "shop_session-id=x-readiness-probe"
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 10
|
||||
httpGet:
|
||||
path: "/_healthz"
|
||||
port: 8080
|
||||
httpHeaders:
|
||||
- name: "Cookie"
|
||||
value: "shop_session-id=x-liveness-probe"
|
||||
env:
|
||||
- name: PRODUCT_CATALOG_SERVICE_ADDR
|
||||
value: "productcatalogservice:3550"
|
||||
- name: CURRENCY_SERVICE_ADDR
|
||||
value: "currencyservice:7000"
|
||||
- name: CART_SERVICE_ADDR
|
||||
value: "cartservice:7070"
|
||||
- name: RECOMMENDATION_SERVICE_ADDR
|
||||
value: "recommendationservice:8080"
|
||||
- name: SHIPPING_SERVICE_ADDR
|
||||
value: "shippingservice:50051"
|
||||
- name: CHECKOUT_SERVICE_ADDR
|
||||
value: "checkoutservice:5050"
|
||||
- name: AD_SERVICE_ADDR
|
||||
value: "adservice:9555"
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: frontend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-external
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: frontend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
|
@ -1,53 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: loadgenerator
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: loadgenerator
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
restartPolicy: Always
|
||||
initContainers:
|
||||
- name: wait-frontend
|
||||
image: loadgenerator
|
||||
command: ['sh', '-c', 'set -x; apk add --no-cache curl;
|
||||
until timeout -t 2 curl -f "http://${FRONTEND_ADDR}"; do
|
||||
echo "waiting for http://${FRONTEND_ADDR}";
|
||||
sleep 2;
|
||||
done;']
|
||||
env:
|
||||
- name: FRONTEND_ADDR
|
||||
value: "frontend:80"
|
||||
containers:
|
||||
- name: main
|
||||
image: loadgenerator
|
||||
env:
|
||||
- name: FRONTEND_ADDR
|
||||
value: "frontend:80"
|
||||
- name: USERS
|
||||
value: "10"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 300m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
|
@ -1,56 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: paymentservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: paymentservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: paymentservice
|
||||
ports:
|
||||
- containerPort: 50051
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: paymentservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: paymentservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 50051
|
||||
targetPort: 50051
|
|
@ -1,59 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: productcatalogservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: productcatalogservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: productcatalogservice
|
||||
ports:
|
||||
- containerPort: 3550
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:3550"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:3550"]
|
||||
# env:
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: productcatalogservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: productcatalogservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 3550
|
||||
targetPort: 3550
|
|
@ -1,61 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: recommendationservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: recommendationservice
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 5
|
||||
containers:
|
||||
- name: server
|
||||
image: recommendationservice
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:8080"]
|
||||
env:
|
||||
- name: PRODUCT_CATALOG_SERVICE_ADDR
|
||||
value: "productcatalogservice:3550"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 220Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 450Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: recommendationservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: recommendationservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 8080
|
||||
targetPort: 8080
|
|
@ -1,63 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-cart
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis-cart
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
livenessProbe:
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: 6379
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: redis-data
|
||||
resources:
|
||||
limits:
|
||||
memory: 256Mi
|
||||
cpu: 125m
|
||||
requests:
|
||||
cpu: 70m
|
||||
memory: 200Mi
|
||||
volumes:
|
||||
- name: redis-data
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-cart
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: redis-cart
|
||||
ports:
|
||||
- name: redis
|
||||
port: 6379
|
||||
targetPort: 6379
|
|
@ -1,59 +0,0 @@
|
|||
# Copyright 2018 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shippingservice
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shippingservice
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: shippingservice
|
||||
ports:
|
||||
- containerPort: 50051
|
||||
readinessProbe:
|
||||
periodSeconds: 5
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/grpc_health_probe", "-addr=:50051"]
|
||||
# env:
|
||||
# - name: JAEGER_SERVICE_ADDR
|
||||
# value: "jaeger-collector:14268"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shippingservice
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: shippingservice
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 50051
|
||||
targetPort: 50051
|
Loading…
Add table
Add a link
Reference in a new issue