Fixed concat-vec error
This commit is contained in:
parent
20e809fdbe
commit
5af737505b
4 changed files with 34 additions and 18 deletions
|
@ -7,11 +7,7 @@
|
|||
|
||||
(defn k8s-objects [config]
|
||||
(let [storage-class (if (contains? config :postgres-data-volume-path) :manual :local-path)]
|
||||
(cm/concat-vec
|
||||
(yaml/load-resource "gitea/deployment.yaml")
|
||||
(yaml/load-resource "gitea/services.yaml")
|
||||
(yaml/load-resource "gitea/traefik-middleware.yaml")
|
||||
|
||||
(cm/concat-vec
|
||||
(map yaml/to-string
|
||||
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
|
||||
(postgres/generate-secret config)
|
||||
|
@ -22,6 +18,10 @@
|
|||
(postgres/generate-deployment {:postgres-image "postgres:14"
|
||||
:postgres-size :2gb})
|
||||
(postgres/generate-service)
|
||||
(gitea/generate-deployment)
|
||||
(gitea/generate-service)
|
||||
(gitea/generate-service-ssh)
|
||||
(gitea/generate-traefik-middleware)
|
||||
(gitea/generate-root-volume config)
|
||||
(gitea/generate-data-volume config)
|
||||
(gitea/generate-appini-env config)
|
||||
|
|
|
@ -137,4 +137,20 @@
|
|||
data-storage-size (data-storage-by-volume-size volume-total-storage-size root-storage-size)]
|
||||
(->
|
||||
(yaml/load-as-edn "gitea/datavolume.yaml")
|
||||
(cm/replace-all-matching-values-by-new-value "DATASTORAGESIZE" (str (str data-storage-size) "Gi")))))
|
||||
(cm/replace-all-matching-values-by-new-value "DATASTORAGESIZE" (str (str data-storage-size) "Gi")))))
|
||||
|
||||
(defn-spec generate-deployment pred/map-or-seq?
|
||||
[]
|
||||
(yaml/load-as-edn "gitea/deployment.yaml"))
|
||||
|
||||
(defn-spec generate-service pred/map-or-seq?
|
||||
[]
|
||||
(yaml/load-as-edn "gitea/service.yaml"))
|
||||
|
||||
(defn-spec generate-service-ssh pred/map-or-seq?
|
||||
[]
|
||||
(yaml/load-as-edn "gitea/service-ssh.yaml"))
|
||||
|
||||
(defn-spec generate-traefik-middleware pred/map-or-seq?
|
||||
[]
|
||||
(yaml/load-as-edn "gitea/traefik-middleware.yaml"))
|
|
@ -1,17 +1,5 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: gitea-service
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
app: gitea
|
||||
ports:
|
||||
- name: gitea-http
|
||||
port: 3000
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: gitea-ssh-service
|
||||
namespace: default
|
12
src/main/resources/gitea/service.yaml
Normal file
12
src/main/resources/gitea/service.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: gitea-service
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
app: gitea
|
||||
ports:
|
||||
- name: gitea-http
|
||||
port: 3000
|
||||
|
Loading…
Reference in a new issue