Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleaned up issues with K8s deployments #16

Merged
merged 5 commits into from
May 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions k8s/deployServices.cmd → deployK8sServices.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
REM deploys all Kubernetes services

for %%f in (*.yaml) do (
for %%f in (k8s/*.yaml) do (
echo "Deploying %%~nxf"
kubectl apply -f "%%~nxf"
kubectl apply -f "k8s/%%~nxf"
)
9 changes: 8 additions & 1 deletion k8s/lighthouse-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
apiVersion: v1
kind: Namespace
metadata:
name: akka-cqrs
---
apiVersion: v1
kind: Service
metadata:
name: lighthouse
namespace: akka-cqrs
labels:
app: lighthouse
spec:
Expand All @@ -14,12 +20,13 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: akka-cqrs
name: lighthouse
labels:
app: lighthouse
spec:
serviceName: lighthouse
replicas: 3
replicas: 2
selector:
matchLabels:
app: lighthouse
Expand Down
2 changes: 2 additions & 0 deletions k8s/mongodb-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: mongodb
spec:
ports:
Expand All @@ -11,6 +12,7 @@ spec:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: akka-cqrs
name: mongodb
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ items:
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
namespace: akka-cqrs
name: jaeger
labels:
app: jaeger
Expand Down Expand Up @@ -64,6 +65,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: jaeger-query
labels:
app: jaeger
Expand All @@ -72,7 +74,7 @@ items:
spec:
ports:
- name: query-http
port: 80
port: 8881
protocol: TCP
targetPort: 16686
selector:
Expand All @@ -82,6 +84,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: jaeger-collector
labels:
app: jaeger
Expand All @@ -108,6 +111,7 @@ items:
- apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: jaeger-agent
labels:
app: jaeger
Expand Down
3 changes: 3 additions & 0 deletions k8s/statsd-deploy.yaml → k8s/phobos/statsd-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: statsd-agent
namespace: akka-cqrs
labels:
app: statsd
spec:
Expand All @@ -25,6 +26,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: graphite-http
labels:
app: statsd
Expand All @@ -41,6 +43,7 @@ spec:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
namespace: akka-cqrs
name: statsd
labels:
app: statsd
Expand Down
4 changes: 3 additions & 1 deletion k8s/pricing-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: pricing
labels:
app: pricing
Expand All @@ -14,12 +15,13 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
amespace: akka-cqrs
name: pricing
labels:
app: pricing
spec:
serviceName: pricing
replicas: 3
replicas: 2
selector:
matchLabels:
app: pricing
Expand Down
40 changes: 22 additions & 18 deletions k8s/pricing-web-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: pricing-web
namespace: akka-cqrs
labels:
app: pricing-web
spec:
Expand All @@ -11,31 +12,34 @@ spec:
selector:
app: pricing-web
---
- apiVersion: v1
kind: Service
metadata:
name: pricing-ui
labels:
app: pricing-web
spec:
ports:
- name: query-http
port: 8999
protocol: TCP
targetPort: 80
selector:
app: pricing-web
type: LoadBalancer
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: pricing-ui
labels:
app: pricing-web
spec:
ports:
- name: query-http
port: 80
protocol: TCP
targetPort: 80
selector:
app: pricing-web
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: akka-cqrs
name: pricing-web
labels:
app: pricing-web
spec:
serviceName: pricing-web
replicas: 3
strategy:
type: Recreate
replicas: 2
selector:
matchLabels:
app: pricing-web
Expand All @@ -58,7 +62,7 @@ spec:
fieldRef:
fieldPath: metadata.name
- name: CLUSTER_IP
value: "$(POD_NAME).web-pricing"
value: "$(POD_NAME).pricing-web"
- name: CLUSTER_SEEDS
value: akka.tcp://AkkaTrader@pricing-0.pricing:5110,akka.tcp://AkkaTrader@pricing-1.pricing:5110,akka.tcp://AkkaTrader@pricing-2.pricing:5110
livenessProbe:
Expand Down
4 changes: 3 additions & 1 deletion k8s/tradeprocessor-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: trade-processor
labels:
app: trade-processor
Expand All @@ -14,12 +15,13 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: akka-cqrs
name: trade-processor
labels:
app: trade-processor
spec:
serviceName: trade-processor
replicas: 3
replicas: 2
selector:
matchLabels:
app: trade-processor
Expand Down
4 changes: 3 additions & 1 deletion k8s/traders-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v1
kind: Service
metadata:
namespace: akka-cqrs
name: traders
labels:
app: traders
Expand All @@ -14,12 +15,13 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: akka-cqrs
name: traders
labels:
app: traders
spec:
serviceName: traders
replicas: 3
replicas: 2
selector:
matchLabels:
app: traders
Expand Down
4 changes: 4 additions & 0 deletions stopK8sServices.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
REM destroys all K8s services

kubectl -n akka-cqrs delete statefulsets,deployments,po,svc --all