summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-02-27 01:13:19 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-02-27 01:13:19 +0100
commit9ef024170940418a2cba7c9a6675525cbba6f3cc (patch)
tree6a58fc13e052129098f7c6f94d6dcfb1435a2629
parentmove secret handling outside of flufigut for now (diff)
added config for stream site
-rwxr-xr-xsrc/flufigut.py8
-rwxr-xr-xsrc/update.sh7
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