Enable hostNetwork for Asterisk - fixes RTP media path for VoIP
This commit is contained in:
@@ -1,130 +1,132 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: asterisk
|
name: asterisk
|
||||||
namespace: telephony
|
namespace: telephony
|
||||||
labels:
|
labels:
|
||||||
app: asterisk
|
app: asterisk
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: asterisk
|
app: asterisk
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: asterisk
|
app: asterisk
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
hostNetwork: true
|
||||||
fsGroup: 0
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
securityContext:
|
||||||
- name: asterisk
|
fsGroup: 0
|
||||||
image: localhost/andrius/asterisk:latest
|
containers:
|
||||||
imagePullPolicy: Never
|
- name: asterisk
|
||||||
ports:
|
image: localhost/andrius/asterisk:latest
|
||||||
- name: sip-udp
|
imagePullPolicy: Never
|
||||||
containerPort: 5060
|
ports:
|
||||||
protocol: UDP
|
- name: sip-udp
|
||||||
- name: sip-tcp
|
containerPort: 5060
|
||||||
containerPort: 5060
|
protocol: UDP
|
||||||
protocol: TCP
|
- name: sip-tcp
|
||||||
- name: ari
|
containerPort: 5060
|
||||||
containerPort: 8088
|
protocol: TCP
|
||||||
protocol: TCP
|
- name: ari
|
||||||
volumeMounts:
|
containerPort: 8088
|
||||||
- name: config-modules
|
protocol: TCP
|
||||||
mountPath: /etc/asterisk/modules.conf
|
volumeMounts:
|
||||||
subPath: modules.conf
|
- name: config-modules
|
||||||
- name: config-http
|
mountPath: /etc/asterisk/modules.conf
|
||||||
mountPath: /etc/asterisk/http.conf
|
subPath: modules.conf
|
||||||
subPath: http.conf
|
- name: config-http
|
||||||
- name: config-ari
|
mountPath: /etc/asterisk/http.conf
|
||||||
mountPath: /etc/asterisk/ari.conf
|
subPath: http.conf
|
||||||
subPath: ari.conf
|
- name: config-ari
|
||||||
- name: config-manager
|
mountPath: /etc/asterisk/ari.conf
|
||||||
mountPath: /etc/asterisk/manager.conf
|
subPath: ari.conf
|
||||||
subPath: manager.conf
|
- name: config-manager
|
||||||
- name: config-pjsip
|
mountPath: /etc/asterisk/manager.conf
|
||||||
mountPath: /etc/asterisk/pjsip.conf
|
subPath: manager.conf
|
||||||
subPath: pjsip.conf
|
- name: config-pjsip
|
||||||
- name: config-extensions
|
mountPath: /etc/asterisk/pjsip.conf
|
||||||
mountPath: /etc/asterisk/extensions.conf
|
subPath: pjsip.conf
|
||||||
subPath: extensions.conf
|
- name: config-extensions
|
||||||
- name: config-rtp
|
mountPath: /etc/asterisk/extensions.conf
|
||||||
mountPath: /etc/asterisk/rtp.conf
|
subPath: extensions.conf
|
||||||
subPath: rtp.conf
|
- name: config-rtp
|
||||||
- name: asterisk-data
|
mountPath: /etc/asterisk/rtp.conf
|
||||||
mountPath: /var/spool/asterisk
|
subPath: rtp.conf
|
||||||
- name: asterisk-logs
|
- name: asterisk-data
|
||||||
mountPath: /var/log/asterisk
|
mountPath: /var/spool/asterisk
|
||||||
resources:
|
- name: asterisk-logs
|
||||||
requests:
|
mountPath: /var/log/asterisk
|
||||||
cpu: 100m
|
resources:
|
||||||
memory: 128Mi
|
requests:
|
||||||
limits:
|
cpu: 100m
|
||||||
cpu: "1"
|
memory: 128Mi
|
||||||
memory: 512Mi
|
limits:
|
||||||
livenessProbe:
|
cpu: "1"
|
||||||
tcpSocket:
|
memory: 512Mi
|
||||||
port: 8088
|
livenessProbe:
|
||||||
initialDelaySeconds: 15
|
tcpSocket:
|
||||||
periodSeconds: 10
|
port: 8088
|
||||||
readinessProbe:
|
initialDelaySeconds: 15
|
||||||
httpGet:
|
periodSeconds: 10
|
||||||
path: /ari/asterisk/info
|
readinessProbe:
|
||||||
port: 8088
|
httpGet:
|
||||||
httpHeaders:
|
path: /ari/asterisk/info
|
||||||
- name: Authorization
|
port: 8088
|
||||||
value: "Basic Zmxvd2VyY29yZTpibHVlamF5LWFzdGVyaXNrLWFyaQ=="
|
httpHeaders:
|
||||||
initialDelaySeconds: 10
|
- name: Authorization
|
||||||
periodSeconds: 5
|
value: "Basic Zmxvd2VyY29yZTpibHVlamF5LWFzdGVyaXNrLWFyaQ=="
|
||||||
volumes:
|
initialDelaySeconds: 10
|
||||||
- name: config-modules
|
periodSeconds: 5
|
||||||
configMap:
|
volumes:
|
||||||
name: asterisk-config
|
- name: config-modules
|
||||||
items:
|
configMap:
|
||||||
- key: modules.conf
|
name: asterisk-config
|
||||||
path: modules.conf
|
items:
|
||||||
- name: config-http
|
- key: modules.conf
|
||||||
configMap:
|
path: modules.conf
|
||||||
name: asterisk-config
|
- name: config-http
|
||||||
items:
|
configMap:
|
||||||
- key: http.conf
|
name: asterisk-config
|
||||||
path: http.conf
|
items:
|
||||||
- name: config-ari
|
- key: http.conf
|
||||||
configMap:
|
path: http.conf
|
||||||
name: asterisk-config
|
- name: config-ari
|
||||||
items:
|
configMap:
|
||||||
- key: ari.conf
|
name: asterisk-config
|
||||||
path: ari.conf
|
items:
|
||||||
- name: config-manager
|
- key: ari.conf
|
||||||
configMap:
|
path: ari.conf
|
||||||
name: asterisk-config
|
- name: config-manager
|
||||||
items:
|
configMap:
|
||||||
- key: manager.conf
|
name: asterisk-config
|
||||||
path: manager.conf
|
items:
|
||||||
- name: config-pjsip
|
- key: manager.conf
|
||||||
configMap:
|
path: manager.conf
|
||||||
name: asterisk-config
|
- name: config-pjsip
|
||||||
items:
|
configMap:
|
||||||
- key: pjsip.conf
|
name: asterisk-config
|
||||||
path: pjsip.conf
|
items:
|
||||||
- name: config-extensions
|
- key: pjsip.conf
|
||||||
configMap:
|
path: pjsip.conf
|
||||||
name: asterisk-config
|
- name: config-extensions
|
||||||
items:
|
configMap:
|
||||||
- key: extensions.conf
|
name: asterisk-config
|
||||||
path: extensions.conf
|
items:
|
||||||
- name: config-rtp
|
- key: extensions.conf
|
||||||
configMap:
|
path: extensions.conf
|
||||||
name: asterisk-config
|
- name: config-rtp
|
||||||
items:
|
configMap:
|
||||||
- key: rtp.conf
|
name: asterisk-config
|
||||||
path: rtp.conf
|
items:
|
||||||
- name: asterisk-data
|
- key: rtp.conf
|
||||||
persistentVolumeClaim:
|
path: rtp.conf
|
||||||
claimName: asterisk-data
|
- name: asterisk-data
|
||||||
- name: asterisk-logs
|
persistentVolumeClaim:
|
||||||
emptyDir: {}
|
claimName: asterisk-data
|
||||||
|
- name: asterisk-logs
|
||||||
|
emptyDir: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user