forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.go
141 lines (122 loc) · 6.33 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package bootstrappolicy
// known namespaces
const (
DefaultOpenShiftSharedResourcesNamespace = "openshift"
DefaultOpenShiftInfraNamespace = "openshift-infra"
DefaultOpenShiftNodeNamespace = "openshift-node"
)
// users
const (
DefaultServiceAccountName = "default"
BuilderServiceAccountName = "builder"
DeployerServiceAccountName = "deployer"
MasterUnqualifiedUsername = "openshift-master"
AggregatorUnqualifiedUsername = "openshift-aggregator"
MasterUsername = "system:" + MasterUnqualifiedUsername
AggregatorUsername = "system:" + AggregatorUnqualifiedUsername
SystemAdminUsername = "system:admin"
// Not granted any API permissions, just an identity for a client certificate for the API proxy to use
// Should not be changed without considering impact to pods that may be verifying this identity by default
MasterProxyUnqualifiedUsername = "master-proxy"
MasterProxyUsername = "system:" + MasterProxyUnqualifiedUsername
// Previous versions used this as the username for the master to connect to the kubelet
// This should remain in the default role bindings for the NodeAdmin role
LegacyMasterKubeletAdminClientUsername = "system:master"
MasterKubeletAdminClientUsername = "system:openshift-node-admin"
)
// groups
const (
UnauthenticatedUsername = "system:anonymous"
AuthenticatedGroup = "system:authenticated"
AuthenticatedOAuthGroup = "system:authenticated:oauth"
UnauthenticatedGroup = "system:unauthenticated"
ClusterAdminGroup = "system:cluster-admins"
ClusterReaderGroup = "system:cluster-readers"
MastersGroup = "system:masters"
NodesGroup = "system:nodes"
NodeAdminsGroup = "system:node-admins"
NodeReadersGroup = "system:node-readers"
)
// Roles
const (
ClusterAdminRoleName = "cluster-admin"
SudoerRoleName = "sudoer"
ScopeImpersonationRoleName = "system:scope-impersonation"
ClusterReaderRoleName = "cluster-reader"
StorageAdminRoleName = "storage-admin"
ClusterDebuggerRoleName = "cluster-debugger"
AdminRoleName = "admin"
EditRoleName = "edit"
ViewRoleName = "view"
SelfProvisionerRoleName = "self-provisioner"
BasicUserRoleName = "basic-user"
StatusCheckerRoleName = "cluster-status"
SelfAccessReviewerRoleName = "self-access-reviewer"
RegistryAdminRoleName = "registry-admin"
RegistryViewerRoleName = "registry-viewer"
RegistryEditorRoleName = "registry-editor"
TemplateServiceBrokerClientRoleName = "system:openshift:templateservicebroker-client"
BuildStrategyDockerRoleName = "system:build-strategy-docker"
BuildStrategyCustomRoleName = "system:build-strategy-custom"
BuildStrategySourceRoleName = "system:build-strategy-source"
BuildStrategyJenkinsPipelineRoleName = "system:build-strategy-jenkinspipeline"
ImageAuditorRoleName = "system:image-auditor"
ImagePullerRoleName = "system:image-puller"
ImagePusherRoleName = "system:image-pusher"
ImageBuilderRoleName = "system:image-builder"
ImagePrunerRoleName = "system:image-pruner"
ImageSignerRoleName = "system:image-signer"
DeployerRoleName = "system:deployer"
RouterRoleName = "system:router"
RegistryRoleName = "system:registry"
MasterRoleName = "system:master"
NodeRoleName = "system:node"
NodeProxierRoleName = "system:node-proxier"
SDNReaderRoleName = "system:sdn-reader"
SDNManagerRoleName = "system:sdn-manager"
OAuthTokenDeleterRoleName = "system:oauth-token-deleter"
WebHooksRoleName = "system:webhook"
DiscoveryRoleName = "system:discovery"
PersistentVolumeProvisionerRoleName = "system:persistent-volume-provisioner"
// NodeAdmin has full access to the API provided by the kubelet
NodeAdminRoleName = "system:node-admin"
// NodeReader has read access to the metrics and stats provided by the kubelet
NodeReaderRoleName = "system:node-reader"
OpenshiftSharedResourceViewRoleName = "shared-resource-viewer"
NodeBootstrapRoleName = "system:node-bootstrapper"
NodeConfigReaderRoleName = "system:node-config-reader"
)
// RoleBindings
const (
// Legacy roles that must continue to have a plural form
SelfAccessReviewerRoleBindingName = SelfAccessReviewerRoleName + "s"
SelfProvisionerRoleBindingName = SelfProvisionerRoleName + "s"
DeployerRoleBindingName = DeployerRoleName + "s"
ClusterAdminRoleBindingName = ClusterAdminRoleName + "s"
ClusterReaderRoleBindingName = ClusterReaderRoleName + "s"
BasicUserRoleBindingName = BasicUserRoleName + "s"
OAuthTokenDeleterRoleBindingName = OAuthTokenDeleterRoleName + "s"
StatusCheckerRoleBindingName = StatusCheckerRoleName + "-binding"
ImagePullerRoleBindingName = ImagePullerRoleName + "s"
ImageBuilderRoleBindingName = ImageBuilderRoleName + "s"
RouterRoleBindingName = RouterRoleName + "s"
RegistryRoleBindingName = RegistryRoleName + "s"
MasterRoleBindingName = MasterRoleName + "s"
NodeRoleBindingName = NodeRoleName + "s"
NodeProxierRoleBindingName = NodeProxierRoleName + "s"
NodeAdminRoleBindingName = NodeAdminRoleName + "s"
NodeReaderRoleBindingName = NodeReaderRoleName + "s"
SDNReaderRoleBindingName = SDNReaderRoleName + "s"
SDNManagerRoleBindingName = SDNManagerRoleName + "s"
WebHooksRoleBindingName = WebHooksRoleName + "s"
DiscoveryRoleBindingName = DiscoveryRoleName + "-binding"
RegistryAdminRoleBindingName = RegistryAdminRoleName + "s"
RegistryViewerRoleBindingName = RegistryViewerRoleName + "s"
RegistryEditorRoleBindingName = RegistryEditorRoleName + "s"
OpenshiftSharedResourceViewRoleBindingName = OpenshiftSharedResourceViewRoleName + "s"
// Bindings
BuildStrategyDockerRoleBindingName = BuildStrategyDockerRoleName + "-binding"
BuildStrategyCustomRoleBindingName = BuildStrategyCustomRoleName + "-binding"
BuildStrategySourceRoleBindingName = BuildStrategySourceRoleName + "-binding"
BuildStrategyJenkinsPipelineRoleBindingName = BuildStrategyJenkinsPipelineRoleName + "-binding"
)