clean up nextcloud add-skip-await-transformation
This commit is contained in:
@@ -4,22 +4,15 @@
|
|||||||
[utils.vault :as vault-utils]
|
[utils.vault :as vault-utils]
|
||||||
[utils.k8s :as k8s-utils]))
|
[utils.k8s :as k8s-utils]))
|
||||||
|
|
||||||
(defn- add-skip-await-transformation
|
(defn- add-skip-await-transformation [args _opts]
|
||||||
"A Pulumi transformation that adds the skipAwait annotation to problematic resources."
|
(let [kind (get-in args [:resource :kind])]
|
||||||
[args _opts]
|
(if (some #{kind} ["StatefulSet" "PersistentVolumeClaim" "Ingress"])
|
||||||
(let [kind (get-in args [:kind])]
|
(update-in args [:resource :metadata :annotations]
|
||||||
(if (or
|
#(assoc (or % {}) "pulumi.com/skipAwait" "true"))
|
||||||
(= kind "StatefulSet")
|
|
||||||
(= kind "PersistentVolumeClaim")
|
|
||||||
(= kind "Ingress"))
|
|
||||||
(let [metadata (get-in args [:metadata] {})
|
|
||||||
annotations (get metadata :annotations {})
|
|
||||||
new-annotations (assoc annotations "pulumi.com/skipAwait" "true")
|
|
||||||
new-metadata (assoc metadata :annotations new-annotations)]
|
|
||||||
(assoc args :metadata new-metadata))
|
|
||||||
args)))
|
args)))
|
||||||
|
|
||||||
(defn deploy-nextcloud
|
|
||||||
|
(defn deploy
|
||||||
"Deploy Nextcloud using direct vault connection info."
|
"Deploy Nextcloud using direct vault connection info."
|
||||||
[provider vault-provider]
|
[provider vault-provider]
|
||||||
(let [nextcloud-values-transformer (fn [{:keys [base-values hostname app-name]}]
|
(let [nextcloud-values-transformer (fn [{:keys [base-values hostname app-name]}]
|
||||||
|
|||||||
Reference in New Issue
Block a user