forked from hswaw/hscloud
app/radio: add support for following relays
Change-Id: Ib079d657239b1bf5294ad8457370d56a0093dd6d
This commit is contained in:
parent
db2a2a029f
commit
2d81427410
1 changed files with 17 additions and 2 deletions
|
@ -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",
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue