add moderator election
This commit is contained in:
parent
0fa71e4840
commit
c2eb0e96ba
5 changed files with 19 additions and 23 deletions
src
main
cljc/dda/c4k_jitsi
resources/jitsi
test/cljc/dda/c4k_jitsi
|
@ -42,6 +42,7 @@
|
|||
(jitsi/jibri-config resolved-config)
|
||||
(jitsi/etherpad-config resolved-config)
|
||||
(jitsi/excalidraw-config resolved-config)
|
||||
(jitsi/moderator-elector-config resolved-config)
|
||||
(ing/generate-ingress-and-cert (merge
|
||||
{:service-name "jitsi-meet-web"
|
||||
:service-port 80
|
||||
|
|
|
@ -129,16 +129,8 @@
|
|||
[(load-and-adjust-namespace "jitsi/excalidraw-config-service.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/excalidraw-config-deployment.yaml" namespace)]))
|
||||
|
||||
(defn-spec generate-modelector-service cp/map-or-seq?
|
||||
(defn-spec moderator-elector-config cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [namespace]} config]
|
||||
(->
|
||||
(yaml/load-as-edn "jitsi/modelector-service.yaml")
|
||||
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||
|
||||
(defn-spec generate-modelector-deployment cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn namespace]} config]
|
||||
(->
|
||||
(yaml/load-as-edn "jitsi/modelector-deployment.yaml")
|
||||
(cm/replace-all-matching "NAMESPACE" namespace))))
|
||||
[(load-and-adjust-namespace "jitsi/modelector-config-service.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/modelector-config-deployment.yaml" namespace)]))
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: modelector
|
||||
name: modelector
|
||||
name: moderator-elector
|
||||
namespace: NAMESPACE
|
||||
labels:
|
||||
app.kubernetes.io/name: moderator-elector
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: modelector
|
||||
app.kubernetes.io/name: moderator-elector
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: modelector
|
||||
app.kubernetes.io/name: moderator-elector
|
||||
spec:
|
||||
containers:
|
||||
- name: modelector
|
||||
- name: moderator-elector
|
||||
image: domaindrivenarchitecture/moderator-election-vaadin_fullstack
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
|
@ -1,14 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: modelector
|
||||
name: modelector
|
||||
name: moderator-elector
|
||||
namespace: NAMESPACE
|
||||
labels:
|
||||
app.kubernetes.io/name: moderator-elector
|
||||
spec:
|
||||
ports:
|
||||
- name: "http"
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: modelector
|
||||
app.kubernetes.io/name: moderator-elector
|
|
@ -105,3 +105,8 @@
|
|||
{:fqdn "xy.xy.xy"
|
||||
:namespace "jitsi"})))))
|
||||
|
||||
(deftest should-generate-moderator-elector
|
||||
(is (= 2
|
||||
(count (cut/moderator-elector-config
|
||||
{:fqdn "xy.xy.xy"
|
||||
:namespace "jitsi"})))))
|
||||
|
|
Loading…
Add table
Reference in a new issue