未验证 提交 fbaeddb8 编写于 作者: S shaowenchen

fix sync kubeconfig bug

Signed-off-by: Nshaowenchen <mail@chenshaowen.com>
上级 5223362c
......@@ -64,7 +64,7 @@ const (
// - Secret.Data["secret"] - secret
SecretTypeKubeConfig v1.SecretType = DevOpsCredentialPrefix + "kubeconfig"
// KubeConfigSecretKey is the key of the secret for SecretTypeKubeConfig secrets
KubeConfigSecretKey = "secret"
KubeConfigSecretKey = "content"
// CredentialAutoSyncAnnoKey is used to indicate whether the secret is automatically synchronized to devops.
// In the old version, the credential is stored in jenkins and cannot be obtained.
// This field is set to ensure that the secret is not overwritten by a nil value.
......
......@@ -89,7 +89,7 @@ func TestNewKubeconfigCredential(t *testing.T) {
Namespace: "test",
},
Type: "credential.devops.kubesphere.io/kubeconfig",
Data: map[string][]byte{"secret": content},
Data: map[string][]byte{"content": content},
}
credential := NewKubeconfigCredential(secret)
if credential.StaplerClass != "com.microsoft.jenkins.kubernetes.credentials.KubeconfigCredentials" {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册