1
0
Fork 0

Merge "app/radio: add support for following relays"

master
q3k 2019-09-25 12:06:17 +00:00 committed by Gerrit Code Review
commit 6781f62ec4
1 changed files with 17 additions and 2 deletions

View File

@ -31,7 +31,8 @@ local kube = import "../../../kube/kube.libsonnet";
},
hostname: "localhost",
listenPort: 8080,
mounts: [],
mounts: {},
relays: {},
},
tag: "latest",
@ -123,7 +124,20 @@ local kube = import "../../../kube/kube.libsonnet";
["fallback-override", "1"],
] else [])
for m in std.objectFields(cfg.icecast.mounts)
]),
] + [
["relay",
["server", cfg.icecast.relays[r].server],
["port", std.toString(cfg.icecast.relays[r].port)],
["mount", cfg.icecast.relays[r].mount],
["local-mount", r],
["on-demand", "0"],
] + (if cfg.icecast.relays[r].username != null then [
["username", cfg.icecast.relays[r].username]
] else []) + (if cfg.icecast.relays[r].password != null then [
["password", cfg.icecast.relays[r].password],
] else [])
for r in std.objectFields(cfg.icecast.relays)
]),
},
},
@ -158,6 +172,7 @@ local kube = import "../../../kube/kube.libsonnet";
spec+: {
ports: [
{ name: "client", port: cfg.port, targetPort: cfg.icecast.listenPort, protocol: "TCP" },
{ name: "client80", port: 80, targetPort: cfg.icecast.listenPort, protocol: "TCP" },
],
type: "LoadBalancer",
},