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)
# Service that exposes this deployment
kind: Service
apiVersion: v1
metadata:
name: schema-orchestrator
spec:
selector:
app: schema-orchestrator
ports:
- port: 3000
targetPort: 3000
---
# schema orchestrator deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: schema-orchestrator
spec:
replicas: 1
selector:
matchLabels:
app: schema-orchestrator
template:
metadata:
labels:
app: schema-orchestrator
spec:
containers:
- name: schema-orchestrator
ports:
- containerPort: 3000
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
value: redis-schema-status.redis.svc.cluster.local:6379
- name: LOG_MESSAGES
value: "true"
- name: MINIO_ADDRESS
value: minio:9000
- name: MINIO_ACCESSKEYID
value: root
- name: MINIO_ACCESSKEY
value: DikkeDraak
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: jwt-secret
key: secret
resources:
requests:
memory: "100Mi"
cpu: "100m"
limits:
memory: "250Mi"
cpu: "500m"
imagePullSecrets:
- name: docker-regcred
---
# Deployment autoscaler
kind: HorizontalPodAutoscaler
metadata:
name: schema-orchestrator
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: schema-orchestrator
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80