1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-11 19:29:16 +08:00
Mainflux.mainflux/k8s/mainflux/normalizer.yml
Aleksandar Novaković 59c5e350e1 Add nginx ingress config to k8s services (#472)
Update README in accordance to latest changes. Add gRPC load
balancing setup. Add healthcheck to k8s setup.

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2018-11-27 12:56:36 +01:00

60 lines
1.1 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: normalizer
labels:
component: normalizer
spec:
selector:
component: normalizer
ports:
- port: 8184
name: http
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: normalizer
namespace: grpc-services
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: normalizer
minReplicas: 3
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: normalizer
labels:
component: normalizer
spec:
template:
metadata:
labels:
component: normalizer
spec:
containers:
- name: mainflux-normalizer
image: mainflux/normalizer:latest
imagePullPolicy: Always
env:
- name: MF_NATS_URL
value: "nats://nats-cluster.nats-io:4222"
- name: MF_NORMALIZER_PORT
value: "8184"
livenessProbe:
httpGet:
path: /version
port: 8184
initialDelaySeconds: 3
periodSeconds: 3