MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / getSpecClusterRole

Function getSpecClusterRole

pkg/webhook/cluster_roles.go:58–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58func 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 },

Callers 1

CreateWebhookClusterRoleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected