add namespace to jvb-service
This commit is contained in:
parent
0f5821f692
commit
0e47be31c6
3 changed files with 28 additions and 2 deletions
|
@ -76,8 +76,12 @@
|
||||||
(cm/replace-key-value :JICOFO_AUTH_PASSWORD (b64/encode jicofo-auth-password))
|
(cm/replace-key-value :JICOFO_AUTH_PASSWORD (b64/encode jicofo-auth-password))
|
||||||
(cm/replace-key-value :JICOFO_COMPONENT_SECRET (b64/encode jicofo-component-secret)))))
|
(cm/replace-key-value :JICOFO_COMPONENT_SECRET (b64/encode jicofo-component-secret)))))
|
||||||
|
|
||||||
(defn-spec generate-jvb-service cp/map-or-seq? []
|
(defn-spec generate-jvb-service cp/map-or-seq?
|
||||||
(yaml/from-string (yaml/load-resource "jitsi/jvb-service.yaml")))
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
(->
|
||||||
|
(yaml/from-string (yaml/load-resource "jitsi/jvb-service.yaml"))
|
||||||
|
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||||
|
|
||||||
(defn-spec generate-web-service cp/map-or-seq? []
|
(defn-spec generate-web-service cp/map-or-seq? []
|
||||||
(yaml/load-as-edn "jitsi/web-service.yaml"))
|
(yaml/load-as-edn "jitsi/web-service.yaml"))
|
||||||
|
|
|
@ -7,6 +7,7 @@ metadata:
|
||||||
metallb.universe.tf/allow-shared-ip: "shared-ip-service-group"
|
metallb.universe.tf/allow-shared-ip: "shared-ip-service-group"
|
||||||
metallb.universe.tf/address-pool: public
|
metallb.universe.tf/address-pool: public
|
||||||
name: jvb-udp
|
name: jvb-udp
|
||||||
|
namespace: NAMESPACE
|
||||||
spec:
|
spec:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
(st/instrument `cut/generate-deployment)
|
(st/instrument `cut/generate-deployment)
|
||||||
(st/instrument `cut/generate-secret-jitsi)
|
(st/instrument `cut/generate-secret-jitsi)
|
||||||
|
(st/instrument `cut/generate-ingress-web)
|
||||||
|
(st/instrument `cut/generate-jvb-service)
|
||||||
|
|
||||||
(deftest should-generate-deployment
|
(deftest should-generate-deployment
|
||||||
(is (= {:apiVersion "apps/v1",
|
(is (= {:apiVersion "apps/v1",
|
||||||
|
@ -147,3 +149,22 @@
|
||||||
(cut/generate-ingress-web
|
(cut/generate-ingress-web
|
||||||
{:fqdn "xy.xy.xy"
|
{:fqdn "xy.xy.xy"
|
||||||
:namespace "jitsi"}))))
|
:namespace "jitsi"}))))
|
||||||
|
|
||||||
|
(deftest should-generate-jvb-service
|
||||||
|
(is (= {:apiVersion "v1",
|
||||||
|
:kind "Service",
|
||||||
|
:metadata
|
||||||
|
{:labels {:service "jvb"},
|
||||||
|
:annotations
|
||||||
|
#:metallb.universe.tf{:allow-shared-ip "shared-ip-service-group",
|
||||||
|
:address-pool "public"},
|
||||||
|
:name "jvb-udp"
|
||||||
|
:namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:type "LoadBalancer",
|
||||||
|
:ports
|
||||||
|
[{:port 30300, :protocol "UDP", :targetPort 30300, :nodePort 30300}],
|
||||||
|
:selector {:app "jitsi"}}}
|
||||||
|
(cut/generate-jvb-service
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"}))))
|
||||||
|
|
Loading…
Reference in a new issue