Fixed concat-vec error
This commit is contained in:
parent
20e809fdbe
commit
5af737505b
4 changed files with 34 additions and 18 deletions
|
@ -8,10 +8,6 @@
|
||||||
(defn k8s-objects [config]
|
(defn k8s-objects [config]
|
||||||
(let [storage-class (if (contains? config :postgres-data-volume-path) :manual :local-path)]
|
(let [storage-class (if (contains? config :postgres-data-volume-path) :manual :local-path)]
|
||||||
(cm/concat-vec
|
(cm/concat-vec
|
||||||
(yaml/load-resource "gitea/deployment.yaml")
|
|
||||||
(yaml/load-resource "gitea/services.yaml")
|
|
||||||
(yaml/load-resource "gitea/traefik-middleware.yaml")
|
|
||||||
|
|
||||||
(map yaml/to-string
|
(map yaml/to-string
|
||||||
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
|
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
|
||||||
(postgres/generate-secret config)
|
(postgres/generate-secret config)
|
||||||
|
@ -22,6 +18,10 @@
|
||||||
(postgres/generate-deployment {:postgres-image "postgres:14"
|
(postgres/generate-deployment {:postgres-image "postgres:14"
|
||||||
:postgres-size :2gb})
|
:postgres-size :2gb})
|
||||||
(postgres/generate-service)
|
(postgres/generate-service)
|
||||||
|
(gitea/generate-deployment)
|
||||||
|
(gitea/generate-service)
|
||||||
|
(gitea/generate-service-ssh)
|
||||||
|
(gitea/generate-traefik-middleware)
|
||||||
(gitea/generate-root-volume config)
|
(gitea/generate-root-volume config)
|
||||||
(gitea/generate-data-volume config)
|
(gitea/generate-data-volume config)
|
||||||
(gitea/generate-appini-env config)
|
(gitea/generate-appini-env config)
|
||||||
|
|
|
@ -138,3 +138,19 @@
|
||||||
(->
|
(->
|
||||||
(yaml/load-as-edn "gitea/datavolume.yaml")
|
(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
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
|
||||||
name: gitea-service
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: gitea
|
|
||||||
ports:
|
|
||||||
- name: gitea-http
|
|
||||||
port: 3000
|
|
||||||
---
|
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea-ssh-service
|
name: gitea-ssh-service
|
||||||
namespace: default
|
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