fix(group): 提交生成组织相关文件

This commit is contained in:
chenyang
2021-06-30 11:06:14 +08:00
parent 9fece18ca2
commit 8c73424416

View File

@@ -22,7 +22,7 @@ type Interface interface {
Version() (*version.Info, error)
Client() (*kubernetes.Clientset, error)
HasPermission(attributes v1.ResourceAttributes) (PermissionCheckResult, error)
CreateCommonUser(commonName string) ([]byte, error)
CreateCommonUser(commonName string, org ...string) ([]byte, error)
CreateDefaultClusterRoles() error
}
@@ -111,9 +111,9 @@ func (k *Kubernetes) CreateDefaultClusterRoles() error {
return nil
}
func (k *Kubernetes) CreateCommonUser(commonName string) ([]byte, error) {
func (k *Kubernetes) CreateCommonUser(commonName string, org ...string) ([]byte, error) {
// 生成用户证书申请
cert, err := certificate.CreateClientCertificateRequest(commonName, k.PrivateKey)
cert, err := certificate.CreateClientCertificateRequest(commonName, k.PrivateKey, org...)
if err != nil {
return nil, err
}