0
func GetK8sDeploymentMetadata(clustername string, namespace string)([]v1.Deployment, error) {
    deploymentMetadata, err:=clientset[clustername].AppsV1().Deployments(namespace).List(v1.ListOptions{})
    return deploymentMetadata.Items , err  
}

我有一个返回类型部署元数据的函数。我的[]v1.Deployment问题是如何转换[]v1.Deployment[]string

4

0 回答 0