restart-config-cron
This commit is contained in:
parent
67acfef563
commit
8159f85158
2 changed files with 29 additions and 3 deletions
src
|
@ -122,9 +122,12 @@
|
||||||
(let [{:keys [namespace]} config]
|
(let [{:keys [namespace]} config]
|
||||||
[(load-and-adjust-namespace "jitsi/restart-config-serviceaccount.yaml" namespace)
|
[(load-and-adjust-namespace "jitsi/restart-config-serviceaccount.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/restart-config-rolebinding.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/restart-config-rolebinding.yaml" namespace)
|
||||||
(->
|
(->
|
||||||
(load-and-adjust-namespace "jitsi/restart-config-authorization.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/restart-config-authorization.yaml" namespace)
|
||||||
(cm/replace-key-value :resourceNames ["etherpad", "excalidraw"]))]))
|
(cm/replace-key-value :resourceNames ["etherpad", "excalidraw"]))
|
||||||
|
(->
|
||||||
|
(load-and-adjust-namespace "jitsi/restart-config-cron.yaml" namespace)
|
||||||
|
(cm/replace-key-value :resourceNames))]))
|
||||||
|
|
||||||
(defn-spec etherpad-config cp/map-or-seq?
|
(defn-spec etherpad-config cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
|
|
|
@ -138,7 +138,30 @@
|
||||||
{:fqdn "xy.xy.xy"
|
{:fqdn "xy.xy.xy"
|
||||||
:namespace "jitsi"})
|
:namespace "jitsi"})
|
||||||
2)))
|
2)))
|
||||||
(is (= 3
|
(is (= {:apiVersion "batch/v1",
|
||||||
|
:kind "CronJob",
|
||||||
|
:metadata {:name "deployment-restart", :namespace "jitsi"},
|
||||||
|
:spec
|
||||||
|
{:concurrencyPolicy "Forbid",
|
||||||
|
:schedule "SCHEDULE_REPLACE_Me",
|
||||||
|
:jobTemplate
|
||||||
|
{:spec
|
||||||
|
{:backoffLimit 2,
|
||||||
|
:activeDeadlineSeconds 600,
|
||||||
|
:template
|
||||||
|
{:spec
|
||||||
|
{:serviceAccountName "deployment-restart",
|
||||||
|
:restartPolicy "Never",
|
||||||
|
:containers [{:name "kubectl", :image "bitnami/kubectl"}],
|
||||||
|
:command
|
||||||
|
["bash"
|
||||||
|
"-c"
|
||||||
|
"kubectl rollout restart deployment/<YOUR DEPLOYMENT NAME> && kubectl rollout status deployment/<YOUR DEPLOYMENT NAME>"]}}}}}}
|
||||||
|
(nth (cut/restart-config
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"})
|
||||||
|
3)))
|
||||||
|
(is (= 4
|
||||||
(count (cut/restart-config
|
(count (cut/restart-config
|
||||||
{:fqdn "xy.xy.xy"
|
{:fqdn "xy.xy.xy"
|
||||||
:namespace "jitsi"})))))
|
:namespace "jitsi"})))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue