rbac.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ---
  2. # ServiceAccount definition for the CLI.
  3. apiVersion: v1
  4. kind: ServiceAccount
  5. metadata:
  6. name: popeye
  7. namespace: popeye
  8. ---
  9. # Popeye needs get/list access on the following Kubernetes resources.
  10. apiVersion: rbac.authorization.k8s.io/v1
  11. kind: ClusterRole
  12. metadata:
  13. name: popeye
  14. rules:
  15. - apiGroups:
  16. - policy
  17. resources:
  18. - poddisruptionbudgets
  19. - podsecuritypolicies
  20. verbs:
  21. - get
  22. - list
  23. - apiGroups:
  24. - autoscaling
  25. resources:
  26. - horizontalpodautoscalers
  27. verbs:
  28. - get
  29. - list
  30. - apiGroups:
  31. - networking.k8s.io
  32. resources:
  33. - ingresses
  34. - networkpolicies
  35. verbs:
  36. - get
  37. - list
  38. - apiGroups: [""]
  39. resources:
  40. - configmaps
  41. - endpoints
  42. - limitranges
  43. - namespaces
  44. - nodes
  45. - persistentvolumes
  46. - persistentvolumeclaims
  47. - pods
  48. - secrets
  49. - serviceaccounts
  50. - services
  51. verbs:
  52. - get
  53. - list
  54. - apiGroups:
  55. - apps
  56. resources:
  57. - daemonsets
  58. - deployments
  59. - statefulsets
  60. - replicasets
  61. verbs:
  62. - get
  63. - list
  64. - apiGroups:
  65. - rbac.authorization.k8s.io
  66. resources:
  67. - clusterroles
  68. - clusterrolebindings
  69. - roles
  70. - rolebindings
  71. verbs:
  72. - get
  73. - list
  74. - apiGroups:
  75. - metrics.k8s.io
  76. resources:
  77. - pods
  78. - nodes
  79. verbs:
  80. - get
  81. - list
  82. ---
  83. # ClusterRoleBinding to ties Popeye with the cluster
  84. apiVersion: rbac.authorization.k8s.io/v1
  85. kind: ClusterRoleBinding
  86. metadata:
  87. name: popeye
  88. subjects:
  89. - kind: ServiceAccount
  90. name: popeye
  91. namespace: popeye
  92. roleRef:
  93. kind: ClusterRole
  94. name: popeye
  95. apiGroup: rbac.authorization.k8s.io