add web
This commit is contained in:
parent
360b4d1357
commit
1009092b9f
9 changed files with 215 additions and 3 deletions
src
main
cljc/dda/c4k_jitsi
resources/jitsi
test/cljc/dda/c4k_jitsi
|
@ -34,8 +34,9 @@
|
|||
(cm/concat-vec
|
||||
(ns/generate resolved-config)
|
||||
(jitsi/prosody-config resolved-config)
|
||||
(jitsi/jicofo-config resolved-config)
|
||||
(jitsi/jitsi-config resolved-config)
|
||||
(jitsi/jicofo-config resolved-config)
|
||||
(jitsi/web-config resolved-config)
|
||||
(jitsi/jibri-config resolved-config)
|
||||
;; [(jitsi/generate-jvb-service config)
|
||||
;; (jitsi/generate-web-service config)
|
||||
|
|
|
@ -174,6 +174,11 @@
|
|||
(load-and-adjust-namespace "jitsi/prosody-auth-jvb-secret.yaml" namespace)
|
||||
(cm/replace-key-value :JVB_AUTH_PASSWORD (b64/encode jvb-auth-password)))]))
|
||||
|
||||
(defn-spec jitsi-config cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn namespace]} config]
|
||||
[(load-and-adjust-namespace "jitsi/jitsi-config-serviceaccount.yaml" namespace)]))
|
||||
|
||||
(defn-spec jicofo-config cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [namespace]} config]
|
||||
|
@ -184,10 +189,17 @@
|
|||
(load-and-adjust-namespace "jitsi/jicofo-config-init-cm.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/jicofo-config-deployment.yaml" namespace)]))
|
||||
|
||||
(defn-spec jitsi-config cp/map-or-seq?
|
||||
(defn-spec web-config cp/map-or-seq?
|
||||
[config config?]
|
||||
(let [{:keys [fqdn namespace]} config]
|
||||
[(load-and-adjust-namespace "jitsi/jitsi-config-serviceaccount.yaml" namespace)]))
|
||||
[(load-and-adjust-namespace "jitsi/web-config-conffiles-cm.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/web-config-init-cm.yaml" namespace)
|
||||
(->
|
||||
(load-and-adjust-namespace "jitsi/web-config-envs-cm.yaml" namespace)
|
||||
(cm/replace-key-value :XMPP_BOSH_URL_BASE (str "http://prosody." namespace ".svc.cluster.local:5280")))
|
||||
(load-and-adjust-namespace "jitsi/web-config-service.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/web-config-deployment.yaml" namespace)
|
||||
(load-and-adjust-namespace "jitsi/web-config-test-deployment.yaml" namespace)]))
|
||||
|
||||
(defn-spec jibri-config cp/map-or-seq?
|
||||
[config config?]
|
||||
|
|
38
src/main/resources/jitsi/web-config-conffiles-cm.yaml
Normal file
38
src/main/resources/jitsi/web-config-conffiles-cm.yaml
Normal file
|
@ -0,0 +1,38 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: jitsi-meet-web-conffiles
|
||||
namespace: NAMESPACE
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
data:
|
||||
custom-config.js: |
|
||||
# Not providing /config/custom-config.js
|
||||
|
||||
custom-interface_config.js: |
|
||||
# Not providing /config/custom-interface_config.js
|
||||
|
||||
default: |
|
||||
# Using web /defaults/default from container image
|
||||
|
||||
ffdhe2048.txt: |
|
||||
# Using web /defaults/ffdhe2048.txt from container image
|
||||
|
||||
interface_config.js: |
|
||||
# Using web /defaults/interface_config.js from container image
|
||||
|
||||
meet.conf: |
|
||||
# Using web /defaults/meet.conf from container image
|
||||
|
||||
nginx.conf: |
|
||||
# Using web /defaults/nginx.conf from container image
|
||||
|
||||
settings-config.js: |
|
||||
# Using web /defaults/settings-config.js from container image
|
||||
|
||||
ssl.conf: |
|
||||
# Using web /defaults/ssl.conf from container image
|
||||
|
||||
system-config.js: |
|
||||
# Using web /defaults/system-config.js from container image
|
88
src/main/resources/jitsi/web-config-deployment.yaml
Normal file
88
src/main/resources/jitsi/web-config-deployment.yaml
Normal file
|
@ -0,0 +1,88 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: NAMESPACE
|
||||
name: jitsi-meet-web
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
serviceAccountName: jitsi-meet
|
||||
securityContext:
|
||||
{}
|
||||
containers:
|
||||
- name: jitsi-meet
|
||||
securityContext:
|
||||
{}
|
||||
image: "jitsi/web:stable-9646"
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: jitsi-meet-web
|
||||
- configMapRef:
|
||||
name: prosody-common
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
- name: https
|
||||
containerPort: 443
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
resources:
|
||||
{}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
- name: custom-init
|
||||
configMap:
|
||||
defaultMode: 493
|
||||
name: jitsi-meet-web-init
|
||||
items:
|
||||
- key: 10-config
|
||||
path: 10-config
|
||||
- name: custom-conffiles
|
||||
configMap:
|
||||
name: jitsi-meet-web-conffiles
|
||||
items:
|
||||
- key: custom-config.js
|
||||
path: custom-config.js
|
||||
- key: custom-interface_config.js
|
||||
path: custom-interface_config.js
|
||||
- key: default
|
||||
path: default
|
||||
- key: ffdhe2048.txt
|
||||
path: ffdhe2048.txt
|
||||
- key: interface_config.js
|
||||
path: interface_config.js
|
||||
- key: meet.conf
|
||||
path: meet.conf
|
||||
- key: nginx.conf
|
||||
path: nginx.conf
|
||||
- key: settings-config.js
|
||||
path: settings-config.js
|
||||
- key: ssl.conf
|
||||
path: ssl.conf
|
||||
- key: system-config.js
|
||||
path: system-config.js
|
13
src/main/resources/jitsi/web-config-envs-cm.yaml
Normal file
13
src/main/resources/jitsi/web-config-envs-cm.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: NAMESPACE
|
||||
name: jitsi-meet-web
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
data:
|
||||
DISABLE_HTTPS: "1"
|
||||
ENABLE_HTTP_REDIRECT: "0"
|
||||
JICOFO_AUTH_USER: focus
|
||||
XMPP_BOSH_URL_BASE: 'http://prosody.NAMESPACE.svc.cluster.local:5280'
|
11
src/main/resources/jitsi/web-config-init-cm.yaml
Normal file
11
src/main/resources/jitsi/web-config-init-cm.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
namespace: NAMESPACE
|
||||
name: jitsi-meet-web-init
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
data:
|
||||
10-config: |
|
||||
# Using web /etc/cont-init.d/10-config from container image
|
17
src/main/resources/jitsi/web-config-service.yaml
Normal file
17
src/main/resources/jitsi/web-config-service.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: NAMESPACE
|
||||
name: jitsi-meet-web
|
||||
labels:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app.kubernetes.io/name: jitsi-meet
|
||||
app.kubernetes.io/component: web
|
25
src/main/resources/jitsi/web-config-test-deployment.yaml
Normal file
25
src/main/resources/jitsi/web-config-test-deployment.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "prosody-test-connection"
|
||||
namespace: NAMESPACE
|
||||
labels:
|
||||
app.kubernetes.io/name: "prosody-test-connection"
|
||||
app.kubernetes.io/component: prosody
|
||||
spec:
|
||||
replicas: 0
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: "prosody-test-connection"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: "prosody-test-connection"
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['prosody:5280/http-bind']
|
|
@ -155,3 +155,10 @@
|
|||
(count (cut/jibri-config
|
||||
{:fqdn "xy.xy.xy"
|
||||
:namespace "jitsi"})))))
|
||||
|
||||
(deftest should-generate-web
|
||||
(is (= 6
|
||||
(count (cut/web-config
|
||||
{:fqdn "xy.xy.xy"
|
||||
:namespace "jitsi"})))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue