Nextflow不';t使用正确的服务帐户将工作流部署到kubernetes

Nextflow不';t使用正确的服务帐户将工作流部署到kubernetes,kubernetes,nextflow,Kubernetes,Nextflow,我们试图在k8s命名空间上使用nextflow,而不是我们的默认命名空间,我们使用的命名空间是nextflownamespace。我们已经创建了PVC,并确保默认服务帐户具有管理员角色绑定。我们收到一个错误,nextflow无法访问PVC: "message": "persistentvolumeclaims \"my-nextflow-pvc\" is forbidden: User \"system:serviceaccount:

我们试图在k8s命名空间上使用nextflow,而不是我们的默认命名空间,我们使用的命名空间是
nextflownamespace
。我们已经创建了PVC,并确保默认服务帐户具有管理员角色绑定。我们收到一个错误,nextflow无法访问PVC:

"message": "persistentvolumeclaims \"my-nextflow-pvc\" is forbidden: 
User \"system:serviceaccount:mynamespace:default\" cannot get resource 
\"persistentvolumeclaims\" in API group \"\" in the namespace \"nextflownamespace\"",
在该错误中,我们看到
system:servicecomport:mynamespace:default
错误地指向我们的默认名称空间
mynamespace
,而不是我们为nextflow使用而创建的
nextflownamespace

我们尝试将
debug.yaml=true
添加到
nextflow.config
中,但找不到它提交给k8s以验证错误的yaml。我们的配置文件如下所示:

profiles {
  standard { 
    k8s {
          executor = "k8s"
          namespace = "nextflownamespace"
          cpus = 1
          memory = 1.GB
          debug.yaml = true
        }
    aws{ 
          endpoint = "https://s3.nautilus.optiputer.net"
       }
  }
我们确实验证了,当我们将名称空间更改为另一个任意值时,错误消息使用了新的任意名称空间,但服务帐户名称继续错误地指向用户默认名称空间


我们已经尝试了
profiles.standard.k8s.serviceAccount=“system:serviceAccount:nextflownamespace:default”
的每一个变体,我们可以想到这些变体,但没有得到任何更改。

我认为最好避免使用Nextflow嵌套。我会从您的配置文件中删除“标准”层,或者将“标准”作为单独的配置文件:

profiles {

    standard {
      process.executor = 'local'
    }

    k8s {
        executor = "k8s"
        namespace = "nextflownamespace"
        cpus = 1
        memory = 1.GB
        debug.yaml = true
    }

    aws{ 
        endpoint = "https://s3.nautilus.optiputer.net"
    }
}

我想知道使用嵌套的配置文件是否发生了愚蠢的事情?也就是说,当您从设置
profiles.k8s.serviceCount=“system:serviceCount:nextflownamespace:default”
?@Steve中删除“标准”层时会发生什么?看起来是这样做的!我们越过这一点,又犯了一个错误。我们刚刚从概要文件中删除了标准,并从命令行中删除了
--profile
。如果你能把它复制成一个答案,我会接受的。谢谢令人遗憾的是,我对Kubernetes没有任何经验,所以我真的很高兴我能帮上忙!我希望下面的答案是可以的。您是否还需要为“serviceAccount”设置添加值?不过,我仍然希望在命令行上使用
-profile k8s
(注意单破折号与双破折号/连字符)。