[skip ci] bring service for meapp-fullstack back

This commit is contained in:
Mirco 2024-09-05 16:40:28 +02:00
parent 194b260b8a
commit 9b701648c5
4 changed files with 36 additions and 0 deletions

View file

@ -35,6 +35,7 @@
(jitsi/generate-web-service config) (jitsi/generate-web-service config)
(jitsi/generate-etherpad-service config) (jitsi/generate-etherpad-service config)
(jitsi/generate-excalidraw-backend-service config) (jitsi/generate-excalidraw-backend-service config)
(jitsi/generate-meapp-fullstack-service config)
(jitsi/generate-deployment config) (jitsi/generate-deployment config)
(jitsi/generate-excalidraw-deployment config) (jitsi/generate-excalidraw-deployment config)
(jitsi/generate-meapp-deployment config)] (jitsi/generate-meapp-deployment config)]

View file

@ -104,6 +104,13 @@
(yaml/load-as-edn "jitsi/excalidraw-backend-service.yaml") (yaml/load-as-edn "jitsi/excalidraw-backend-service.yaml")
(cm/replace-all-matching "NAMESPACE" namespace)))) (cm/replace-all-matching "NAMESPACE" namespace))))
(defn-spec generate-meapp-fullstack-service cp/map-or-seq?
[config config?]
(let [{:keys [namespace]} config]
(->
(yaml/load-as-edn "jitsi/meapp-fullstack-service.yaml")
(cm/replace-all-matching "NAMESPACE" namespace))))
(defn-spec generate-deployment cp/map-or-seq? (defn-spec generate-deployment cp/map-or-seq?
[config config?] [config config?]
(let [{:keys [fqdn namespace]} config] (let [{:keys [fqdn namespace]} config]

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
service: meapp-fullstack
name: meapp-fullstack
namespace: NAMESPACE
spec:
ports:
- name: "http"
port: 80
targetPort: 8080
selector:
app: meapp-fullstack

View file

@ -208,6 +208,20 @@
{:fqdn "xy.xy.xy" {:fqdn "xy.xy.xy"
:namespace "jitsi"})))) :namespace "jitsi"}))))
(deftest should-generate-meapp-fullstack-service
(is (= {:apiVersion "v1",
:kind "Service",
:metadata
{:labels {:service "excalidraw-backend"},
:name "excalidraw-backend",
:namespace "jitsi"},
:spec
{:ports [{:name "excalidraw-backend", :port 3002, :targetPort 80}],
:selector {:app "excalidraw-backend"}}}
(cut/generate-excalidraw-backend-service
{:fqdn "xy.xy.xy"
:namespace "jitsi"}))))
(deftest should-generate-excalidraw-deployment (deftest should-generate-excalidraw-deployment
(is (= {:apiVersion "v1", (is (= {:apiVersion "v1",
:kind "Service", :kind "Service",