From 476c03d6003f21cbf7fd83f18738ab06c1cf6230 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 23 Apr 2021 22:46:12 +0200 Subject: icecast2 role and test deployment --- roles/streaming/icecast/templates/icecast.xml.j2 | 71 +++++++++++++++++++++++ roles/streaming/icecast/templates/pod-spec.yml.j2 | 31 ++++++++++ 2 files changed, 102 insertions(+) create mode 100644 roles/streaming/icecast/templates/icecast.xml.j2 create mode 100644 roles/streaming/icecast/templates/pod-spec.yml.j2 (limited to 'roles/streaming/icecast/templates') diff --git a/roles/streaming/icecast/templates/icecast.xml.j2 b/roles/streaming/icecast/templates/icecast.xml.j2 new file mode 100644 index 00000000..3bf0044a --- /dev/null +++ b/roles/streaming/icecast/templates/icecast.xml.j2 @@ -0,0 +1,71 @@ + + + + 8080 + + + + 5 + 524288 + 30 + 15 + 10 + 1 + 32768 + + + + {{ item.value.source_password }} + {{ item.value.relay_password }} + {{ item.value.admin.username }} + {{ item.value.admin.password }} + + +{% if 'hostname' in item.value %} + {{ item.value.hostname }} +{% endif %} +{% if 'location' in item.value %} + {{ item.value.location }} +{% endif %} +{% if 'contact' in item.value %} + {{ item.value.contact }} +{% endif %} + + + +{% for mountpoint, config in item.value.mountpoints.items() %} + + {{ mountpoint }} +{% if 'username' in config %} + {{ config.username }} +{% endif %} + {{ config.password }} +{% if 'max_listeners' in config %} + {{ config.max_listeners }} +{% endif %} + + +{% endfor %} + + + 1 + + /usr/share/icecast2 + /srv/logs + /usr/share/icecast2/web + /usr/share/icecast2/admin + + + + + - + access.log + 3 + 100000 + + + + 0 + + + diff --git a/roles/streaming/icecast/templates/pod-spec.yml.j2 b/roles/streaming/icecast/templates/pod-spec.yml.j2 new file mode 100644 index 00000000..5dc0b086 --- /dev/null +++ b/roles/streaming/icecast/templates/pod-spec.yml.j2 @@ -0,0 +1,31 @@ +securityContext: + allowPrivilegeEscalation: false + runAsUser: 990 + runAsGroup: 990 +containers: +- name: icecast + image: registry.gitlab.com/spreadspace/docker/icecast:{{ item.value.image_version }} + imagePullPolicy: Always + resources: + limits: + memory: "512Mi" + args: + - icecast2 + - -c + - /srv/icecast.xml + volumeMounts: + - name: home + mountPath: /srv/icecast.xml + subPath: icecast.xml + readOnly: true + - name: home + mountPath: /srv/logs + subPath: logs + ports: + - containerPort: 8080 + hostPort: {{ item.value.port }} + +volumes: +- name: home + hostPath: + path: "{{ icecast_base_path }}/{{ item.key }}" -- cgit v1.2.3