如何为用户设置RBAC以在特定名称空间中提交Argo工作流? [英] How to set RBAC for a user to submit Argo workflow in a specific namespace?
问题描述
我正在检查Argo,我想为一个用户(或多个用户)授予一个特定的命名空间,以使用Argo工作流程(并让用户访问诸如工件,输出,访问机密之类的功能).我已经建立了一个用户并创建了一个命名空间(在minikube中进行测试).我应该如何为用户,名称空间和Argo工作流绑定角色?
I'm checking Argo and I would like to grant a specific namespace for a user (or multiple users) to use Argo workflow (and let the users access features such as artifacts, outputs, access to secrets). I have set up a user and created a namespace (testing in minikube). How should I bind roles for the user, namespace and Argo workflow?
这是我现在拥有的角色和角色绑定yaml文件.
Here is role and rolebinding yaml files I have now.
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
namespace: default
subjects:
- kind: User
name: user1
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
谢谢!
推荐答案
一个很好的指南,逐步介绍了如何创建名称空间,用户以及仅在选定的名称空间中与该用户一起使用的权限:
Great guide for you to have a step by step explanation how to create namespace, user and grant permissions to work with this user only in chosen namespace:
这篇关于如何为用户设置RBAC以在特定名称空间中提交Argo工作流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!