[ Agent ] [ CMII ] - 新增版本更新的模式;新增部署模板;新增消息推送模块
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"agent-go/logger"
|
||||
"agent-go/utils"
|
||||
"context"
|
||||
"k8s.io/api/apps/v1"
|
||||
v1 "k8s.io/api/apps/v1"
|
||||
autoscalingv1 "k8s.io/api/autoscaling/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -82,9 +82,9 @@ func (op *CmiiK8sOperator) changeOperatorEnv(cmiiEnv string) {
|
||||
}
|
||||
|
||||
if strings.Contains(cmiiEnv, "dev") {
|
||||
if strings.Contains(cmiiEnv, "f") {
|
||||
if strings.Contains(cmiiEnv, "devf") {
|
||||
op.CurrentNamespace = devFlight
|
||||
} else if strings.Contains(cmiiEnv, "o") {
|
||||
} else if strings.Contains(cmiiEnv, "devo") {
|
||||
op.CurrentNamespace = devOperation
|
||||
} else {
|
||||
op.CurrentNamespace = dev
|
||||
@@ -419,6 +419,15 @@ func (op *CmiiK8sOperator) DeploymentRestartByKill(cmiiEnv, appName string) bool
|
||||
return true
|
||||
}
|
||||
|
||||
func (op *CmiiK8sOperator) DeploymentNew(cmiiEnv, appName string, waitTimeOut int) bool {
|
||||
|
||||
op.changeOperatorEnv(cmiiEnv)
|
||||
//op.CurrentClient.AppsV1().Deployments(op.CurrentNamespace).Apply()
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
func (op *CmiiK8sOperator) DeploymentStatusCheck(cmiiEnv, appName string, waitTimeOut int) bool {
|
||||
|
||||
op.changeOperatorEnv(cmiiEnv)
|
||||
|
||||
Reference in New Issue
Block a user