fqdn & https redirect

This commit is contained in:
jerger 2022-04-08 17:48:01 +02:00
parent 67d762cbb6
commit 129ca88dfb
4 changed files with 15 additions and 7 deletions

View file

@ -20,7 +20,7 @@
(jitsi/generate-secret config) (jitsi/generate-secret config)
(jitsi/generate-jvb-service) (jitsi/generate-jvb-service)
(jitsi/generate-web-service) (jitsi/generate-web-service)
(jitsi/generate-deployment)])) (jitsi/generate-deployment config)]))
(defn-spec generate any? (defn-spec generate any?
[my-config config? [my-config config?

View file

@ -20,9 +20,13 @@
"jitsi/jvb-service.yaml" (rc/inline "jitsi/jvb-service.yaml") "jitsi/jvb-service.yaml" (rc/inline "jitsi/jvb-service.yaml")
"jitsi/secret.yaml" (rc/inline "jitsi/secret.yaml") "jitsi/secret.yaml" (rc/inline "jitsi/secret.yaml")
"jitsi/web-service.yaml" (rc/inline "jitsi/web-service.yaml") "jitsi/web-service.yaml" (rc/inline "jitsi/web-service.yaml")
;; TODO - dat gibt es nicht, oder?
"jitsi/pod-security-policy.yaml" (rc/inline "jitsi/pod-security-policy.yaml") "jitsi/pod-security-policy.yaml" (rc/inline "jitsi/pod-security-policy.yaml")
;; TODO - dat gibt es nicht, oder?
"jitsi/role-binding.yaml" (rc/inline "jitsi/role-binding.yaml") "jitsi/role-binding.yaml" (rc/inline "jitsi/role-binding.yaml")
;; TODO - dat gibt es nicht, oder?
"jitsi/role.yaml" (rc/inline "jitsi/role.yaml") "jitsi/role.yaml" (rc/inline "jitsi/role.yaml")
;; TODO - dat gibt es nicht, oder?
"jitsi/service-account.yaml" (rc/inline "jitsi/service-account.yaml") "jitsi/service-account.yaml" (rc/inline "jitsi/service-account.yaml")
(throw (js/Error. "Undefined Resource!"))))) (throw (js/Error. "Undefined Resource!")))))
@ -35,7 +39,7 @@
(yaml/from-string (yaml/load-resource "jitsi/ingress.yaml")) (yaml/from-string (yaml/load-resource "jitsi/ingress.yaml"))
(assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer) (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer)
(assoc-in [:metadata :annotations :kubernetes.io/ingress.class] ingress-kind) (assoc-in [:metadata :annotations :kubernetes.io/ingress.class] ingress-kind)
(cm/replace-all-matching-values-by-new-value "fqdn" fqdn)))) (cm/replace-all-matching-values-by-new-value "FQDN" fqdn))))
(defn generate-secret [config] (defn generate-secret [config]
(let [{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} config] (let [{:keys [jvb-auth-password jicofo-auth-password jicofo-component-secret]} config]
@ -51,5 +55,8 @@
(defn generate-web-service [] (defn generate-web-service []
(yaml/from-string (yaml/load-resource "jitsi/web-service.yaml"))) (yaml/from-string (yaml/load-resource "jitsi/web-service.yaml")))
(defn generate-deployment [] (defn generate-deployment [config]
(yaml/from-string (yaml/load-resource "jitsi/deployment.yaml"))) (let [{:keys [fqdn]} config]
(->
(yaml/from-string (yaml/load-resource "jitsi/deployment.yaml"))
(cm/replace-all-matching-values-by-new-value "FQDN" fqdn))))

View file

@ -51,7 +51,7 @@ spec:
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env: env:
- name: PUBLIC_URL - name: PUBLIC_URL
value: "https://jitsi.test.meissa-gmbh.de" value: FQDN
- name: XMPP_DOMAIN - name: XMPP_DOMAIN
value: meet.jitsi value: meet.jitsi
- name: XMPP_AUTH_DOMAIN - name: XMPP_AUTH_DOMAIN
@ -88,7 +88,7 @@ spec:
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
env: env:
- name: PUBLIC_URL - name: PUBLIC_URL
value: "https://jitsi.test.meissa-gmbh.de" value: FQDN
- name: XMPP_SERVER - name: XMPP_SERVER
value: localhost value: localhost
- name: JICOFO_AUTH_USER - name: JICOFO_AUTH_USER

View file

@ -4,13 +4,14 @@ metadata:
name: jitsi name: jitsi
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-staging-issuer cert-manager.io/cluster-issuer: letsencrypt-staging-issuer
ingress.kubernetes.io/ssl-redirect: "true"
spec: spec:
tls: tls:
- hosts: - hosts:
- fqdn - fqdn
secretName: tls-jitsi secretName: tls-jitsi
rules: rules:
- host: fqdn - host: FQDN
http: http:
paths: paths:
- path: / - path: /