diff options
Diffstat (limited to 'templates/default')
-rw-r--r-- | templates/default/kubernetes/nginx-streamer-cm.yml.j2 | 11 | ||||
-rw-r--r-- | templates/default/kubernetes/nginx-streamer-svc.yml.j2 | 2 | ||||
-rw-r--r-- | templates/default/kubernetes/sfive-cm.yml.j2 (renamed from templates/default/kubernetes/sfive-proxy-cm.yml.j2) | 5 | ||||
-rw-r--r-- | templates/default/kubernetes/sfive-deploy.yml.j2 (renamed from templates/default/kubernetes/sfive-proxy-deploy.yml.j2) | 9 |
4 files changed, 10 insertions, 17 deletions
diff --git a/templates/default/kubernetes/nginx-streamer-cm.yml.j2 b/templates/default/kubernetes/nginx-streamer-cm.yml.j2 index b7a9901..563245c 100644 --- a/templates/default/kubernetes/nginx-streamer-cm.yml.j2 +++ b/templates/default/kubernetes/nginx-streamer-cm.yml.j2 @@ -1,6 +1,3 @@ -%% set flumotion_port = desc.streams[worker.flags.stream].port -%% set nginx_port = desc.streams[worker.flags.stream]['nginx-port'] -%% set hostname = worker.flags['stream-hostname'] apiVersion: v1 kind: ConfigMap metadata: @@ -38,8 +35,8 @@ data: access_log /dev/null; server { - listen {{ nginx_port }} default_server; - listen [::]:{{ nginx_port }} default_server; + listen {{ desc.streams[worker.flags.stream].port }} default_server; + listen [::]:{{ desc.streams[worker.flags.stream].port }} default_server; server_name _; root /srv/www; @@ -72,7 +69,7 @@ data: hls_fragment_naming timestamp; hls_fragment_slicing aligned; hls_type live; - hls_base_url http://{{ hostname }}:{{ nginx_port }}/hls/; + hls_base_url http://{{ worker.flags['stream-hostname'] }}:{{ desc.streams[worker.flags.stream].port }}/hls/; %% for mux in desc.streams[worker.flags.stream]['nginx-muxes'] %% for profile in desc.muxes[mux].formats.flash @@ -97,7 +94,7 @@ data: respawn on; %% for mux in desc.streams[worker.flags.stream]['nginx-muxes'] %% for profile in desc.muxes[mux].formats.flash - exec_static ffmpeg -i http://flumotion-worker-{{ worker.name }}:{{ flumotion_port }}/{{ mux }}-flash-{{ profile }}.flv + exec_static ffmpeg -i http://flumotion-worker-{{ worker.name }}:{{ desc.streams[worker.flags.stream].port }}/{{ mux }}-flash-{{ profile }}.flv -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f flv rtmp://localhost/hls/{{ mux }}-{{ profile }} -acodec copy -vcodec copy -vbsf h264_mp4toannexb -f flv rtmp://localhost/dash/{{ mux }}-{{ profile }}; %% endfor diff --git a/templates/default/kubernetes/nginx-streamer-svc.yml.j2 b/templates/default/kubernetes/nginx-streamer-svc.yml.j2 index b6bcfe5..9be5ed7 100644 --- a/templates/default/kubernetes/nginx-streamer-svc.yml.j2 +++ b/templates/default/kubernetes/nginx-streamer-svc.yml.j2 @@ -13,4 +13,4 @@ spec: type: streamer worker: {{ worker.name }} ports: - - port: {{ desc.streams[worker.flags.stream]['nginx-port'] }} + - port: {{ desc.streams[worker.flags.stream].port }} diff --git a/templates/default/kubernetes/sfive-proxy-cm.yml.j2 b/templates/default/kubernetes/sfive-cm.yml.j2 index e109e85..dea9222 100644 --- a/templates/default/kubernetes/sfive-proxy-cm.yml.j2 +++ b/templates/default/kubernetes/sfive-cm.yml.j2 @@ -2,11 +2,8 @@ apiVersion: v1 kind: ConfigMap metadata: namespace: {{ namespace }} - name: sfive-proxy-{{ worker.name }} + name: sfive-{{ worker.name }} labels: app: sfive - type: proxy worker: {{ worker.name }} data: - proxy.json: | - {} diff --git a/templates/default/kubernetes/sfive-proxy-deploy.yml.j2 b/templates/default/kubernetes/sfive-deploy.yml.j2 index 62ed9fe..06c84dc 100644 --- a/templates/default/kubernetes/sfive-proxy-deploy.yml.j2 +++ b/templates/default/kubernetes/sfive-deploy.yml.j2 @@ -2,17 +2,15 @@ apiVersion: apps/v1 kind: Deployment metadata: namespace: {{ namespace }} - name: sfive-proxy-{{ worker.name }} + name: sfive-{{ worker.name }} labels: app: sfive - type: proxy worker: {{ worker.name }} spec: replicas: 1 selector: matchLabels: app: sfive - type: proxy worker: {{ worker.name }} strategy: type: Recreate @@ -21,7 +19,6 @@ spec: metadata: labels: app: sfive - type: proxy worker: {{ worker.name }} spec: nodeName: {{ worker.name }} @@ -31,6 +28,7 @@ spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet containers: +{% if worker.flags.sfive == 'proxy' %} - name: proxy image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }} imagePullPolicy: Always @@ -43,6 +41,7 @@ spec: mountPath: /srv - name: proxy-config mountPath: /srv/config +{% endif %} - name: hub image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }} imagePullPolicy: Always @@ -66,7 +65,7 @@ spec: medium: Memory - name: proxy-config configMap: - name: sfive-proxy-{{ worker.name }} + name: sfive-{{ worker.name }} - name: hub-data hostPath: type: DirectoryOrCreate |