Add init container for Asterisk sound file downloads
This commit is contained in:
@@ -21,6 +21,20 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 0
|
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:
|
containers:
|
||||||
- name: asterisk
|
- name: asterisk
|
||||||
image: localhost/andrius/asterisk:latest
|
image: localhost/andrius/asterisk:latest
|
||||||
@@ -61,6 +75,8 @@ spec:
|
|||||||
mountPath: /var/spool/asterisk
|
mountPath: /var/spool/asterisk
|
||||||
- name: asterisk-logs
|
- name: asterisk-logs
|
||||||
mountPath: /var/log/asterisk
|
mountPath: /var/log/asterisk
|
||||||
|
- name: sounds
|
||||||
|
mountPath: /var/lib/asterisk/sounds/en
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
@@ -130,3 +146,5 @@ spec:
|
|||||||
claimName: asterisk-data
|
claimName: asterisk-data
|
||||||
- name: asterisk-logs
|
- name: asterisk-logs
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: sounds
|
||||||
|
emptyDir: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user