如果每次相同,为什么要一次又一次在此定义中编写apiGroup密钥:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: web-rw-deployment
namespace: some-web-app-ns
subjects:
- kind: User
name: "joesmith@example.com"
apiGroup: rbac.authorization.k8s.io
- kind: Group
name: "webdevs"
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: Role
name: web-rw-deployment
apiGroup: rbac.authorization.k8s.io
apiGroup: rbac.authorization.k8s.io
这会使yaml变得多余,是否有任何方法可以解决此问题。我们可以跳过此键吗?或者我们可以在全局某处声明它。