未验证 提交 887186b7 编写于 作者: Z Zhengyi Lai

Bugfix: UpsertRuntime create wrong runtime_id

Signed-off-by: NZhengyi Lai <zheng1@yunify.com>
上级 3778abf7
......@@ -71,7 +71,7 @@ func (c *client) UpsertRuntime(cluster string, kubeConfig string) error {
ctx := SystemContext()
req := &pb.CreateRuntimeCredentialRequest{
Name: &wrappers.StringValue{Value: fmt.Sprintf("kubeconfig-%s", cluster)},
Provider: &wrappers.StringValue{Value: "kubernetes"},
Provider: &wrappers.StringValue{Value: KubernetesProvider},
Description: &wrappers.StringValue{Value: "kubeconfig"},
RuntimeUrl: &wrappers.StringValue{Value: "kubesphere"},
RuntimeCredentialContent: &wrappers.StringValue{Value: kubeConfig},
......@@ -86,6 +86,7 @@ func (c *client) UpsertRuntime(cluster string, kubeConfig string) error {
RuntimeCredentialId: &wrappers.StringValue{Value: cluster},
Provider: &wrappers.StringValue{Value: KubernetesProvider},
Zone: &wrappers.StringValue{Value: cluster},
RuntimeId: &wrappers.StringValue{Value: cluster},
})
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册