Newer
Older
#This program has been developed by students from the bachelor Computer Science at Utrecht University within the Software Project course.
#© Copyright Utrecht University (Department of Information and Computing Sciences)
# ctr Microservice query service deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: ctr-service
labels:
app: ctr-service
spec:
replicas: 1
selector:
matchLabels:
app: ctr-service
template:
metadata:
labels:
app: ctr-service
spec:
containers:
- name: ctr-service
image: datastropheregistry.azurecr.io/ctr-service:develop
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: RABBIT_HOST
value: rabbitmq
- name: RABBIT_PORT
value: "5672"
- name: RABBIT_USER
valueFrom:
secretKeyRef:
name: rabbitmq-default-user
key: username
- name: RABBIT_PASSWORD
valueFrom:
secretKeyRef:
name: rabbitmq-default-user
key: password
- name: REDIS_ADDRESS
value: redis.redis.svc.cluster.local:6379
- name: LOG_MESSAGES
value: "true"
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "250Mi"
cpu: "500m"
imagePullSecrets:
- name: docker-regcred
---
# ctr Microservice deployment autoscaler
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: ctr-service
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: ctr-service
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80