28 lines
631 B
Go
28 lines
631 B
Go
package kubespray
|
|
|
|
import (
|
|
"kube-forge/internal/config"
|
|
)
|
|
|
|
func InstallCluster(tags string) {
|
|
appConfig := config.GetConfig()
|
|
runPlaybook("kubespray/project/cluster.yml", tags)
|
|
CopyK8SAdminConfig(appConfig.KubeconfigFile)
|
|
}
|
|
|
|
func UpgradeCluster(tags string) {
|
|
appConfig := config.GetConfig()
|
|
runPlaybook("kubespray/project/upgrade_cluster.yml", tags)
|
|
CopyK8SAdminConfig(appConfig.KubeconfigFile)
|
|
}
|
|
|
|
func ScaleCluster() {
|
|
appConfig := config.GetConfig()
|
|
runPlaybook("kubespray/project/scale.yml", "")
|
|
CopyK8SAdminConfig(appConfig.KubeconfigFile)
|
|
}
|
|
|
|
func ResetCluster() {
|
|
runPlaybook("kubespray/project/reset.yml", "")
|
|
}
|