diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/flufigut.py | 8 | ||||
-rwxr-xr-x | src/update.sh | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/flufigut.py b/src/flufigut.py index 5af4285..1ff1d13 100755 --- a/src/flufigut.py +++ b/src/flufigut.py @@ -798,6 +798,14 @@ class K8sDeployment: def _deploy_stream_website(self, template_dir, tmpl_env, v1, appsV1, extV1beta1, stream_name, stream): cm = self.__generate_object(tmpl_env, 'stream-site-cm.yml', {'stream': stream_name}) + hostname = stream['hostname'] + if 'lb-hostname' in stream: + hostname = stream['lb-hostname'] + site_config = {'resolutions': self._desc.globals['resolutions'], 'profiles': self._desc.globals['profiles'], + 'muxes': {}, 'streamBaseUrl': 'https://%s:%i' % (hostname, stream['port'])} + for mux in stream['muxes']: + site_config['muxes'][mux] = self._desc.muxes[mux] + cm['data']['config.js'] = "var config = %s;\n" % (json.dumps(site_config)) v1.create_namespaced_config_map(self._namespace, cm) svc = self.__generate_object(tmpl_env, 'stream-site-svc.yml', {'stream': stream_name}) diff --git a/src/update.sh b/src/update.sh index 615758c..4d7296c 100755 --- a/src/update.sh +++ b/src/update.sh @@ -1,10 +1,11 @@ #!/bin/bash +set -e ./flufigut.py examples/elevate2018.yml -kubectl create -f secrets/stream-site-public-tls.yml -kubectl create -f secrets/stream-site-local-tls.yml -kubectl create -f secrets/onionbalance.yml +kubectl create -f "secrets/stream-site-public-tls.yml" +kubectl create -f "secrets/stream-site-local-tls.yml" +kubectl create -f "secrets/onionbalance.yml" exit 0 |