Created
January 9, 2024 22:07
-
-
Save Informatic/e129c26342dabdc75102000f85874a02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This ClusterRole is bound to all humans that log in via prodaccess/prodvider/SSO. | |
// It should allow viewing of non-sensitive data for debugability and openness. | |
crViewer: kube.ClusterRole("system:viewer") { | |
rules: [ | |
{ | |
apiGroups: [""], | |
resources: [ | |
"nodes", | |
"namespaces", | |
"pods", | |
"configmaps", | |
"services", | |
"rolebindings", | |
], | |
verbs: ["list"], | |
}, | |
{ | |
apiGroups: ["metrics.k8s.io"], | |
resources: [ | |
"nodes", | |
"pods", | |
], | |
verbs: ["list"], | |
}, | |
{ | |
apiGroups: ["apps"], | |
resources: [ | |
"statefulsets", | |
], | |
verbs: ["list"], | |
}, | |
{ | |
apiGroups: ["extensions"], | |
resources: [ | |
"deployments", | |
"ingresses", | |
], | |
verbs: ["list"], | |
}, | |
{ | |
apiGroups: ["rbac.authorization.k8s.io"], | |
resources: [ | |
"clusterroles", | |
"roles", | |
"clusterrolebindings", | |
"rolebindings", | |
], | |
verbs: ["list", "get"], | |
}, | |
], | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment