disable _asterisk and destroy namespace
decision with eaas, currently broken, nobody has shown interest and trying to maintain kube as a first priority
This commit is contained in:
1
_disabled/asterisk/.gitignore
vendored
Normal file
1
_disabled/asterisk/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
conf
|
13
_disabled/asterisk/README.md
Normal file
13
_disabled/asterisk/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Asterisk
|
||||
|
||||
Asterisk is used as
|
||||
|
||||
This application is managed by [ArgoCD](https://argocd.k-space.ee/applications/argocd/asterisk)
|
||||
|
||||
Should ArgoCD be down manifests here can be applied with:
|
||||
|
||||
```
|
||||
kubectl apply -n asterisk -f application.yaml
|
||||
```
|
||||
|
||||
asterisk-secrets was dumped to git.k-space.ee/secretspace/kube:_disabled/asterisk
|
124
_disabled/asterisk/application.yml
Normal file
124
_disabled/asterisk/application.yml
Normal file
@@ -0,0 +1,124 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: asterisk
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/hostname: voip.k-space.ee
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
externalTrafficPolicy: Local
|
||||
selector:
|
||||
app: asterisk
|
||||
ports:
|
||||
- name: asterisk
|
||||
protocol: UDP
|
||||
port: 5060
|
||||
- name: sip-data-10000
|
||||
protocol: UDP
|
||||
port: 10000
|
||||
- name: sip-data-10001
|
||||
protocol: UDP
|
||||
port: 10001
|
||||
- name: sip-data-10002
|
||||
protocol: UDP
|
||||
port: 10002
|
||||
- name: sip-data-10003
|
||||
protocol: UDP
|
||||
port: 10003
|
||||
- name: sip-data-10004
|
||||
protocol: UDP
|
||||
port: 10004
|
||||
- name: sip-data-10005
|
||||
protocol: UDP
|
||||
port: 10005
|
||||
- name: sip-data-10006
|
||||
protocol: UDP
|
||||
port: 10006
|
||||
- name: sip-data-10007
|
||||
protocol: UDP
|
||||
port: 10007
|
||||
- name: sip-data-10008
|
||||
protocol: UDP
|
||||
port: 10008
|
||||
- name: sip-data-10009
|
||||
protocol: UDP
|
||||
port: 10009
|
||||
- name: sip-data-10010
|
||||
protocol: UDP
|
||||
port: 10010
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: asterisk
|
||||
labels:
|
||||
app: asterisk
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: asterisk
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: asterisk
|
||||
spec:
|
||||
containers:
|
||||
- name: asterisk
|
||||
image: harbor.k-space.ee/k-space/asterisk
|
||||
command:
|
||||
- /usr/sbin/asterisk
|
||||
args:
|
||||
- -TWBpvvvdddf
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/asterisk
|
||||
ports:
|
||||
- containerPort: 8088
|
||||
name: metrics
|
||||
volumes:
|
||||
- name: config
|
||||
secret:
|
||||
secretName: asterisk-secrets
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: asterisk
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: asterisk
|
||||
podMetricsEndpoints:
|
||||
- port: metrics
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: asterisk
|
||||
spec:
|
||||
groups:
|
||||
- name: asterisk
|
||||
rules:
|
||||
- alert: AsteriskPhoneNotRegistered
|
||||
expr: asterisk_endpoints_state{resource=~"1.*"} < 2
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "{{ $labels.resource }} is not registered."
|
||||
- alert: AsteriskOutboundNumberNotRegistered
|
||||
expr: asterisk_pjsip_outbound_registration_status == 0
|
||||
for: 5m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "{{ $labels.username }} is not registered with provider."
|
||||
- alert: AsteriskCallsPerMinuteLimitExceed
|
||||
expr: asterisk_channels_duration_seconds > 10*60
|
||||
for: 20m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "Call at channel {{ $labels.name }} is taking longer than 10m."
|
39
_disabled/asterisk/network-policies.yml
Normal file
39
_disabled/asterisk/network-policies.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: asterisk
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: asterisk
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
ingress:
|
||||
- from:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: monitoring
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: prometheus
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: 100.101.0.0/16
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: 100.102.0.0/16
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: 81.90.125.224/32 # Lauri home
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: 172.20.8.241/32 # Erki A
|
||||
- from:
|
||||
- ipBlock:
|
||||
cidr: 212.47.211.10/32 # Elisa SIP
|
||||
egress:
|
||||
- to:
|
||||
- ipBlock:
|
||||
cidr: 212.47.211.10/32 # Elisa SIP
|
1
_disabled/asterisk/networkpolicy-base.yml
Symbolic link
1
_disabled/asterisk/networkpolicy-base.yml
Symbolic link
@@ -0,0 +1 @@
|
||||
../shared/networkpolicy-base.yml
|
Reference in New Issue
Block a user