Clean up deprecations

This commit is contained in:
bom 2024-07-02 15:25:35 +02:00
parent e503f8edd4
commit 4860e62fc2

View file

@ -21,10 +21,6 @@
"shynet/service-webserver.yaml" (rc/inline "shynet/service-webserver.yaml") "shynet/service-webserver.yaml" (rc/inline "shynet/service-webserver.yaml")
"shynet/statefulset.yaml" (rc/inline "shynet/statefulset.yaml") "shynet/statefulset.yaml" (rc/inline "shynet/statefulset.yaml")
(throw (js/Error. "Undefined Resource!"))))) (throw (js/Error. "Undefined Resource!")))))
#?(:cljs
(defmethod yaml/load-as-edn :shynet [resource-name]
(yaml/from-string (yaml/load-resource resource-name))))
(defn generate-secret [config] (defn generate-secret [config]
(let [{:keys [fqdn django-secret-key postgres-db-user postgres-db-password]} config] (let [{:keys [fqdn django-secret-key postgres-db-user postgres-db-password]} config]
@ -48,13 +44,13 @@
(defn generate-webserver-deployment [] (defn generate-webserver-deployment []
(let [shynet-application "shynet-webserver"] (let [shynet-application "shynet-webserver"]
(-> (yaml/load-as-edn "shynet/deployments.yaml") (-> (yaml/load-as-edn "shynet/deployments.yaml")
(cm/replace-all-matching-values-by-new-value "shynet-application" shynet-application) (cm/replace-all-matching "shynet-application" shynet-application)
(update-in [:spec :template :spec :containers 0] dissoc :command)))) (update-in [:spec :template :spec :containers 0] dissoc :command))))
(defn generate-celeryworker-deployment [] (defn generate-celeryworker-deployment []
(let [shynet-application "shynet-celeryworker"] (let [shynet-application "shynet-celeryworker"]
(-> (yaml/load-as-edn "shynet/deployments.yaml") (-> (yaml/load-as-edn "shynet/deployments.yaml")
(cm/replace-all-matching-values-by-new-value "shynet-application" shynet-application)))) (cm/replace-all-matching "shynet-application" shynet-application))))
(defn generate-ingress [config] (defn generate-ingress [config]
(let [{:keys [fqdn issuer] (let [{:keys [fqdn issuer]
@ -63,7 +59,7 @@
(-> (->
(yaml/load-as-edn "shynet/ingress.yaml") (yaml/load-as-edn "shynet/ingress.yaml")
(assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer) (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer)
(cm/replace-all-matching-values-by-new-value "fqdn" fqdn)))) (cm/replace-all-matching "fqdn" fqdn))))
(defn generate-statefulset [] (defn generate-statefulset []
(yaml/load-as-edn "shynet/statefulset.yaml")) (yaml/load-as-edn "shynet/statefulset.yaml"))