Nextflow 没有使用正确的服务帐户将工作流部署到 kubernetes
Nextflow doesn't use the right service account to deploy workflows to kubernetes
我们正在尝试在非默认的 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:serviceaccount: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 中使用嵌套 config profiles。我会从您的个人资料中删除 'standard' 图层,或者只将 'standard' 设为单独的个人资料:
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"
}
}
我们正在尝试在非默认的 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:serviceaccount: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 中使用嵌套 config profiles。我会从您的个人资料中删除 'standard' 图层,或者只将 'standard' 设为单独的个人资料:
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"
}
}