Skip to content

Commit 123db2a

Browse files
feat: add ant media (#73)
* draft * feat: try bump kubermatic Signed-off-by: Oliver Bähler <[email protected]> * feat: try bump kubermatic Signed-off-by: Oliver Bähler <[email protected]> * feat: try bump kubermatic Signed-off-by: Oliver Bähler <[email protected]> * feat: try bump kubermatic Signed-off-by: Oliver Bähler <[email protected]> --------- Signed-off-by: Oliver Bähler <[email protected]>
1 parent 9a8c6d1 commit 123db2a

File tree

54 files changed

+1884
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1884
-37
lines changed

.github/configs/ct.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ validate-yaml: false
99
excluded-charts:
1010
- "library"
1111
- "manifests"
12+
chart-repos:
13+
- bitnami=https://charts.bitnami.com/bitnami
14+

charts/ams/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/ams/Chart.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v2
2+
name: ams
3+
description: Secure Ant Media Server Deployment
4+
type: application
5+
version: 0.1.0
6+
appVersion: "1.16.0"
7+
home: https://antmedia.io/docs/guides/clustering-and-scaling/kubernetes/prepare-environment-to-deploy-ams-at-kubernetes/
8+
maintainers:
9+
- name: oliverbaehler
10+
11+
- name: chifu1234
12+
13+
dependencies:
14+
- name: redis
15+
version: 19.5.3
16+
repository: https://charts.bitnami.com/bitnami

charts/ams/README.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Ant Media Server (AMS)
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
4+
5+
**Homepage:** <https://antmedia.io/docs/guides/clustering-and-scaling/kubernetes/prepare-environment-to-deploy-ams-at-kubernetes/>
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| oliverbaehler | <[email protected]> | |
12+
| chifu1234 | <[email protected]> | |
13+
14+
# Major Changes
15+
16+
Major Changes to functions are documented with the version affected. **Before upgrading the dependency version, check this section out!**
17+
18+
| **Template** | **Chart Version** | **Change/Description** | **Commits/PRs** |
19+
| :----------- | :---------------- | :--------------------- | :-------------- |
20+
|||||
21+
22+
# Backup & Restore
23+
24+
You can toggle a periodoic backup of the redis database with the `backup.enabled` parameter. [See Backup](#backup) for more information. The idea is to dump the snapshots to a pvc (which is backuped by the plattform) and have access to different states of the cluster.
25+
26+
When it comes to the case you need to perform a restore, we have the pod yaml prepared which lets you interact with the cluster and with the backups. Execute:
27+
28+
```shell
29+
kubectl get configmap { $.Release.Name }-redis-backup -o jsonpath='{.data.restore\.yaml}'
30+
```
31+
32+
Execute the restore helper:
33+
34+
```shell
35+
kubectl exec -it { $.Release.Name }-restore -- bash
36+
```
37+
38+
## Values
39+
40+
| Key | Type | Default | Description |
41+
|-----|------|---------|-------------|
42+
| config.java | string | `"-Xms1g"` | JVM Memory Options(-Xms1g -Xmx4g): Set the Java heap size. |
43+
| config.license | string | `""` | License Key |
44+
| config.limits.cpu | int | `75` | Set the CPU limit percentage that server does not exceed. If CPU is more than this value, server reports highResourceUsage and does not allow publish or play. |
45+
| config.limits.memory | int | `75` | Set the Memory Limit percentage that server does not exceed. If Memory usage is more than this value, server reports highResourceUsage and does not allow publish or play |
46+
| config.mode | string | `"standalone"` | Server mode. It can be standalone or cluster. If cluster mode is specified then mongodb host, username and password should also be provided. |
47+
| config.redis.config | string | `nil` | Custom Redison Configuration |
48+
| config.redis.database | int | `0` | Redis Database-Key |
49+
| coturn.affinity | object | `{}` | Set affinity rules |
50+
| coturn.autoscaling.enabled | bool | `false` | |
51+
| coturn.autoscaling.maxReplicas | int | `100` | |
52+
| coturn.autoscaling.minReplicas | int | `1` | |
53+
| coturn.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
54+
| coturn.cmd | string | `nil` | Executed command |
55+
| coturn.dnsPolicy | string | `"ClusterFirstWithHostNet"` | Set DNS Policy |
56+
| coturn.enabled | bool | `false` | Enable CoTurn Server |
57+
| coturn.envs | object | `{}` | Extra environment variables (`key: value` style, allows templating) |
58+
| coturn.image.pullPolicy | string | `"Always"` | Image pull policy |
59+
| coturn.image.registry | string | `"docker.io"` | Image Registry |
60+
| coturn.image.repository | string | `"coturn/coturn"` | Image Repository |
61+
| coturn.image.tag | string | `""` | Image Tag |
62+
| coturn.ingress.annotations."cert-manager.io/cluster-issuer" | string | `"cloudflare"` | |
63+
| coturn.ingress.annotations."ingress.cilium.io/loadbalancer-mode" | string | `"shared"` | |
64+
| coturn.ingress.className | string | `"cilium"` | |
65+
| coturn.ingress.enabled | bool | `true` | |
66+
| coturn.ingress.host | string | `"origin.ant.buttah.cloud"` | |
67+
| coturn.ingress.path | string | `"/"` | |
68+
| coturn.ingress.pathType | string | `"Prefix"` | |
69+
| coturn.ingress.tls | bool | `true` | |
70+
| coturn.livenessProbe | object | `{"enabled":false,"httpGet":{"path":"/","port":5080},"initialDelaySeconds":30,"periodSeconds":10}` | Liveness Probe |
71+
| coturn.nodeSelector | object | `{}` | Set the node selector |
72+
| coturn.pdb.enabled | bool | `false` | |
73+
| coturn.pdb.maxUnavailable | int | `0` | |
74+
| coturn.pdb.minAvailable | int | `1` | |
75+
| coturn.podAnnotations | object | `{}` | Additional Pod Annotations |
76+
| coturn.podLabels | object | `{}` | Additional Pod Labels |
77+
| coturn.podSecurityContext | object | `{"enabled":true,"seccompProfile":{"type":"RuntimeDefault"}}` | SecurityContext for Pod |
78+
| coturn.priorityClassName | string | `""` | Set a pod priorityClassName |
79+
| coturn.readinessProbe | object | `{"enabled":true,"httpGet":{"path":"/","port":5080},"initialDelaySeconds":30,"periodSeconds":10}` | Readiness Probe |
80+
| coturn.replicaCount | int | `1` | Amount of replicas |
81+
| coturn.resources | object | `{}` | |
82+
| coturn.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"enabled":true,"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":999}` | SecurityContext for Container |
83+
| coturn.strategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | Deployment Strategy |
84+
| coturn.tolerations | list | `[]` | Set list of tolerations |
85+
| coturn.topologySpreadConstraints | list | `[]` | Set Topology Spread Constraints |
86+
| coturn.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
87+
| coturn.volumes | list | `[]` | Additional volumes on the output Deployment definition. |
88+
| exporter.configuration.config | string | `"---\nmetrics:\n- name: antmedia\n type: object\n help: AntMedia Server broadcast statistics\n path: $[*]\n labels:\n streamId: $.streamId\n name: $.name\n status: $.status\n type: $.type\n values:\n speed: $.speed\n bitrate: $.bitrate\n hlsViewerCount: $.hlsViewerCount\n webRTCViewerCount: $.webRTCViewerCount\n rtmpViewerCount: $.rtmpViewerCount\n mp4Enabled: $.mp4Enabled\n webMEnabled: $.webMEnabled\n"` | |
89+
| exporter.enabled | bool | `false` | Enable Prometheus Exporter |
90+
| fullnameOverride | string | `""` | |
91+
| global | object | `{}` | |
92+
| image.pullPolicy | string | `"Always"` | Image pull policy |
93+
| image.registry | string | `"docker.io"` | Image Registry |
94+
| image.repository | string | `"anguda/ant-media"` | Image Repository |
95+
| image.tag | string | `""` | Image Tag |
96+
| imagePullSecrets | list | `[]` | Image PullSecrets |
97+
| kafka | object | `{"architecture":"replicaset","auth":{"enabled":true},"enabled":false,"metrics":{"enabled":true},"tls":{"enabled":false}}` | Kafka Dependency (Untested) |
98+
| nameOverride | string | `""` | |
99+
| netpol.enabled | bool | `false` | |
100+
| netpol.ingress.from[0].namespaceSelector | object | `{}` | |
101+
| origin.affinity | object | `{}` | Set affinity rules |
102+
| origin.autoscaling.enabled | bool | `false` | |
103+
| origin.autoscaling.maxReplicas | int | `100` | |
104+
| origin.autoscaling.minReplicas | int | `1` | |
105+
| origin.autoscaling.targetCPUUtilizationPercentage | int | `80` | |
106+
| origin.cmd | string | `nil` | Executed command |
107+
| origin.dnsPolicy | string | `"ClusterFirstWithHostNet"` | Set DNS Policy |
108+
| origin.envs | object | `{}` | Extra environment variables (`key: value` style, allows templating) |
109+
| origin.ingress.annotations | object | `{}` | |
110+
| origin.ingress.className | string | `""` | |
111+
| origin.ingress.enabled | bool | `true` | |
112+
| origin.ingress.hosts[0] | string | `"streams.company.com"` | |
113+
| origin.ingress.path | string | `"/"` | |
114+
| origin.ingress.pathType | string | `"Prefix"` | |
115+
| origin.ingress.tls | bool | `true` | |
116+
| origin.livenessProbe | object | `{"enabled":false,"httpGet":{"path":"/","port":5080},"initialDelaySeconds":30,"periodSeconds":10}` | Liveness Probe |
117+
| origin.nodeSelector | object | `{}` | Set the node selector |
118+
| origin.pdb.enabled | bool | `false` | |
119+
| origin.pdb.maxUnavailable | int | `0` | |
120+
| origin.pdb.minAvailable | int | `1` | |
121+
| origin.podAnnotations | object | `{}` | Additional Pod Annotations |
122+
| origin.podLabels | object | `{}` | Additional Pod Labels |
123+
| origin.podSecurityContext | object | `{"enabled":true,"seccompProfile":{"type":"RuntimeDefault"}}` | SecurityContext for Pod |
124+
| origin.priorityClassName | string | `""` | Set a pod priorityClassName |
125+
| origin.readinessProbe | object | `{"enabled":true,"httpGet":{"path":"/","port":5080},"initialDelaySeconds":5,"periodSeconds":10}` | Readiness Probe |
126+
| origin.replicaCount | int | `1` | Amount of replicas |
127+
| origin.resources | object | `{}` | |
128+
| origin.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"enabled":true,"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":999}` | SecurityContext for Container |
129+
| origin.strategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | Deployment Strategy |
130+
| origin.tolerations | list | `[]` | Set list of tolerations |
131+
| origin.topologySpreadConstraints | list | `[]` | Set Topology Spread Constraints |
132+
| origin.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
133+
| origin.volumes | list | `[]` | Additional volumes on the output Deployment definition. |
134+
| redis.architecture | string | `"replication"` | |
135+
| redis.auth.enabled | bool | `true` | |
136+
| redis.custom.backup.concurrencyPolicy | string | `""` | Concurrency Policy |
137+
| redis.custom.backup.enabled | bool | `true` | Enable Backup Job |
138+
| redis.custom.backup.failedJobsHistoryLimit | int | `3` | Failed Jobs History Limit |
139+
| redis.custom.backup.persistence | object | `{"accessModes":["ReadWriteOnce"],"annotations":{"helm.sh/resource-policy":"keep"},"enabled":true,"labels":{},"size":"3Gi","storageClass":""}` | Persistence Configuration |
140+
| redis.custom.backup.persistence.accessModes | list | `["ReadWriteOnce"]` | Access Modes |
141+
| redis.custom.backup.persistence.annotations | object | `{"helm.sh/resource-policy":"keep"}` | Annotations for the persistence |
142+
| redis.custom.backup.persistence.enabled | bool | `true` | Enable Persistence |
143+
| redis.custom.backup.persistence.labels | object | `{}` | Labels for the persistence |
144+
| redis.custom.backup.persistence.size | string | `"3Gi"` | Path for the persistence |
145+
| redis.custom.backup.persistence.storageClass | string | `""` | StorageClass |
146+
| redis.custom.backup.restartPolicy | string | `"OnFailure"` | RestartPolicy |
147+
| redis.custom.backup.retentionDays | int | `7` | Retention in Revisions for the backup |
148+
| redis.custom.backup.schedule | string | `"* * * * *"` | Schedule For Backup Job |
149+
| redis.custom.backup.successfulJobsHistoryLimit | int | `1` | Successful Jobs History Limit |
150+
| redis.custom.backup.ttlSecondsAfterFinished | int | `60` | Time to live for the job |
151+
| redis.custom.config | object | `{}` | Custom Redisson Configuration ([Reference](https://github.com/redisson/redisson/wiki/2.-Configuration/)) |
152+
| redis.custom.database | int | `0` | Redis Database-Key |
153+
| redis.custom.helper.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
154+
| redis.custom.helper.image.registry | string | `"docker.io"` | Image Registry |
155+
| redis.custom.helper.image.repository | string | `"bitnami/redis-sentinel"` | Image Repository |
156+
| redis.custom.helper.image.tag | string | `"7.2.5-debian-12-r0"` | Image Tag |
157+
| redis.custom.helper.podSecurityContext | object | `{"enabled":true,"fsGroup":1001,"seccompProfile":{"type":"RuntimeDefault"}}` | SecurityContext for Pod |
158+
| redis.custom.helper.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"enabled":true,"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":1001}` | SecurityContext for Container |
159+
| redis.metrics.enabled | bool | `true` | |
160+
| redis.metrics.extraArgs.skip-tls-verification | bool | `true` | |
161+
| redis.sentinel.enabled | bool | `true` | |
162+
| redis.sentinel.masterSet | string | `"antmedia"` | |
163+
| redis.tls.certCAFilename | string | `"ca.pem"` | |
164+
| redis.tls.certFilename | string | `"cert.pem"` | |
165+
| redis.tls.certKeyFilename | string | `"cert.key"` | |
166+
| redis.tls.enabled | bool | `false` | |
167+
| redis.tls.existingSecret | string | `"ams-tls-secret"` | |
168+
| serviceAccount.annotations | object | `{}` | |
169+
| serviceAccount.automount | bool | `true` | |
170+
| serviceAccount.create | bool | `true` | |
171+
| serviceAccount.name | string | `""` | |
172+
173+
## Requirements
174+
175+
| Repository | Name | Version |
176+
|------------|------|---------|
177+
| https://charts.bitnami.com/bitnami | redis | 19.5.3 |

charts/ams/README.md.gotmpl

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Ant Media Server (AMS)
2+
{{ template "chart.deprecationWarning" . }}
3+
4+
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
5+
6+
{{ template "chart.homepageLine" . }}
7+
8+
{{ template "chart.maintainersSection" . }}
9+
10+
# Major Changes
11+
12+
Major Changes to functions are documented with the version affected. **Before upgrading the dependency version, check this section out!**
13+
14+
| **Template** | **Chart Version** | **Change/Description** | **Commits/PRs** |
15+
| :----------- | :---------------- | :--------------------- | :-------------- |
16+
|||||
17+
18+
# Backup & Restore
19+
20+
You can toggle a periodoic backup of the redis database with the `backup.enabled` parameter. [See Backup](#backup) for more information. The idea is to dump the snapshots to a pvc (which is backuped by the plattform) and have access to different states of the cluster.
21+
22+
When it comes to the case you need to perform a restore, we have the pod yaml prepared which lets you interact with the cluster and with the backups. Execute:
23+
24+
```shell
25+
kubectl get configmap { $.Release.Name }-redis-backup -o jsonpath='{.data.restore\.yaml}'
26+
```
27+
28+
Execute the restore helper:
29+
30+
```shell
31+
kubectl exec -it { $.Release.Name }-restore -- bash
32+
```
33+
34+
35+
36+
37+
38+
{{/*
39+
Chart Values
40+
*/}}
41+
{{ template "chart.valuesSection" . }}
42+
43+
44+
{{/*
45+
Chart Sources
46+
*/}}
47+
{{ template "chart.sourcesSection" . }}
48+
49+
{{/*
50+
Chart Requirements
51+
*/}}
52+
{{ template "chart.requirementsSection" . }}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: {{ include "ant-media.fullname" . }}-coturn
5+
labels:
6+
{{- include "ant-media.labels" . | nindent 4 }}
7+
"app.kubernetes.io/component": "coturn"
8+
data:
9+
base.conf: |-
10+
{{- if or .Values.coturn.config.staticSecret.secretName .Values.coturn.config.staticSecret.value }}
11+
use-auth-secret
12+
{{- else if or .Values.coturn.config.staticUsers.secretName .Values.coturn.config.staticUsers.users }}
13+
lt-cred-mech
14+
{{- else }}
15+
{{- fail "Either static users or a static secret is required!" }}
16+
{{- end }}
17+
realm={{ .Values.coturn.config.realm }}
18+
listening-port={{ .Values.coturn.config.ports.listening }}
19+
{{- with .Values.coturn.config.externalIp }}
20+
external-ip={{ . }}
21+
{{- end }}
22+
{{- if .Values.coturn.config.tls.secretName }}
23+
no-tlsv1
24+
no-tlsv1_1
25+
no-tlsv1_2
26+
tls-listening-port={{ .Values.coturn.config.ports.tlsListening }}
27+
pkey=/tls/tls.key
28+
cert=/tls/tls.crt
29+
{{- else }}
30+
no-tls
31+
no-dtls
32+
{{- end }}
33+
min-port={{ .Values.coturn.config.ports.relay.min }}
34+
max-port={{ .Values.coturn.config.ports.relay.max }}
35+
{{- if .Values.coturn.config.mobility }}
36+
mobility
37+
{{- end }}
38+
log-file=stdout
39+
pidfile=/tmp/turnserver.pid
40+
prometheus
41+
{{- if .Values.coturn.config.cliPasswordHash }}
42+
cli-ip=127.0.0.1
43+
cli-port=5766
44+
cli-password={{ .Values.coturn.config.cliPasswordHash }}
45+
{{- else }}
46+
no-cli
47+
{{- end }}
48+
{{- if .Values.coturn.config.logging.verbose }}
49+
{{- if .Values.coturn.config.logging.veryVerbose }}
50+
Verbose
51+
{{- else }}
52+
verbose
53+
{{- end }}
54+
{{- if .Values.coturn.config.logging.logBinding }}
55+
log-binding
56+
{{- end }}
57+
{{- end }}
58+
{{- with .Values.coturn.config.extraConfig }}
59+
extra.conf: {{ tpl . $ | quote }}
60+
{{- end }}
61+
entrypoint.sh: {{ $.Files.Get "src/entrypoint.sh" | quote }}

0 commit comments

Comments
 (0)