Define MMR
This commit is contained in:
@@ -2,20 +2,48 @@
|
|||||||
(ns k8s.services.matrix.mmr.service)
|
(ns k8s.services.matrix.mmr.service)
|
||||||
|
|
||||||
(def config
|
(def config
|
||||||
{:stack [:vault-secrets :deployment :service :ingress]
|
{:stack [:vault:prepare [:k8s :config-map :deployment :service :httproute]]
|
||||||
:image-port 80
|
:image-port 80
|
||||||
:app-namespace "matrix"
|
:app-namespace "matrix"
|
||||||
:app-name "matrix-media-repo"
|
:app-name "matrix-media-repo"
|
||||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" app-name ":v1.3.8")
|
:k8s:config-map-opts
|
||||||
:volumeMounts [{:name "data" :mountPath "/data"}]}]
|
{:metadata {:name "mmr-config"}
|
||||||
:initContainers [{:name "init-permissions"
|
:data {"media-repo.yaml"
|
||||||
:image "busybox:latest"
|
'(stringify
|
||||||
:command ["sh" "-c" "chown -R 1000:1000 /data"]
|
{:repo {:port port
|
||||||
:volumeMounts [{:name "data" :mountPath "/data"}]
|
:bindAddress "0.0.0.0"
|
||||||
:securityContext {:runAsUser 0 :runAsGroup 0}}]
|
:logLevel "debug"}
|
||||||
:volumes [{:name "data" :hostPath {:path "/opt/mmr/data" :type "DirectoryOrCreate"}}]}}}}})
|
:database {:postgres db-login-url}
|
||||||
|
:homeservers [{:name homeserver
|
||||||
|
:csApi (str "https://" homeserver)}]
|
||||||
|
:accessTokens {:appservices [{:id "discord"
|
||||||
|
:asToken discord-app-service-token
|
||||||
|
:senderUserId discord-send-user-id
|
||||||
|
:userNamespaces {:regex user-namespace-regex}}]}
|
||||||
|
:admins [admin]
|
||||||
|
:datastores [{:type "s3"
|
||||||
|
:id s3-id
|
||||||
|
:forKinds ["all"]
|
||||||
|
:opts {:tempPath "/tmp/media-repo"
|
||||||
|
:endpoint s3-endpoint
|
||||||
|
:accessKeyId s3-access-key
|
||||||
|
:accessSecret s3-secret-key
|
||||||
|
:ssl true
|
||||||
|
:bucketName s3-bucket-name
|
||||||
|
:region s3-region}}]
|
||||||
|
:rateLimit {:enabled false}})}}
|
||||||
|
:k8s:deployment-opts {:spec {:template {:spec {:containers [{:args ["-config" "/etc/media-repo.yaml"]
|
||||||
|
:name 'app-name
|
||||||
|
:image '(str repo "/" app-name ":v1.3.8")
|
||||||
|
:volumeMounts [{:name "config-vol"
|
||||||
|
:mountPath "/mmr"
|
||||||
|
:subPath "media-repo.yaml"}
|
||||||
|
{:name "temp-vol"
|
||||||
|
:mountPath "/tmp/media-repo"}]}]
|
||||||
|
:volumes [{:name "config-vol" :configMap {:name "mmr-config"}}
|
||||||
|
{:name "temp-vol"
|
||||||
|
:emptyDir {}}]}}}}
|
||||||
|
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; - ./personal/matrix/mmr:/data
|
|
||||||
Reference in New Issue
Block a user