diff --git a/src/main/cljc/dda/c4k_gitea/core.cljc b/src/main/cljc/dda/c4k_gitea/core.cljc index 611e5f9..66d0022 100644 --- a/src/main/cljc/dda/c4k_gitea/core.cljc +++ b/src/main/cljc/dda/c4k_gitea/core.cljc @@ -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)])))))