fix call to provs
This commit is contained in:
parent
907332c15b
commit
ff881848c6
2 changed files with 7 additions and 16 deletions
|
@ -20,7 +20,7 @@
|
||||||
(s/def ::k3s-encryptionPassphrase string?)
|
(s/def ::k3s-encryptionPassphrase string?)
|
||||||
(s/def ::config
|
(s/def ::config
|
||||||
(s/merge ::c4k-d/config
|
(s/merge ::c4k-d/config
|
||||||
(s/keys :req-un [::email ::echo ::k3s-output-filename ::k3s-auth-input ::k3s-provision-user ::fqdn ::ipv4 ::ipv6]
|
(s/keys :req-un [::email ::echo ::k3s-output-filename ::k3s-auth-input ::k3s-provision-user]
|
||||||
:opt-un [::k3s-hcloudApiToken ::k3s-encryptionPassphrase])))
|
:opt-un [::k3s-hcloudApiToken ::k3s-encryptionPassphrase])))
|
||||||
|
|
||||||
(s/def ::node
|
(s/def ::node
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
[config ::config
|
[config ::config
|
||||||
tf-out ::td/tf-out]
|
tf-out ::td/tf-out]
|
||||||
(let [{:keys [k3s-output-filename k3s-provision-user]} config
|
(let [{:keys [k3s-output-filename k3s-provision-user]} config
|
||||||
fqdn (get-in tf-out [:out :value :fqdn])]
|
ipv4 (get-in tf-out [:out :value :ipv4])]
|
||||||
[["provs-server.jar" "k3s" (str k3s-provision-user "@" fqdn) "-c" (output-path config) "-a" (c4k-d/output-path config)]]))
|
[["provs-server.jar" "k3s" (str k3s-provision-user "@" ipv4) "-c" (output-path config) "-a" (c4k-d/output-path config)]]))
|
||||||
|
|
||||||
(defn-spec create-k3s-config ::server-config
|
(defn-spec create-k3s-config ::server-config
|
||||||
[config ::config
|
[config ::config
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
(st/instrument `cut/create-k3s-config)
|
(st/instrument `cut/create-k3s-config)
|
||||||
|
|
||||||
(deftest should-calculate-provs-server-command
|
(deftest should-calculate-provs-server-command
|
||||||
(is (= [["provs-server.jar" "k3s" "root@test.test.de" "-c" "../../target/dda-backup/k3s-out.yaml" "-a" "../../target/dda-backup/out.yaml"]]
|
(is (= [["provs-server.jar" "k3s" "root@127.0.0.1" "-c" "../../target/dda-backup/k3s-out.yaml" "-a" "../../target/dda-backup/out.yaml"]]
|
||||||
(cut/provs-server-command {:name "dda-backup"
|
(cut/provs-server-command {:name "dda-backup"
|
||||||
:project-root-path "../.."
|
:project-root-path "../.."
|
||||||
:build-dir-name "target"
|
:build-dir-name "target"
|
||||||
|
@ -25,10 +25,7 @@
|
||||||
:c4k-auth-input "auth.yaml"
|
:c4k-auth-input "auth.yaml"
|
||||||
:c4k-output "out.yaml"
|
:c4k-output "out.yaml"
|
||||||
:email "test@test.t"
|
:email "test@test.t"
|
||||||
:echo false
|
:echo false}
|
||||||
:fqdn "fq.dn"
|
|
||||||
:ipv4 "1.2.3.4"
|
|
||||||
:ipv6 "2a01:4f8:c012:cb41::1"}
|
|
||||||
{:out {:sensitive false :type [] :value {:fqdn "test.test.de" :ipv4 "127.0.0.1" :ipv6 "::"}}}))))
|
{:out {:sensitive false :type [] :value {:fqdn "test.test.de" :ipv4 "127.0.0.1" :ipv6 "::"}}}))))
|
||||||
|
|
||||||
(deftest should-create-k3s-config
|
(deftest should-create-k3s-config
|
||||||
|
@ -57,10 +54,7 @@
|
||||||
:c4k-auth-input "auth.yaml"
|
:c4k-auth-input "auth.yaml"
|
||||||
:c4k-output "out.yaml"
|
:c4k-output "out.yaml"
|
||||||
:email "test@test.t"
|
:email "test@test.t"
|
||||||
:echo false
|
:echo false}
|
||||||
:fqdn "fq.dn"
|
|
||||||
:ipv4 "1.2.3.4"
|
|
||||||
:ipv6 "2a01:4f8:c012:cb41::1"}
|
|
||||||
{:out
|
{:out
|
||||||
{:sensitive false,
|
{:sensitive false,
|
||||||
:type [],
|
:type [],
|
||||||
|
@ -88,10 +82,7 @@
|
||||||
:c4k-auth-input "auth.yaml"
|
:c4k-auth-input "auth.yaml"
|
||||||
:c4k-output "out.yaml"
|
:c4k-output "out.yaml"
|
||||||
:email "test@test.t"
|
:email "test@test.t"
|
||||||
:echo false
|
:echo false}
|
||||||
:fqdn "fq.dn"
|
|
||||||
:ipv4 "1.2.3.4"
|
|
||||||
:ipv6 "2a01:4f8:c012:cb41::1"}
|
|
||||||
{:out
|
{:out
|
||||||
{:sensitive false,
|
{:sensitive false,
|
||||||
:type [],
|
:type [],
|
||||||
|
|
Loading…
Add table
Reference in a new issue