You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
504 B
Clojure
24 lines
504 B
Clojure
(ns dda.k8s-keycloak.yaml
|
|
(:require
|
|
["js-yaml" :as yaml]
|
|
[shadow.resource :as rc]
|
|
))
|
|
|
|
(def config (rc/inline "config.yaml"))
|
|
|
|
(def cron (rc/inline "cron.yaml"))
|
|
|
|
(def deployment (rc/inline "deployment.yaml"))
|
|
|
|
(defn load-resource [resource-name]
|
|
(case resource-name
|
|
"config.yaml" config
|
|
"cron.yaml" cron
|
|
"deployment.yaml" deployment))
|
|
|
|
(defn from-string [input]
|
|
(js->clj (yaml/load input)
|
|
:keywordize-keys true))
|
|
|
|
(defn to-string [edn]
|
|
(yaml/dump (clj->js edn))) |