28 lines
608 B
Go
28 lines
608 B
Go
package kubespray
|
|
|
|
import (
|
|
"fmt"
|
|
"kube-forge/internal/config"
|
|
"kube-forge/internal/secrets_storage"
|
|
)
|
|
|
|
func InstallCluster(tags string) {
|
|
runPlaybook("kubespray/project/cluster.yml", tags)
|
|
|
|
config := config.GetConfig()
|
|
if config.Modules.SecretsStorage.Enabled {
|
|
fmt.Println("## Additional Vault Configuration")
|
|
secrets_storage.InitVault()
|
|
secrets_storage.UnsealVault()
|
|
secrets_storage.AddKubernetesLocalIntegration()
|
|
}
|
|
}
|
|
|
|
func UpgradeCluster(tags string) {
|
|
runPlaybook("kubespray/project/upgrade_cluster.yml", tags)
|
|
}
|
|
|
|
func ScaleCluster() {
|
|
runPlaybook("kubespray/project/scale.yml", "")
|
|
}
|