Add init container for Asterisk sound file downloads
This commit is contained in:
@@ -21,6 +21,20 @@ spec:
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
securityContext:
|
||||
fsGroup: 0
|
||||
initContainers:
|
||||
- name: install-sounds
|
||||
image: busybox:latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /sounds/en &&
|
||||
wget -qO- http://downloads.asterisk.org/pub/telephony/sounds/asterisk-core-sounds-en-ulaw-current.tar.gz | tar xz -C /sounds/en/ &&
|
||||
wget -qO- http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-ulaw-current.tar.gz | tar xz -C /sounds/en/ &&
|
||||
echo "Sound files installed: $(find /sounds/en -type f | wc -l) files"
|
||||
volumeMounts:
|
||||
- name: sounds
|
||||
mountPath: /sounds/en
|
||||
containers:
|
||||
- name: asterisk
|
||||
image: localhost/andrius/asterisk:latest
|
||||
@@ -61,6 +75,8 @@ spec:
|
||||
mountPath: /var/spool/asterisk
|
||||
- name: asterisk-logs
|
||||
mountPath: /var/log/asterisk
|
||||
- name: sounds
|
||||
mountPath: /var/lib/asterisk/sounds/en
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -130,3 +146,5 @@ spec:
|
||||
claimName: asterisk-data
|
||||
- name: asterisk-logs
|
||||
emptyDir: {}
|
||||
- name: sounds
|
||||
emptyDir: {}
|
||||
|
||||
Reference in New Issue
Block a user