fix missing reprovion in method provisionK3s
This commit is contained in:
parent
ed33c1b0c2
commit
7d1c40800a
1 changed files with 6 additions and 4 deletions
|
@ -15,10 +15,8 @@ fun Prov.provisionK3sCommand(cli: K3sCliCommand) = task {
|
||||||
val k3sConfig: K3sConfig = getK3sConfig(cli.configFileName)
|
val k3sConfig: K3sConfig = getK3sConfig(cli.configFileName)
|
||||||
DefaultApplicationFileRepository().assertExists(cli.applicationFileName)
|
DefaultApplicationFileRepository().assertExists(cli.applicationFileName)
|
||||||
|
|
||||||
if (cli.reprovision || k3sConfig.reprovision) {
|
val k3sConfigReprovision = k3sConfig.copy(reprovision = cli.reprovision || k3sConfig.reprovision)
|
||||||
deprovisionK3sInfra()
|
provisionK3s(k3sConfigReprovision, grafanaConfigResolved, cli.applicationFileName)
|
||||||
}
|
|
||||||
provisionK3s(k3sConfig, grafanaConfigResolved, cli.applicationFileName)
|
|
||||||
} else {
|
} else {
|
||||||
provisionGrafana(cli.onlyModules, grafanaConfigResolved)
|
provisionGrafana(cli.onlyModules, grafanaConfigResolved)
|
||||||
}
|
}
|
||||||
|
@ -32,6 +30,10 @@ fun Prov.provisionK3s(
|
||||||
grafanaConfigResolved: GrafanaAgentConfigResolved? = null,
|
grafanaConfigResolved: GrafanaAgentConfigResolved? = null,
|
||||||
applicationFileName: ApplicationFileName? = null) = task {
|
applicationFileName: ApplicationFileName? = null) = task {
|
||||||
|
|
||||||
|
if (k3sConfig.reprovision) {
|
||||||
|
deprovisionK3sInfra()
|
||||||
|
}
|
||||||
|
|
||||||
provisionNetwork(k3sConfig)
|
provisionNetwork(k3sConfig)
|
||||||
|
|
||||||
installK3s(k3sConfig)
|
installK3s(k3sConfig)
|
||||||
|
|
Loading…
Reference in a new issue