Skip to content

Commit

Permalink
NOISSUE - Scale up nats, envoy, authn, things and mqtt (#41)
Browse files Browse the repository at this point in the history
* scale to 3 nats, envoy, authn, things and mqtt

Signed-off-by: Ivan Milošević <[email protected]>

* Add size of scale to helm values
Add scaling to README

Signed-off-by: Ivan Milošević <[email protected]>

* remove highlights from configuration table in readme

Signed-off-by: Ivan Milošević <[email protected]>
  • Loading branch information
blokovi authored May 21, 2020
1 parent c9af1ba commit 43e4fc2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
29 changes: 17 additions & 12 deletions charts/mainflux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ Helm Chart for the Mainflux IoT Platform

The following table lists the configurable parameters and their default values.

| Parameter | Description | Default |
| -------------------------------------- | -------------------------------------------------------------------------- | -------------- |
| `defaults.logLevel` | Log level | `debug` |
| `defaults.image.pullPolicy` | Docker Image Pull Policy | `IfNotPresent` |
| `defaults.image.repository` | Docker Image Repository | `mainflux` |
| `defaults.image.tag` | Docker Image Tag | `0.10.0` |
| `nginx_internal.mtls.tls` | TLS secret which contains the server cert/key | `''` |
| `nginx_internal.mtls.intermediate_crt` | Generic secret which contains the intermediate cert used to verify clients | `''` |
| `ingress.enabled` | Should the Nginx Ingress be created | `true` |
| `ingress.hostname` | Hostname for the Nginx Ingress | `''` |
| `ingress.tls.hostname` | Hostname of the Nginx Ingress certificate | `''` |
| `ingress.tls.secret` | TLS secret for the Nginx Ingress | `''` |
| Parameter | Description | Default |
| ------------------------------------ | -------------------------------------------------------------------------- | ------------ |
| defaults.logLevel | Log level | debug |
| defaults.image.pullPolicy | Docker Image Pull Policy | IfNotPresent |
| defaults.image.repository | Docker Image Repository | mainflux |
| defaults.image.tag | Docker Image Tag | 0.10.0 |
| defaults.replicaCount | Replicas of MQTT adapter, Things, Envoy and Authn | 3 |
| nginx_internal.mtls.tls | TLS secret which contains the server cert/key | |
| nginx_internal.mtls.intermediate_crt | Generic secret which contains the intermediate cert used to verify clients | |
| ingress.enabled | Should the Nginx Ingress be created | true |
| ingress.hostname | Hostname for the Nginx Ingress | |
| ingress.tls.hostname | Hostname of the Nginx Ingress certificate | |
| ingress.tls.secret | TLS secret for the Nginx Ingress | |
| nats.maxPayload | Maximum payload size in bytes that the NATS server will accept | 268435456 |
| nats.replicaCount | NATS replicas | 3 |

All Mainflux services can have their `logLevel`, `image.pullPolicy`, `image.repository` and `image.tag` overridden. The names of the services are:

Expand All @@ -41,4 +44,6 @@ All Mainflux services can have their `logLevel`, `image.pullPolicy`, `image.repo
- influxdb_writer
- infuxdb_reader

By default scale of MQTT adapter, Things, Envoy, Authn and NATS will be set to 3. It's recommended that you set this values to number of your nodes in Kubernetes cluster, i.e. `--set defaults.replicaCount=3 --set nats.replicaCount=3`

**Note:** make sure you run `helm install` with `--dependency-update` flag!
1 change: 1 addition & 0 deletions charts/mainflux/templates/adapter_mqtt-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ kind: StatefulSet
metadata:
name: {{ .Release.Name }}-adapter-mqtt
spec:
replicas: {{ .Values.defaults.replicaCount }}
serviceName: {{ .Release.Name }}-adapter-mqtt
selector:
matchLabels:
Expand Down
1 change: 1 addition & 0 deletions charts/mainflux/templates/authn-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ kind: Deployment
metadata:
name: {{ .Release.Name }}-authn
spec:
replicas: {{ .Values.defaults.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
Expand Down
1 change: 1 addition & 0 deletions charts/mainflux/templates/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ kind: Deployment
metadata:
name: {{ .Release.Name }}-envoy
spec:
replicas: {{ .Values.defaults.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
Expand Down
1 change: 1 addition & 0 deletions charts/mainflux/templates/things-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ kind: Deployment
metadata:
name: {{ .Release.Name }}-things
spec:
replicas: {{ .Values.defaults.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
Expand Down
3 changes: 3 additions & 0 deletions charts/mainflux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ defaults:
pullPolicy: "IfNotPresent"
repository: "mainflux"
tag: "0.10.0"
# Replicas of MQTT adapter, NATS, Things, Envoy and Authn
replicaCount: 3

ingress:
enabled: true
Expand Down Expand Up @@ -82,6 +84,7 @@ nats:
clusterAuth:
enabled: false
maxPayload: 268435456
replicaCount: 3

postgresql-users:
name: postgresql-users
Expand Down

0 comments on commit 43e4fc2

Please sign in to comment.