Add store service

This commit is contained in:
Stefan Prodan
2018-08-15 12:28:03 +03:00
parent 85a26ed71e
commit 7622dfb74f
4 changed files with 73 additions and 2 deletions

View File

@@ -55,4 +55,4 @@ spec:
- name: message
value: "Greetings from backend grey"
- name: backend_url
value: "http://podinfo:9898/echo" #"https://httpbin.org/anything"
value: "http://podinfo-store:9898/echo" #"https://httpbin.org/anything"

View File

@@ -55,4 +55,4 @@ spec:
- name: message
value: "Greetings from backend orange"
- name: backend_url
value: "http://podinfo:9898/echo" #"https://httpbin.org/anything"
value: "http://podinfo-store:9898/echo" #"https://httpbin.org/anything"

View File

@@ -0,0 +1,56 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podinfo-store
labels:
app: podinfo-store
version: "0.6"
spec:
replicas: 3
selector:
matchLabels:
app: podinfo-store
version: "0.6"
template:
metadata:
labels:
app: podinfo-store
version: "0.6"
annotations:
prometheus.io/scrape: 'true'
spec:
containers:
- name: podinfod
image: quay.io/stefanprodan/podinfo:0.6.0-rc.1
command:
- ./podinfo
- -port=9898
- -logLevel=debug
ports:
- name: http
containerPort: 9898
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: 9898
initialDelaySeconds: 1
periodSeconds: 5
failureThreshold: 1
livenessProbe:
httpGet:
path: /healthz
port: 9898
initialDelaySeconds: 1
periodSeconds: 10
failureThreshold: 2
resources:
requests:
memory: "32Mi"
cpu: "10m"
env:
- name: color
value: "yellow"
- name: message
value: "Greetings from store yellow"

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: podinfo-store
labels:
app: podinfo-store
spec:
type: ClusterIP
ports:
- port: 9898
targetPort: http
protocol: TCP
name: http
selector:
app: podinfo-store