Filter null from application yaml

This commit is contained in:
Clemens Geibel 2022-08-05 11:37:43 +02:00
parent c74c22e33d
commit e733cbe016

View file

@ -9,21 +9,22 @@
(let [storage-class (if (contains? config :postgres-data-volume-path) :manual :local-path)]
(cm/concat-vec
(map yaml/to-string
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
(postgres/generate-secret config)
(when (contains? config :postgres-data-volume-path)
(postgres/generate-persistent-volume (select-keys config [:postgres-data-volume-path :pv-storage-size-gb])))
(postgres/generate-pvc {:pv-storage-size-gb 5
:pvc-storage-class-name storage-class})
(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-root-volume config)
(gitea/generate-data-volume config)
(gitea/generate-appini-env config)
(gitea/generate-secrets config)
(gitea/generate-ingress config)
(gitea/generate-certificate config)]))))
(filter #(not (nil? %))
[(postgres/generate-config {:postgres-size :2gb :db-name "gitea"})
(postgres/generate-secret config)
(when (contains? config :postgres-data-volume-path)
(postgres/generate-persistent-volume (select-keys config [:postgres-data-volume-path :pv-storage-size-gb])))
(postgres/generate-pvc {:pv-storage-size-gb 5
:pvc-storage-class-name storage-class})
(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-root-volume config)
(gitea/generate-data-volume config)
(gitea/generate-appini-env config)
(gitea/generate-secrets config)
(gitea/generate-ingress config)
(gitea/generate-certificate config)])))))