rbac-resource-plus.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. apiVersion: v1
  2. items:
  3. - apiVersion: rbac.authorization.k8s.io/v1
  4. kind: ClusterRole
  5. metadata:
  6. labels:
  7. test-cmd: auth
  8. name: testing-CR
  9. rules:
  10. - apiGroups:
  11. - ""
  12. resources:
  13. - pods
  14. verbs:
  15. - create
  16. - delete
  17. - deletecollection
  18. - get
  19. - list
  20. - patch
  21. - update
  22. - watch
  23. - apiVersion: v1
  24. kind: Pod
  25. metadata:
  26. name: valid-pod
  27. labels:
  28. name: valid-pod
  29. spec:
  30. containers:
  31. - name: kubernetes-serve-hostname
  32. image: gcr.io/kubernetes-e2e-test-images/serve-hostname:1.1
  33. resources:
  34. limits:
  35. cpu: "1"
  36. memory: 512Mi
  37. - apiVersion: rbac.authorization.k8s.io/v1
  38. kind: ClusterRoleBinding
  39. metadata:
  40. labels:
  41. test-cmd: auth
  42. name: testing-CRB
  43. roleRef:
  44. apiGroup: rbac.authorization.k8s.io
  45. kind: ClusterRole
  46. name: testing-CR
  47. subjects:
  48. - apiGroup: rbac.authorization.k8s.io
  49. kind: Group
  50. name: system:masters
  51. - apiVersion: rbac.authorization.k8s.io/v1
  52. kind: RoleBinding
  53. metadata:
  54. labels:
  55. test-cmd: auth
  56. name: testing-RB
  57. namespace: some-other-random
  58. roleRef:
  59. apiGroup: rbac.authorization.k8s.io
  60. kind: ClusterRole
  61. name: testing-CR
  62. subjects:
  63. - apiGroup: rbac.authorization.k8s.io
  64. kind: Group
  65. name: system:masters
  66. - apiVersion: rbac.authorization.k8s.io/v1
  67. kind: Role
  68. metadata:
  69. labels:
  70. test-cmd: auth
  71. name: testing-R
  72. namespace: some-other-random
  73. rules:
  74. - apiGroups:
  75. - ""
  76. resources:
  77. - configmaps
  78. verbs:
  79. - get
  80. - list
  81. - watch
  82. kind: List
  83. metadata: {}