()
| 56 | } |
| 57 | |
| 58 | func getSpecClusterRole() (*v1.ClusterRole, error) { |
| 59 | clusterRole := &v1.ClusterRole{ |
| 60 | ObjectMeta: metav1.ObjectMeta{ |
| 61 | Name: server.WebhookServerSAName, |
| 62 | Labels: server.WebhookServerAppLabels(), |
| 63 | }, |
| 64 | Rules: []v1.PolicyRule{ |
| 65 | { |
| 66 | APIGroups: []string{ |
| 67 | "admissionregistration.k8s.io", |
| 68 | }, |
| 69 | Resources: []string{ |
| 70 | "mutatingwebhookconfigurations", |
| 71 | "validatingwebhookconfigurations", |
| 72 | }, |
| 73 | Verbs: []string{ |
| 74 | "create", |
| 75 | "list", |
| 76 | "watch", |
| 77 | "get", |
| 78 | "patch", |
| 79 | "update", |
| 80 | }, |
| 81 | }, |
| 82 | { |
| 83 | APIGroups: []string{ |
| 84 | "", |
| 85 | }, |
| 86 | Resources: []string{ |
| 87 | "serviceaccounts", |
| 88 | }, |
| 89 | Verbs: []string{ |
| 90 | "get", |
| 91 | }, |
| 92 | }, |
| 93 | { |
| 94 | APIGroups: []string{ |
| 95 | "", |
| 96 | }, |
| 97 | Resources: []string{ |
| 98 | "pods", |
| 99 | }, |
| 100 | Verbs: []string{ |
| 101 | "get", |
| 102 | "list", |
| 103 | "watch", |
| 104 | }, |
| 105 | }, |
| 106 | { |
| 107 | APIGroups: []string{ |
| 108 | "authentication.k8s.io", |
| 109 | }, |
| 110 | Resources: []string{ |
| 111 | "tokenreviews", |
| 112 | }, |
| 113 | Verbs: []string{ |
| 114 | "create", |
| 115 | }, |
no outgoing calls
no test coverage detected