swap to our more dynamic map passing

This commit is contained in:
2025-10-08 23:57:07 -05:00
parent 8c99cf0738
commit f97574e0aa

View File

@@ -5,17 +5,17 @@
{:stack [:vault-secrets :helm-fn :chart :ingress] {:stack [:vault-secrets :helm-fn :chart :ingress]
:app-namespace "nextcloud" :app-namespace "nextcloud"
:app-name "nextcloud" :app-name "nextcloud"
:chart-repo "https://nextcloud.github.io/helm/"
:image-port 8080 :image-port 8080
:vault-load-yaml true :vault-load-yaml true
:helm-values-fn (make-transformer :chart-opts {:fetchOpts {:repo "https://nextcloud.github.io/helm/"}
(fn [{:keys [app-name secrets]}] :helm-values-fn (make-transformer
(let [{:keys [host]} secrets] (fn [{:keys [app-name secrets]}]
[[["nextcloud" "host"] host] (let [{:keys [host]} secrets]
[["nextcloud" "trustedDomains"] [host app-name]]]))) [[["nextcloud" "host"] host]
:transformations (fn [args _opts] [["nextcloud" "trustedDomains"] [host app-name]]])))
(let [kind (get-in args [:resource :kind])] :transformations (fn [args _opts]
(if (some #{kind} ["StatefulSet" "PersistentVolumeClaim" "Ingress"]) (let [kind (get-in args [:resource :kind])]
(update-in args [:resource :metadata :annotations] (if (some #{kind} ["StatefulSet" "PersistentVolumeClaim" "Ingress"])
#(assoc (or % {}) "pulumi.com/skipAwait" "true")) (update-in args [:resource :metadata :annotations]
args)))}) #(assoc (or % {}) "pulumi.com/skipAwait" "true"))
args)))}})