63 lines
2.2 KiB
Go
63 lines
2.2 KiB
Go
package b_middle
|
|
|
|
import (
|
|
"wdd.io/agent-common/logger"
|
|
"wdd.io/agent-operator/deploy/z_dep"
|
|
)
|
|
|
|
var (
|
|
EmqxApplyFilePath = ""
|
|
MongoApplyFilePath = ""
|
|
RabbitMQApplyFilePath = ""
|
|
RedisApplyFilePath = ""
|
|
MySQLApplyFilePath = ""
|
|
NacosApplyFilePath = ""
|
|
PVCApplyFilePath = ""
|
|
log = logger.Log
|
|
)
|
|
|
|
func init() {
|
|
|
|
EmqxApplyFilePath = z_dep.ApplyFilePrefix + "k8s-emqx.yaml"
|
|
MongoApplyFilePath = z_dep.ApplyFilePrefix + "k8s-mongo.yaml"
|
|
RabbitMQApplyFilePath = z_dep.ApplyFilePrefix + "k8s-rabbitmq.yaml"
|
|
RedisApplyFilePath = z_dep.ApplyFilePrefix + "k8s-redis.yaml"
|
|
MySQLApplyFilePath = z_dep.ApplyFilePrefix + "k8s-mysql.yaml"
|
|
NacosApplyFilePath = z_dep.ApplyFilePrefix + "k8s-nacos.yaml"
|
|
PVCApplyFilePath = z_dep.ApplyFilePrefix + "k8s-pvc.yaml"
|
|
|
|
log.DebugF("EmqxApplyFilePath: %s", EmqxApplyFilePath)
|
|
log.DebugF("MongoApplyFilePath: %s", MongoApplyFilePath)
|
|
log.DebugF("RabbitMQApplyFilePath: %s", RabbitMQApplyFilePath)
|
|
log.DebugF("RedisApplyFilePath: %s", RedisApplyFilePath)
|
|
log.DebugF("MySQLApplyFilePath: %s", MySQLApplyFilePath)
|
|
log.DebugF("NacosApplyFilePath: %s", NacosApplyFilePath)
|
|
log.DebugF("PVCApplyFilePath: %s", PVCApplyFilePath)
|
|
}
|
|
|
|
func MidEmqxDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiEmqxTemplate, EmqxApplyFilePath)
|
|
}
|
|
|
|
func MidMongoDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiMongoTemplate, MongoApplyFilePath)
|
|
}
|
|
func MidRabbitMQDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiRabbitMQTemplate, RabbitMQApplyFilePath)
|
|
}
|
|
func MidRedisDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiRedisTemplate, RedisApplyFilePath)
|
|
}
|
|
|
|
func MidMySQlDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiMySQLTemplate, MySQLApplyFilePath)
|
|
}
|
|
|
|
func MidNacosDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiNacosTemplate, NacosApplyFilePath)
|
|
}
|
|
|
|
func PVCDeploy(commonEnv *z_dep.CommonEnvironmentConfig) bool {
|
|
return commonEnv.ParseCommonEnvToApplyFile(CmiiPVCTemplate, PVCApplyFilePath)
|
|
}
|