shorten to modern impl w/ our dynamicz

This commit is contained in:
2025-10-08 23:58:12 -05:00
parent eddc220028
commit 67b084af24

View File

@@ -1,26 +1,16 @@
(ns k8s.add-ons.csi-driver.hetzner (ns k8s.add-ons.csi-driver.hetzner
(:require (:require
["@pulumi/kubernetes" :as k8s] [configs :refer [cfg]]))
["@pulumi/pulumi" :as pulumi]))
(defn execute-fn [{:keys [provider]}]
(let [hcloud-config (pulumi/Config. "hcloud")
hcloud-token (.requireSecret hcloud-config "token")
csi-secret (new (.. k8s -core -v1 -Secret)
"hcloud-csi-secret"
(clj->js {:metadata {:name "hcloud"
:namespace "kube-system"}
:stringData {:token hcloud-token}})
#js {:provider provider})]
csi-secret))
(def config (def config
{:stack [:execute :chart] {:stack [:secret :chart]
:app-namespace "kube-system" :app-namespace "kube-system"
:app-name "hcloud-csi" :app-name "hcloud-csi"
:vault-load-yaml false
:secret-opts {:metadata {:name "hcloud"
:namespace "kube-system"}
:stringData {:token (-> cfg :hcloudToken)}}
:chart-opts {:fetchOpts {:repo "https://charts.hetzner.cloud"}
:helm-values-fn #(clj->js {:controller {:enabled false :helm-values-fn #(clj->js {:controller {:enabled false
:existingSecret {:name "hcloud-csi-secret"} :existingSecret {:name "hcloud-csi-secret"}
:node {:existingSecret {:name "hcloud-csi-secret"}}}}) :node {:existingSecret {:name "hcloud-csi-secret"}}}})}})
:vault-load-yaml false
:exec-fn execute-fn
:chart-repo "https://charts.hetzner.cloud"})