diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-02-27 01:13:19 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-02-27 01:13:19 +0100 |
commit | 9ef024170940418a2cba7c9a6675525cbba6f3cc (patch) | |
tree | 6a58fc13e052129098f7c6f94d6dcfb1435a2629 /src/flufigut.py | |
parent | move secret handling outside of flufigut for now (diff) |
added config for stream site
Diffstat (limited to 'src/flufigut.py')
-rwxr-xr-x | src/flufigut.py | 8 |
1 files changed, 8 insertions, 0 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}) |