Working Base Config for Taiga #1
2 changed files with 114 additions and 2 deletions
|
@ -28,7 +28,28 @@
|
|||
(postgres/generate-pvc {:pv-storage-size-gb 50
|
||||
:pvc-storage-class-name default-storage-class})
|
||||
(postgres/generate-deployment)
|
||||
(postgres/generate-service)]
|
||||
(postgres/generate-service)
|
||||
; TODO: Add configuration and authentication to relevant calls
|
||||
(taiga/generate-async-rabbitmq-deployment)
|
||||
(taiga/generate-async-rabbitmq-service)
|
||||
(taiga/generate-async-service)
|
||||
(taiga/generate-back-deployment)
|
||||
(taiga/generate-back-service)
|
||||
(taiga/generate-configmap)
|
||||
(taiga/generate-data-pvcs)
|
||||
(taiga/generate-events-deployment)
|
||||
(taiga/generate-events-rabbitmq-deployment)
|
||||
(taiga/generate-events-rabbitmq-service)
|
||||
(taiga/generate-events-service)
|
||||
(taiga/generate-front-deployment)
|
||||
(taiga/generate-front-service)
|
||||
(taiga/generate-gateway-configmap)
|
||||
(taiga/generate-gateway-deployment)
|
||||
(taiga/generate-gateway-service)
|
||||
(taiga/generate-protected-deployment)
|
||||
(taiga/generate-protected-service)
|
||||
(taiga/generate-rabbitmq-pvc)
|
||||
(taiga/generate-secret)]
|
||||
(taiga/generate-ingress-and-cert)
|
||||
(when (:contains? config :mon-cfg)
|
||||
(mon/generate (:mon-cfg config) (:mon-auth auth))))))))
|
||||
|
|
|
@ -36,6 +36,32 @@
|
|||
:opt-un [::mon-auth]))
|
||||
|
||||
|
||||
#?(:cljs
|
||||
(defmethod yaml/load-resource :taiga [resource-name]
|
||||
(case resource-name
|
||||
"taiga/events-rabbitmq-deployment.yaml" (rc/inline "taiga/events-rabbitmq-deployment.yaml")
|
||||
"taiga/gateway-deployment.yaml" (rc/inline "taiga/gateway-deployment.yaml")
|
||||
"taiga/protected-deployment.yaml" (rc/inline "taiga/protected-deployment.yaml")
|
||||
"taiga/gateway-configmap.yaml" (rc/inline "taiga/gateway-configmap.yaml")
|
||||
"taiga/configmap.yaml" (rc/inline "taiga/configmap.yaml")
|
||||
"taiga/async-service.yaml" (rc/inline "taiga/async-service.yaml")
|
||||
"taiga/events-deployment.yaml" (rc/inline "taiga/events-deployment.yaml")
|
||||
"taiga/async-deployment.yaml" (rc/inline "taiga/async-deployment.yaml")
|
||||
"taiga/back-deployment.yaml" (rc/inline "taiga/back-deployment.yaml")
|
||||
"taiga/front-deployment.yaml" (rc/inline "taiga/front-deployment.yaml")
|
||||
"taiga/front-service.yaml" (rc/inline "taiga/front-service.yaml")
|
||||
"taiga/gateway-service.yaml" (rc/inline "taiga/gateway-service.yaml")
|
||||
"taiga/data-pvcs.yaml" (rc/inline "taiga/data-pvcs.yaml")
|
||||
"taiga/async-rabbitmq-deployment.yaml" (rc/inline "taiga/async-rabbitmq-deployment.yaml")
|
||||
"taiga/protected-service.yaml" (rc/inline "taiga/protected-service.yaml")
|
||||
"taiga/secret.yaml" (rc/inline "taiga/secret.yaml")
|
||||
"taiga/async-rabbitmq-service.yaml" (rc/inline "taiga/async-rabbitmq-service.yaml")
|
||||
"taiga/events-service.yaml" (rc/inline "taiga/events-service.yaml")
|
||||
"taiga/back-service.yaml" (rc/inline "taiga/back-service.yaml")
|
||||
"taiga/events-rabbitmq-service.yaml" (rc/inline "taiga/events-rabbitmq-service.yaml")
|
||||
"taiga/rabbitmq-pvc.yaml" (rc/inline "taiga/rabbitmq-pvc.yaml")
|
||||
(throw (js/Error. "Undefined Resource!")))))
|
||||
|
||||
(defn-spec generate-ingress-and-cert cp/map-or-seq?
|
||||
[config config?]
|
||||
(ing/generate-ingress-and-cert
|
||||
|
@ -43,3 +69,68 @@
|
|||
{:service-name "taiga"
|
||||
:service-port 80}
|
||||
config)))
|
||||
|
||||
; TODO: Check which ones need configuration or authentication information
|
||||
(defn-spec generate-events-rabbitmq-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/events-rabbitmq-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-gateway-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/gateway-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-protected-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/protected-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-gateway-configmap cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/gateway-configmap.yaml")))
|
||||
|
||||
(defn-spec generate-configmap cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/configmap.yaml")))
|
||||
|
||||
(defn-spec generate-async-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/async-service.yaml")))
|
||||
|
||||
(defn-spec generate-events-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/events-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-async-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/async-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-back-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/back-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-front-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/front-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-front-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/front-service.yaml")))
|
||||
|
||||
(defn-spec generate-gateway-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/gateway-service.yaml")))
|
||||
|
||||
(defn-spec generate-data-pvcs cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/data-pvcs.yaml")))
|
||||
|
||||
(defn-spec generate-async-rabbitmq-deployment cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/async-rabbitmq-deployment.yaml")))
|
||||
|
||||
(defn-spec generate-protected-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/protected-service.yaml")))
|
||||
|
||||
(defn-spec generate-secret cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/secret.yaml")))
|
||||
|
||||
(defn-spec generate-async-rabbitmq-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/async-rabbitmq-service.yaml")))
|
||||
|
||||
(defn-spec generate-events-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/events-service.yaml")))
|
||||
|
||||
(defn-spec generate-back-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/back-service.yaml")))
|
||||
|
||||
(defn-spec generate-events-rabbitmq-service cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/events-rabbitmq-service.yaml")))
|
||||
|
||||
(defn-spec generate-rabbitmq-pvc cp/map-or-seq? []
|
||||
(yaml/from-string (yaml/load-resource "taiga/rabbitmq-pvc.yaml")))
|
||||
|
||||
|
|
Loading…
Reference in a new issue