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() {
	appConfig := config.GetConfig()
	runPlaybook("kubespray/project/reset.yml", "")
	CopyK8SAdminConfig(appConfig.KubeconfigFile)
}
