Why we need to write the apiGroup key in this definition again and again , if it is the same every time:
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
- this looks so redudant , that is repeating for everything
- if we need to write it , what are the other values
- if there are not other values for the field RBAC apiGroup , then k8s should assume that value automatically
apiGroup: rbac.authorization.k8s.io
this makes the yaml too redundant , is there any way to work around this. can we just skip this key? OR can we declare this somewhere globally.