Move all files to root
This commit is contained in:
14
src/main/k8s/services/act_runner/service.cljs
Normal file
14
src/main/k8s/services/act_runner/service.cljs
Normal file
@@ -0,0 +1,14 @@
|
||||
(ns k8s.services.act-runner.service)
|
||||
|
||||
|
||||
(def config
|
||||
{:stack [:vault:prepare [:k8s :deployment :service]]
|
||||
:image-port 80
|
||||
:app-namespace "generic"
|
||||
:app-name "act-runner"
|
||||
:k8s:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name
|
||||
:envFrom [{:secretRef {:name '(str app-name "-secrets")}}]
|
||||
:image '(str repo "/" "act_runner" ":latest")
|
||||
}]}}}}
|
||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}
|
||||
})
|
||||
24
src/main/k8s/services/foundryvtt/service.cljs
Normal file
24
src/main/k8s/services/foundryvtt/service.cljs
Normal file
@@ -0,0 +1,24 @@
|
||||
(ns k8s.services.foundryvtt.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault:prepare :harbor:robot-account :docker:image [:k8s :deployment :service :httproute]]
|
||||
:image-port 30000
|
||||
:app-namespace "generic"
|
||||
:app-name "foundry"
|
||||
:docker:image-opts {:is-local true
|
||||
:buildArgs {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
||||
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}
|
||||
:registry {:server '(str registry-base "/" registry-namespace)
|
||||
:username '(-> :harbor:robot-account .-name)
|
||||
:password '(-> :harbor:robot-account .-secret)}
|
||||
:tags ['(str registry-base "/" registry-namespace "/" app-name)]
|
||||
:push true}
|
||||
:k8s:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||
:containers [{:name 'app-name :image '(str registry-base "/" registry-namespace "/" app-name ":latest")}]}}}}
|
||||
:harbor:robot-account-opts {:name 'app-name
|
||||
:permissions [{:kind "project"
|
||||
:namespace 'registry-namespace
|
||||
:access [{:action "pull" :resource "repository"}
|
||||
{:action "push" :resource "repository"}
|
||||
{:action "list" :resource "repository"}]}]}
|
||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
||||
25
src/main/k8s/services/gitea/service.cljs
Normal file
25
src/main/k8s/services/gitea/service.cljs
Normal file
@@ -0,0 +1,25 @@
|
||||
(ns k8s.services.gitea.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault:prepare :k8s:deployment :k8s:service :k8s:httproute]
|
||||
:image-port 3000
|
||||
:app-namespace "generic"
|
||||
:app-name "gitea"
|
||||
:k8s:deployment-opts {:spec {:template {:spec {:initContainers [
|
||||
{:name "init-permissions"
|
||||
:image "busybox:latest"
|
||||
:command ["sh" "-c" "chown -R 1000:1000 /var/lib/gitea && chown -R 1000:1000 /etc/gitea"]
|
||||
:volumeMounts [{:name "gitea-data" :mountPath "/var/lib/gitea"}
|
||||
{:name "gitea-config" :mountPath "/etc/gitea"}]
|
||||
:securityContext {:runAsUser 0 :runAsGroup 0}}
|
||||
]
|
||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest-rootless")
|
||||
:volumeMounts [{:name "gitea-data" :mountPath "/var/lib/gitea"}
|
||||
{:name "gitea-config" :mountPath "/etc/gitea"}
|
||||
{:name "timezone" :mountPath "/etc/timezone" :readOnly true}
|
||||
{:name "localtime" :mountPath "/etc/localtime" :readOnly true}]}]
|
||||
:volumes [{:name "gitea-data" :hostPath {:path "/opt/gitea/data" :type "DirectoryOrCreate"}}
|
||||
{:name "gitea-config" :hostPath {:path "/opt/gitea/config" :type "DirectoryOrCreate"}}
|
||||
{:name "timezone" :hostPath {:path "/etc/timezone" :type "File"}}
|
||||
{:name "localtime" :hostPath {:path "/etc/localtime" :type "File"}}]}}}}
|
||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}})
|
||||
12
src/main/k8s/services/matrix/cinny/service.cljs
Normal file
12
src/main/k8s/services/matrix/cinny/service.cljs
Normal file
@@ -0,0 +1,12 @@
|
||||
(ns k8s.services.matrix.cinny.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "cinny"
|
||||
:image-opts {:build {:args {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
||||
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}}
|
||||
:imageName '(str repo "/" app-name ":latest")}
|
||||
:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest")}]}}}}})
|
||||
13
src/main/k8s/services/matrix/database/service.cljs
Normal file
13
src/main/k8s/services/matrix/database/service.cljs
Normal file
@@ -0,0 +1,13 @@
|
||||
(ns k8s.services.matrix.database.service)
|
||||
;; env_file:
|
||||
;; - .env
|
||||
;; volumes:
|
||||
;; - ${PWD}/db-data/:/var/lib/postgresql/data/
|
||||
|
||||
|
||||
(def config
|
||||
{:stack [:deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "postgres"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" 'app-name ":latest")}]}}}}})
|
||||
14
src/main/k8s/services/matrix/element/service.cljs
Normal file
14
src/main/k8s/services/matrix/element/service.cljs
Normal file
@@ -0,0 +1,14 @@
|
||||
;; volumes:
|
||||
;; - ./personal/matrix/element-config.json:/app/config.json
|
||||
;; environment:
|
||||
;; ELEMENT_WEB_PORT: 3030
|
||||
|
||||
(ns k8s.services.matrix.element.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "element"
|
||||
:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest")}]}}}}})
|
||||
18
src/main/k8s/services/matrix/element_call/service.cljs
Normal file
18
src/main/k8s/services/matrix/element_call/service.cljs
Normal file
@@ -0,0 +1,18 @@
|
||||
(ns k8s.services.matrix.element-call.service)
|
||||
|
||||
;; volumes:
|
||||
;; - ./personal/matrix/elementcall/config.json:/app/config.json
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "element-call"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" app-name ":sha-1702b15")
|
||||
:volumeMounts [{:name "data" :mountPath "/data"}]}]
|
||||
:initContainers [{:name "init-permissions"
|
||||
:image "busybox:latest"
|
||||
:command ["sh" "-c" "chown -R 1000:1000 /data"]
|
||||
:volumeMounts [{:name "data" :mountPath "/data"}]
|
||||
:securityContext {:runAsUser 0 :runAsGroup 0}}]
|
||||
:volumes [{:name "data" :hostPath {:path "/opt/mmr/data" :type "DirectoryOrCreate"}}]}}}}})
|
||||
10
src/main/k8s/services/matrix/home_server/service.cljs
Normal file
10
src/main/k8s/services/matrix/home_server/service.cljs
Normal file
@@ -0,0 +1,10 @@
|
||||
;; homeserver:
|
||||
;; volumes:
|
||||
;; - db:/var/lib/conduwuit
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "tuwunel"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" 'app-name ":latest")}]}}}}})
|
||||
8
src/main/k8s/services/matrix/livekit_jwt/service.cljs
Normal file
8
src/main/k8s/services/matrix/livekit_jwt/service.cljs
Normal file
@@ -0,0 +1,8 @@
|
||||
(ns k8s.services.matrix.livekit-jwt.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "livekit-jwt"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" lk-jwt-service ":0.2.3")}]}}}}})
|
||||
16
src/main/k8s/services/matrix/livekit_server/service.cljs
Normal file
16
src/main/k8s/services/matrix/livekit_server/service.cljs
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
;; livekit:
|
||||
;; command: --config /etc/livekit.yaml
|
||||
;; - ./personal/matrix/elementcall/livekit.yaml:/etc/livekit.yaml
|
||||
;; ports:
|
||||
;; - 50100-50200:50100-50200/udp
|
||||
|
||||
(ns k8s.services.matrix.livekit-server.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "livekit-server"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" 'app-name ":latest")}]}}}}})
|
||||
10
src/main/k8s/services/matrix/mautrix_discord/service.cljs
Normal file
10
src/main/k8s/services/matrix/mautrix_discord/service.cljs
Normal file
@@ -0,0 +1,10 @@
|
||||
;; - ./personal/matrix/discord/data:/data
|
||||
|
||||
(ns k8s.services.matrix.mautrix-discord.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "mautrix-discord"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" "discord" ":4927a73ce7411f3970803d35c22f0c8c96dc2d7e-amd64")}]}}}}})
|
||||
21
src/main/k8s/services/matrix/mmr/service.cljs
Normal file
21
src/main/k8s/services/matrix/mmr/service.cljs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
(ns k8s.services.matrix.mmr.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "matrix-media-repo"
|
||||
:deployment-opts {:spec {:template {:spec {:containers [{:name 'app-name :image '(str repo "/" app-name ":v1.3.8")
|
||||
:volumeMounts [{:name "data" :mountPath "/data"}]}]
|
||||
:initContainers [{:name "init-permissions"
|
||||
:image "busybox:latest"
|
||||
:command ["sh" "-c" "chown -R 1000:1000 /data"]
|
||||
:volumeMounts [{:name "data" :mountPath "/data"}]
|
||||
:securityContext {:runAsUser 0 :runAsGroup 0}}]
|
||||
:volumes [{:name "data" :hostPath {:path "/opt/mmr/data" :type "DirectoryOrCreate"}}]}}}}})
|
||||
|
||||
|
||||
|
||||
;;
|
||||
;; - ./personal/matrix/mmr:/data
|
||||
14
src/main/k8s/services/matrix/turn/service.cljs
Normal file
14
src/main/k8s/services/matrix/turn/service.cljs
Normal file
@@ -0,0 +1,14 @@
|
||||
(ns k8s.services.matrix.turn.service)
|
||||
|
||||
;; - ./personal/matrix/coturn.conf:/etc/coturn/turnserver.conf
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :docker-image :deployment :service :ingress]
|
||||
:image-port 80
|
||||
:app-namespace "matrix"
|
||||
:app-name "coturn"
|
||||
:image-opts {:build {:args {:FOUNDRY_USERNAME 'FOUNDRY_USERNAME
|
||||
:FOUNDRY_PASSWORD 'FOUNDRY_PASSWORD}}
|
||||
:imageName '(str repo "/" app-name ":latest")}
|
||||
:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||
:containers [{:name 'app-name :image '(str repo "/" app-name ":latest")}]}}}}})
|
||||
34
src/main/k8s/services/mesite/service.cljs
Normal file
34
src/main/k8s/services/mesite/service.cljs
Normal file
@@ -0,0 +1,34 @@
|
||||
(ns k8s.services.mesite.service)
|
||||
|
||||
(defn test [env]
|
||||
(js/console.log env)
|
||||
(.apply (:test env) #(js/console.log %)))
|
||||
|
||||
(def config
|
||||
{:stack [:vault:prepare
|
||||
:harbor:robot-account
|
||||
:docker:image
|
||||
[:k8s :namespace :deployment :service :httproute]]
|
||||
:app-name "mesite"
|
||||
:app-namespace "generic"
|
||||
:docker:image-opts {:context {:location "https://codeberg.org/Gigia/mesite.git"}
|
||||
:imageName '(str registry-base "/" registry-namespace "/" app-name ":latest")
|
||||
:registry {:server '(str registry-base "/" registry-namespace)
|
||||
:username '(-> :harbor:robot-account .-name)
|
||||
:password '(-> :harbor:robot-account .-secret)}
|
||||
:tags ['(str registry-base "/" registry-namespace "/" app-name)]
|
||||
:push true}
|
||||
|
||||
:harbor:robot-account-opts {:name 'app-name
|
||||
:permissions [{:kind "project"
|
||||
:namespace 'registry-namespace
|
||||
:access [{:action "pull" :resource "repository"}
|
||||
{:action "push" :resource "repository"}
|
||||
{:action "list" :resource "repository"}]}]}
|
||||
|
||||
:k8s:deployment-opts {:spec {:template {:spec {:imagePullSecrets [{:name "harbor-creds-secrets"}]
|
||||
:containers [{:name 'app-name
|
||||
:image '(str registry-base "/" registry-namespace "/" app-name ":latest")
|
||||
:ports [{:containerPort 80}]}]}}}}
|
||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}
|
||||
})
|
||||
17
src/main/k8s/services/nextcloud/service.cljs
Normal file
17
src/main/k8s/services/nextcloud/service.cljs
Normal file
@@ -0,0 +1,17 @@
|
||||
(ns k8s.services.nextcloud.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :chart :ingress]
|
||||
:app-namespace "nextcloud"
|
||||
:app-name "nextcloud"
|
||||
:image-port 8080
|
||||
:vault-load-yaml true
|
||||
:chart-opts {:fetchOpts {:repo "https://nextcloud.github.io/helm/"}
|
||||
:values {:nextcloud {:host 'host
|
||||
:trustedDomains ['host 'app-name]}}
|
||||
:transformations (fn [args _opts]
|
||||
(let [kind (get-in args [:resource :kind])]
|
||||
(if (some #{kind} ["StatefulSet" "PersistentVolumeClaim" "Ingress"])
|
||||
(update-in args [:resource :metadata :annotations]
|
||||
#(assoc (or % {}) "pulumi.com/skipAwait" "true"))
|
||||
args)))}})
|
||||
10
src/main/k8s/services/productive/service.cljs
Normal file
10
src/main/k8s/services/productive/service.cljs
Normal file
@@ -0,0 +1,10 @@
|
||||
(ns k8s.services.productive.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault:prepare [:k8s :deployment :service :httproute]]
|
||||
:app-namespace "generic"
|
||||
:app-name "superproductivity"
|
||||
:image-port 80
|
||||
:image "docker.io/johannesjo/super-productivity:latest"
|
||||
:k8s:httproute-opts {:spec {::hostnames ['host]}}
|
||||
})
|
||||
26
src/main/k8s/services/prometheus/service.cljs
Normal file
26
src/main/k8s/services/prometheus/service.cljs
Normal file
@@ -0,0 +1,26 @@
|
||||
(ns k8s.services.prometheus.service)
|
||||
|
||||
(def config
|
||||
{:stack [:vault-secrets :chart]
|
||||
:app-namespace "prometheus"
|
||||
:app-name "prometheus"
|
||||
:image-port 8080
|
||||
:vault-load-yaml true
|
||||
:chart-opts {:chart "kube-prometheus-stack"
|
||||
:fetchOpts {:repo "https://prometheus-community.github.io/helm-charts"}
|
||||
:namespace "monitoring"
|
||||
:values {:grafana {:adminPassword 'password
|
||||
:ingress {:enabled true
|
||||
:ingressClassName "caddy"
|
||||
:hosts ['grafana-host]}
|
||||
:persistence {:enabled true
|
||||
:type "pvc"
|
||||
:storageClassName "hcloud-volumes"
|
||||
:accessModes ["ReadWriteOnce"]
|
||||
:size "10Gi"}}
|
||||
:prometheus {:ingress {:enabled true
|
||||
:ingressClassName "caddy"
|
||||
:hosts ['prometheus-host]}
|
||||
:prometheusSpec {:storageSpec {:volumeClaimTemplate {:spec {:accessModes ["ReadWriteOnce"]
|
||||
:storageClassName "hcloud-volumes"
|
||||
:resources {:requests {:storage "50Gi"}}}}}}}}}})
|
||||
25
src/main/k8s/services/renovate/service.cljs
Normal file
25
src/main/k8s/services/renovate/service.cljs
Normal file
@@ -0,0 +1,25 @@
|
||||
(ns k8s.services.renovate.service)
|
||||
|
||||
;https://docs.renovatebot.com/self-hosted-configuration/
|
||||
(def config
|
||||
{:stack [:vault-secrets :chart :cronjob]
|
||||
:app-namespace "renovate"
|
||||
:app-name "renovate"
|
||||
:image-port 8080
|
||||
:vault-load-yaml true
|
||||
:chart-opts
|
||||
{:fetchOpts {:repo "https://docs.renovatebot.com/helm-charts"}
|
||||
:values
|
||||
{:renovate
|
||||
{:config {:platform "github"
|
||||
:token "vault:renovate/github-token"
|
||||
:logLevel "info"
|
||||
:repositories ["your-org/your-repo"]
|
||||
:onboardingConfig {:extends ["config:base"]}}}}
|
||||
:transformations
|
||||
(fn [args _opts]
|
||||
(let [kind (get-in args [:resource :kind])]
|
||||
(if (= kind "CronJob")
|
||||
(update-in args [:resource :spec :jobTemplate :spec :template :metadata :annotations]
|
||||
#(assoc (or % {}) "pulumi.com/skipAwait" "true"))
|
||||
args)))}})
|
||||
Reference in New Issue
Block a user