Skip to content

Commit

Permalink
Add kubernetes manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Waterball12 committed Feb 24, 2021
1 parent 58e281f commit 86a1c58
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 0 deletions.
39 changes: 39 additions & 0 deletions kubernetes/quizzer-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
kind: Service
apiVersion: v1
metadata:
name: quizzer
spec:
ports:
- name: http
protocol: TCP
port: 31924
targetPort: 31924
selector:
app: quizzer

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: quizzer-deployment
spec:
replicas: 1
selector:
matchLabels:
app: quizzer
template:
metadata:
labels:
app: quizzer
spec:
containers:
- name: quizzer
image: waterball/allegro-quizzer:latest
ports:
- containerPort: 31924
env:
- name: "ASPNETCORE_URLS"
value: "http://0.0.0.0:31924;"
- name: "RabbitMQConnection"
value: "rabbitmq://rabbitmq"

52 changes: 52 additions & 0 deletions kubernetes/rabbitmq-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
kind: Service
apiVersion: v1
metadata:
name: rabbitmq
spec:
clusterIP: None
ports:
- name: http
protocol: TCP
port: 15672
targetPort: 15672
- name: amqp
protocol: TCP
port: 5672
targetPort: 5672
selector:
app: rabbitmq
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rabbitmq
spec:
serviceName: rabbitmq
selector:
matchLabels:
app: rabbitmq
replicas: 1
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: rabbitmq
spec:
terminationGracePeriodSeconds: 10
containers:
- name: rabbitmq
image: rabbitmq:3.8-management
imagePullPolicy: Always
ports:
- name: http
protocol: TCP
containerPort: 15672
- name: amqp
protocol: TCP
containerPort: 5672
readinessProbe:
exec:
command: ["true"]
initialDelaySeconds: 30
timeoutSeconds: 5
42 changes: 42 additions & 0 deletions kubernetes/webapi-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapi-deployment
spec:
selector:
matchLabels:
app: webapi
template:
metadata:
labels:
app: webapi
spec:
containers:
- name: webapi
image: waterball/allegro-webapi:latest
resources:
ports:
- containerPort: 31597
env:
- name: "QuizGrpcApi"
value: "http://quizzer:31924"
- name: "ASPNETCORE_URLS"
value: "http://0.0.0.0:31597;"
---
apiVersion: v1
kind: Service
metadata:
name: webapi-service
spec:
type: NodePort
selector:
app: webapi
ports:
- name: http
protocol: TCP
port: 31597
targetPort: 31597
- name: https
protocol: TCP
port: 31598
targetPort: 31598
44 changes: 44 additions & 0 deletions kubernetes/websocket-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: websocket-deployment
spec:
selector:
matchLabels:
app: websocket
template:
metadata:
labels:
app: websocket
spec:
containers:
- name: websocket
image: waterball/allegro-websocket:latest
resources:
ports:
- containerPort: 31274
env:
- name: "QuizGrpcApi"
value: "http://quizzer:31924"
- name: "ASPNETCORE_URLS"
value: "http://0.0.0.0:31274;"
- name: "RabbitMQConnection"
value: "rabbitmq://rabbitmq"
---
apiVersion: v1
kind: Service
metadata:
name: websocket-service
spec:
type: NodePort
selector:
app: websocket
ports:
- name: http
protocol: TCP
port: 31274
targetPort: 31274
- name: https
protocol: TCP
port: 31275
targetPort: 31275

0 comments on commit 86a1c58

Please sign in to comment.