87 lines
1.7 KiB
YAML
87 lines
1.7 KiB
YAML
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: mqtt-adapter
|
|
namespace: grpc-services
|
|
annotations:
|
|
nginx.ingress.kubernetes.io/rewrite-target: /
|
|
spec:
|
|
rules:
|
|
- host: mainflux-iot.ha.rs
|
|
http:
|
|
paths:
|
|
- path: /mqtt
|
|
backend:
|
|
serviceName: mqtt-adapter
|
|
servicePort: 8880
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: mqtt-adapter
|
|
namespace: grpc-services
|
|
labels:
|
|
component: mqtt-adapter
|
|
spec:
|
|
selector:
|
|
component: mqtt-adapter
|
|
ports:
|
|
- port: 1883
|
|
name: mqtt
|
|
- port: 8880
|
|
name: ws
|
|
type: LoadBalancer
|
|
---
|
|
apiVersion: autoscaling/v2beta1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: mqtt-adapter
|
|
namespace: grpc-services
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
name: mqtt-adapter
|
|
minReplicas: 3
|
|
maxReplicas: 10
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
targetAverageUtilization: 80
|
|
---
|
|
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mqtt-adapter
|
|
namespace: grpc-services
|
|
labels:
|
|
component: mqtt-adapter
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: mqtt-adapter
|
|
spec:
|
|
containers:
|
|
- name: mainflux-mqtt
|
|
image: mainflux/mqtt:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 1883
|
|
name: mqtt-mqtt
|
|
- containerPort: 8880
|
|
name: mqtt-ws
|
|
env:
|
|
- name: MF_THINGS_URL
|
|
value: "things:8183"
|
|
- name: MF_NATS_URL
|
|
value: "nats://nats-cluster.nats-io:4222"
|
|
- name: MF_MQTT_REDIS_HOST
|
|
value: "redis-master.redis"
|
|
- name: MF_MQTT_REDIS_PORT
|
|
value: "6379"
|
|
- name: MF_MQTT_REDIS_PASS
|
|
value: "piIUITrNMc"
|