Skip to content

Commit 0de6b12

Browse files
helm updates for docker.
1 parent dc8a9a9 commit 0de6b12

File tree

7 files changed

+310
-3
lines changed

7 files changed

+310
-3
lines changed

configuration/chirpstack/chirpstack.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ servers=[
88

99
[network]
1010
net_id="000000"
11-
adr_plugins=[
12-
"/etc/chirpstack/adr-modules/sensade-adr-mod/sensade-adr.js",
13-
]
11+
adr_plugins=["/etc/chirpstack/adr-modules/sensade-adr-mod/sensade-adr.js"]
12+
1413
enabled_regions=[
1514
"eu868",
1615
]

helm/charts/chirpstack/Chart.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v2
2+
name: chirpstack
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
version: 0.1.2
18+
19+
# This is the version number of the application being deployed. This version number should be
20+
# incremented each time you make changes to the application.
21+
appVersion: 1.16.1
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ $.Chart.Name }}-configmap
5+
data:
6+
chirpstack.toml: |
7+
[postgresql]
8+
dsn="postgres://chirpstack:chirpstack@postgresCsV4/chirpstack?sslmode=disable"
9+
10+
[redis]
11+
servers=[
12+
"redis://redis:6379",
13+
]
14+
15+
[network]
16+
net_id="000000"
17+
adr_plugins=["/etc/chirpstack/adr-modules/sensade-adr-mod/sensade-adr.js"]
18+
enabled_regions=[
19+
"eu868",
20+
]
21+
22+
[api]
23+
bind="0.0.0.0:8080"
24+
jwt_secret="verysecret"
25+
26+
[integration]
27+
enabled=["mqtt"]
28+
29+
[integration.mqtt]
30+
server="tcp://mosquitto:1883"
31+
json=true
32+
33+
region_eu868.toml: |
34+
# This file contains an example EU868 configuration.
35+
[[regions]]
36+
37+
# ID is an user-defined identifier for this region.
38+
id="eu868"
39+
40+
# Description is a short description for this region.
41+
description="EU868"
42+
43+
# Common-name refers to the common-name of this region as defined by
44+
# the LoRa Alliance.
45+
common_name="EU868"
46+
47+
48+
# Gateway configuration.
49+
[regions.gateway]
50+
51+
# Force gateways as private.
52+
#
53+
# If enabled, gateways can only be used by devices under the same tenant.
54+
force_gws_private=false
55+
56+
57+
# Gateway backend configuration.
58+
[regions.gateway.backend]
59+
60+
# The enabled backend type.
61+
enabled="mqtt"
62+
63+
# MQTT configuration.
64+
[regions.gateway.backend.mqtt]
65+
66+
topic_prefix=""
67+
68+
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
69+
server="tcp://mosquitto:1883"
70+
71+
# Gateway channel configuration.
72+
#
73+
# Note: this configuration is only used in case the gateway is using the
74+
# ChirpStack Concentratord daemon. In any other case, this configuration
75+
# is ignored.
76+
[[regions.gateway.channels]]
77+
frequency=868100000
78+
bandwidth=125000
79+
modulation="LORA"
80+
spreading_factors=[7, 8, 9, 10, 11, 12]
81+
82+
[[regions.gateway.channels]]
83+
frequency=868300000
84+
bandwidth=125000
85+
modulation="LORA"
86+
spreading_factors=[7, 8, 9, 10, 11, 12]
87+
88+
[[regions.gateway.channels]]
89+
frequency=868500000
90+
bandwidth=125000
91+
modulation="LORA"
92+
spreading_factors=[7, 8, 9, 10, 11, 12]
93+
94+
[[regions.gateway.channels]]
95+
frequency=867100000
96+
bandwidth=125000
97+
modulation="LORA"
98+
spreading_factors=[7, 8, 9, 10, 11, 12]
99+
100+
[[regions.gateway.channels]]
101+
frequency=867300000
102+
bandwidth=125000
103+
modulation="LORA"
104+
spreading_factors=[7, 8, 9, 10, 11, 12]
105+
106+
[[regions.gateway.channels]]
107+
frequency=867500000
108+
bandwidth=125000
109+
modulation="LORA"
110+
spreading_factors=[7, 8, 9, 10, 11, 12]
111+
112+
[[regions.gateway.channels]]
113+
frequency=867700000
114+
bandwidth=125000
115+
modulation="LORA"
116+
spreading_factors=[7, 8, 9, 10, 11, 12]
117+
118+
[[regions.gateway.channels]]
119+
frequency=867900000
120+
bandwidth=125000
121+
modulation="LORA"
122+
spreading_factors=[7, 8, 9, 10, 11, 12]
123+
124+
[[regions.gateway.channels]]
125+
frequency=868300000
126+
bandwidth=250000
127+
modulation="LORA"
128+
spreading_factors=[7]
129+
130+
[[regions.gateway.channels]]
131+
frequency=868800000
132+
bandwidth=125000
133+
modulation="FSK"
134+
datarate=50000
135+
136+
137+
# Region specific network configuration.
138+
[regions.network]
139+
140+
# Below is the common set of extra channels. Please make sure that these
141+
# channels are also supported by the gateways.
142+
[[regions.network.extra_channels]]
143+
frequency=867100000
144+
min_dr=0
145+
max_dr=7
146+
147+
[[regions.network.extra_channels]]
148+
frequency=867300000
149+
min_dr=0
150+
max_dr=7
151+
152+
[[regions.network.extra_channels]]
153+
frequency=867500000
154+
min_dr=0
155+
max_dr=7
156+
157+
[[regions.network.extra_channels]]
158+
frequency=867700000
159+
min_dr=0
160+
max_dr=7
161+
162+
[[regions.network.extra_channels]]
163+
frequency=867900000
164+
min_dr=0
165+
max_dr=7
166+
167+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
kind: Deployment
2+
apiVersion: apps/v1
3+
metadata:
4+
name: {{ $.Chart.Name }}
5+
labels:
6+
helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
7+
app.kubernetes.io/name: {{ $.Chart.Name }}
8+
app.kubernetes.io/instance: {{ $.Chart.Name }}-{{ .Values.DOCKER_IMAGE_TAG }}
9+
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
spec:
11+
replicas: {{ .Values.REPLICAS }}
12+
selector:
13+
matchLabels:
14+
app: {{ $.Chart.Name }}
15+
strategy:
16+
rollingUpdate:
17+
maxSurge: 1
18+
maxUnavailable: 0
19+
type: RollingUpdate
20+
revisionHistoryLimit: {{ .Values.REVISION_HISTORY_LIMIT }}
21+
template:
22+
metadata:
23+
labels:
24+
app: {{ $.Chart.Name }}
25+
version: "{{ $.Chart.Name }}-{{ .Values.DOCKER_IMAGE_TAG }}"
26+
sidecar.istio.io/inject: "false"
27+
spec:
28+
containers:
29+
- name: {{ $.Chart.Name }}
30+
args: ["-c", "/etc/chirpstack"]
31+
image: "{{ .Values.CONTAINER_REGISTRY }}/{{ .Values.DOCKER_IMAGE_NAME }}:{{ .Values.DOCKER_IMAGE_TAG }}"
32+
imagePullPolicy: {{ .Values.DOCKER_IMAGE_PULL_POLICY }}
33+
ports:
34+
- name: grpc
35+
containerPort: 8000
36+
protocol: TCP
37+
- name: http
38+
containerPort: 8080
39+
protocol: TCP
40+
resources:
41+
limits:
42+
cpu: 150m
43+
memory: 512Mi
44+
requests:
45+
cpu: 5m
46+
memory: 128Mi
47+
volumeMounts:
48+
- name: {{ $.Chart.Name }}-configmap
49+
mountPath: /etc/chirpstack/chirpstack.toml
50+
subPath: chirpstack.toml
51+
- name: {{ $.Chart.Name }}-configmap
52+
mountPath: /etc/chirpstack/region_eu868.toml
53+
subPath: region_eu868.toml
54+
- name: persistent-storage
55+
mountPath: /etc/chirpstack/
56+
volumes:
57+
- name: "{{ $.Chart.Name }}-configmap"
58+
configMap:
59+
name: "{{ $.Chart.Name }}-configmap"
60+
- name: persistent-storage
61+
persistentVolumeClaim:
62+
claimName: persist-claim-chirpstack
63+
restartPolicy: Always
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
kind: Service
2+
apiVersion: v1
3+
metadata:
4+
name: {{ $.Chart.Name }}-svc
5+
labels:
6+
app: {{ $.Chart.Name }}
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- name: http
11+
port: 8080
12+
targetPort: 8080
13+
protocol: TCP
14+
- name: grpc
15+
port: 8000
16+
targetPort: 8000
17+
protocol: TCP
18+
selector:
19+
app: {{ $.Chart.Name }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: networking.istio.io/v1alpha3
2+
kind: VirtualService
3+
metadata:
4+
name: "{{ $.Chart.Name }}-virtualservice"
5+
spec:
6+
hosts:
7+
- {{ .Values.INGRESS_ADDRESS | default (printf "%s-%s.%s" .Release.Namespace $.Chart.Name .Values.global.DOMAIN_NAME)}}
8+
gateways:
9+
- istio-system/istio-ingressgateway
10+
http:
11+
- name: {{ $.Chart.Name }}
12+
route:
13+
- destination:
14+
port:
15+
number: 8080
16+
host: "{{ $.Chart.Name }}-svc"
17+
headers:
18+
response:
19+
add:
20+
Cache-Control: no-cache # Telling browsers to not cache our responses.

helm/charts/chirpstack/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Default values for aodb.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
# Registry the image comes from
6+
CONTAINER_REGISTRY: chirpstack
7+
8+
# Image that needs to be used.
9+
DOCKER_IMAGE_NAME: chirpstack
10+
DOCKER_IMAGE_TAG: '4.6'
11+
12+
DOCKER_IMAGE_PULL_POLICY: Always
13+
14+
# How many replicas of the pod?
15+
REPLICAS: 1
16+
17+
# How much revision history should be stored? (can clog up etcd)
18+
REVISION_HISTORY_LIMIT: 3

0 commit comments

Comments
 (0)