constants.go 4.1 KB
Newer Older
H
hongming 已提交
1
/*
H
hongming 已提交
2
Copyright 2019 The KubeSphere Authors.
H
hongming 已提交
3

H
hongming 已提交
4 5 6
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
H
hongming 已提交
7

H
hongming 已提交
8
    http://www.apache.org/licenses/LICENSE-2.0
H
hongming 已提交
9

H
hongming 已提交
10 11 12 13 14
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
H
hongming 已提交
15
*/
H
hongming 已提交
16

H
hongming 已提交
17
package constants
J
jeff 已提交
18 19 20 21

const (
	APIVersion = "v1alpha1"

J
Jeff 已提交
22 23
	KubeSystemNamespace           = "kube-system"
	OpenPitrixNamespace           = "openpitrix-system"
R
runzexia 已提交
24
	KubesphereDevOpsNamespace     = "kubesphere-devops-system"
J
Jeff 已提交
25 26 27 28 29
	IstioNamespace                = "istio-system"
	KubeSphereMonitoringNamespace = "kubesphere-monitoring-system"
	KubeSphereLoggingNamespace    = "kubesphere-logging-system"
	KubeSphereNamespace           = "kubesphere-system"
	KubeSphereControlNamespace    = "kubesphere-controls-system"
M
magicsong 已提交
30
	PorterNamespace               = "porter-system"
J
Jeff 已提交
31 32 33
	IngressControllerNamespace    = KubeSphereControlNamespace
	AdminUserName                 = "admin"
	IngressControllerPrefix       = "kubesphere-router-"
J
jeff 已提交
34

H
hongming 已提交
35
	WorkspaceLabelKey              = "kubesphere.io/workspace"
D
Duan Jiong 已提交
36
	NamespaceLabelKey              = "kubesphere.io/namespace"
P
pengcong06 已提交
37
	RuntimeLabelKey                = "openpitrix.io/namespace"
H
hongming 已提交
38 39 40
	DisplayNameAnnotationKey       = "kubesphere.io/alias-name"
	DescriptionAnnotationKey       = "kubesphere.io/description"
	CreatorAnnotationKey           = "kubesphere.io/creator"
41
	UsernameLabelKey               = "kubesphere.io/username"
H
hongming 已提交
42
	System                         = "system"
H
hongming 已提交
43 44 45 46 47
	OpenPitrixRuntimeAnnotationKey = "openpitrix_runtime"
	WorkspaceAdmin                 = "workspace-admin"
	ClusterAdmin                   = "cluster-admin"
	WorkspaceRegular               = "workspace-regular"
	WorkspaceViewer                = "workspace-viewer"
H
hongming 已提交
48
	WorkspacesManager              = "workspaces-manager"
H
hongming 已提交
49 50
	DevopsOwner                    = "owner"
	DevopsReporter                 = "reporter"
R
runzexia 已提交
51
	DevOpsProjectLabelKey          = "kubesphere.io/devopsproject"
52
	KubefedManagedLabel            = "kubefed.io/managed"
J
jeff 已提交
53

H
hongming 已提交
54
	UserNameHeader = "X-Token-Username"
H
hongming 已提交
55

R
runzexia 已提交
56 57 58 59 60 61
	TenantResourcesTag         = "Tenant Resources"
	IdentityManagementTag      = "Identity Management"
	AccessManagementTag        = "Access Management"
	NamespaceResourcesTag      = "Namespace Resources"
	ClusterResourcesTag        = "Cluster Resources"
	ComponentStatusTag         = "Component Status"
H
hongming 已提交
62
	OpenpitrixTag              = "Openpitrix Resources"
R
runzexia 已提交
63
	VerificationTag            = "Verification"
S
soulseen 已提交
64
	RegistryTag                = "Docker Registry"
Z
Zhengyi Lai 已提交
65
	NetworkTopologyTag         = "Network Topology"
R
runzexia 已提交
66 67 68 69 70 71 72 73
	UserResourcesTag           = "User Resources"
	DevOpsProjectTag           = "DevOps Project"
	DevOpsProjectCredentialTag = "DevOps Project Credential"
	DevOpsProjectMemberTag     = "DevOps Project Member"
	DevOpsPipelineTag          = "DevOps Pipeline"
	DevOpsWebhookTag           = "DevOps Webhook"
	DevOpsJenkinsfileTag       = "DevOps Jenkinsfile"
	DevOpsScmTag               = "DevOps Scm"
H
huanggze 已提交
74
	KubeSphereMetricsTag       = "KubeSphere Metrics"
R
runzexia 已提交
75 76 77 78
	ClusterMetricsTag          = "Cluster Metrics"
	NodeMetricsTag             = "Node Metrics"
	NamespaceMetricsTag        = "Namespace Metrics"
	PodMetricsTag              = "Pod Metrics"
X
Xin Wang 已提交
79
	PVCMetricsTag              = "PVC Metrics"
R
runzexia 已提交
80 81 82 83
	ContainerMetricsTag        = "Container Metrics"
	WorkloadMetricsTag         = "Workload Metrics"
	WorkspaceMetricsTag        = "Workspace Metrics"
	ComponentMetricsTag        = "Component Metrics"
H
huanggze 已提交
84
	CustomMetricsTag           = "Custom Metrics"
R
runzexia 已提交
85
	LogQueryTag                = "Log Query"
H
hongming 已提交
86
	TerminalTag                = "Terminal"
J
junotx 已提交
87
	EventsQueryTag             = "Events Query"
R
root 已提交
88
	AuditingQueryTag           = "Auditing Query"
J
jeff 已提交
89 90 91
)

var (
H
hongming 已提交
92
	WorkSpaceRoles   = []string{WorkspaceAdmin, WorkspaceRegular, WorkspaceViewer}
M
magicsong 已提交
93
	SystemNamespaces = []string{KubeSphereNamespace, KubeSphereLoggingNamespace, KubeSphereMonitoringNamespace, OpenPitrixNamespace, KubeSystemNamespace, IstioNamespace, KubesphereDevOpsNamespace, PorterNamespace}
J
jeff 已提交
94
)