Skip to content

Commit

Permalink
refactor: Remove unused persistent volume claim and fixed Initcontain…
Browse files Browse the repository at this point in the history
…er script
  • Loading branch information
kalisio-nicolas committed Aug 27, 2024
1 parent de46341 commit 98f60c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.

This file was deleted.

22 changes: 12 additions & 10 deletions charts/chirpstack/templates/chirpstack-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,27 @@ spec:
volumes:
- name: vchirpstack-config
configMap:
name: chirpstack-config
- name: chirpstack-claim1
persistentVolumeClaim:
claimName: chirpstack-claim1
name: chirpstack-config
{{- if .Values.chirpstack.fetch_lorawan_device }}
initContainers:
# init container is used to fetch lorawan devices and import them into the postgreSQL
# init container is used to fetch LoRaWAN devices and import them into PostgreSQL
- name: fetch-lorawan-devices
image: chirpstack/chirpstack:4
command: ['sh', '-c', 'apk add --no-cache git && git clone https://github.com/brocaar/lorawan-devices /opt/lorawan-devices/repo && chirpstack -c /etc/chirpstack import-legacy-lorawan-devices-repository -d /opt/lorawan-devices/repo; sleep 60']
command:
- sh
- -c
- |
apk add --no-cache git && \
git clone https://github.com/brocaar/lorawan-devices /tmp/lorawan-devices && \
chirpstack -c /etc/chirpstack import-legacy-lorawan-devices-repository -d /tmp/lorawan-devices; \
echo "LoRaWAN devices imported"
env:
{{- include "kargo.environment.render" (dict "env" $.Values.chirpstack.redis.auth "context" $) | indent 12 }}
{{- include "kargo.environment.render" (dict "env" $.Values.chirpstack.postgres "context" $) | indent 12 }}
{{- include "kargo.environment.render" (dict "env" $.Values.chirpstack.postgres "context" $) | indent 12 }}
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: /etc/chirpstack
name: vchirpstack-config
- mountPath: /opt/lorawan-devices
name: chirpstack-claim1
{{- end }}
{{- end }}

0 comments on commit 98f60c0

Please sign in to comment.