修改任务状态
This commit is contained in:
parent
eeaefa0eb6
commit
f078531de8
|
@ -2,29 +2,26 @@ Name: pcm.kubenative.rpc
|
|||
ListenOn: 0.0.0.0:2003
|
||||
|
||||
Participant:
|
||||
Name: ali
|
||||
Address: http://121.89.194.135:6443
|
||||
RpcAddress: pcm-participant-kubernetes-service:2003
|
||||
Name: sealos集群
|
||||
Address: http://172.20.32.238.nip.io:6443
|
||||
RpcAddress: pcm-kubernetes.ns-admin.svc.cluster.local:2003
|
||||
Type: "CLOUD"
|
||||
TenantId: 3
|
||||
TenantName: ali
|
||||
Labels: { "cloud": "ali" }
|
||||
TenantName: sealos
|
||||
Labels: { "cloud": "sealos" }
|
||||
MetricsUrl: http://121.89.194.135:31965
|
||||
|
||||
|
||||
KubeConfig:
|
||||
Server: 121.89.194.135:6443
|
||||
Token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjdyeU1HdUxNYTVxLWRzMWY1UGdOV1pjVnQxUXRETXRXZzJyczlIeHVtLXMifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJwY20tdGVzdC10b2tlbi1mNjhjdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJwY20tdGVzdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6ImEzZTM3Zjc4LTFmNmQtNDQzZC1hY2VkLWU2NjFiZGRmNDQ1NCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTpwY20tdGVzdCJ9.EmoQJuwXAtgJ5c_CtyMxe2AtWei67i5Ljb3Fw6qGrCmy67Yn0Nhh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C__sEhqBX3jriJtFoU9XuToxjdPb1GjmmB4izUi7Xmq2QSGVWCtzZcrHzIa_toeRC2OmYepT0JmJ7WiT_ep0o90w4QdlDvxkmxGHZJVXNeRp6d9Np9LeGL7nXSBiyEhV5pqg8YdOkvJnaaBk7B2uPOfAmBbWV6AZFAQmUBMA
|
||||
|
||||
# core rpc
|
||||
PcmCoreRpcConf:
|
||||
Endpoints:
|
||||
- 119.45.100.73:32456
|
||||
# Endpoints:
|
||||
# - 0.0.0.0:2004
|
||||
NonBlock: true
|
||||
- 127.0.0.1:2004
|
||||
# Endpoints:
|
||||
# - 0.0.0.0:2004
|
||||
NonBlock: true
|
||||
|
||||
ParticipantId: 1696118513460056064
|
||||
ParticipantId: 1727670068428410880
|
||||
|
|
|
@ -102,7 +102,7 @@ func apply(cloud *pcmCore.CloudInfo, svc *svc.ServiceContext) {
|
|||
applyReq := kubernetesclient.ApplyReq{
|
||||
YamlString: cloud.YamlString,
|
||||
}
|
||||
cloud.Status = "Pending"
|
||||
cloud.Status = "Running"
|
||||
_, err := applyYamlLogic.ApplyYaml(&applyReq)
|
||||
if err != nil {
|
||||
cloud.Status = "Failed"
|
||||
|
@ -125,7 +125,7 @@ func DeploymentHandler(cloudInfo *pcmCore.CloudInfo, svc *svc.ServiceContext) {
|
|||
} else if deployment.Status.ReadyReplicas == deployment.Status.Replicas {
|
||||
cloudInfo.Status = "Running"
|
||||
} else {
|
||||
cloudInfo.Status = "Stopped"
|
||||
cloudInfo.Status = "Failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ func StatefulSetHandler(cloudInfo *pcmCore.CloudInfo, svc *svc.ServiceContext) {
|
|||
} else if sts.Status.ReadyReplicas == sts.Status.Replicas {
|
||||
cloudInfo.Status = "Running"
|
||||
} else {
|
||||
cloudInfo.Status = "Stopped"
|
||||
cloudInfo.Status = "Failed"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue