-
Notifications
You must be signed in to change notification settings - Fork 40
/
register.go
72 lines (54 loc) · 2.61 KB
/
register.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
// Copyright 2022 Google LLC
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// 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.
package configmanagement
const (
// CLIName is the short name of the CLI.
CLIName = "nomos"
// MetricsNamespace is the namespace that metrics are held in.
MetricsNamespace = "gkeconfig"
// GroupName is the name of the group of configmanagement resources.
GroupName = "configmanagement.gke.io"
// ProductName is what we call Nomos externally.
ProductName = "Anthos Configuration Management"
// ControllerNamespace is the Namespace used for Nomos controllers
ControllerNamespace = "config-management-system"
// OperatorKind is the Kind of the Operator config object.
OperatorKind = "ConfigManagement"
// SyncKind is the string constant for the Sync GroupVersionKind
SyncKind = "Sync"
// RepoKind is the string constant for the Repo GroupVersionKind
RepoKind = "Repo"
// ClusterSelectorKind is the string constant for the ClusterSelector GroupVersionKind
ClusterSelectorKind = "ClusterSelector"
// NamespaceSelectorKind is the string constant for the NamespaceSelector GroupVersionKind
NamespaceSelectorKind = "NamespaceSelector"
// NamespaceConfigKind is the string constant for the NamespaceConfig GroupVersionKind
NamespaceConfigKind = "NamespaceConfig"
// ClusterConfigKind is the string constant for the ClusterConfig GroupVersionKind
ClusterConfigKind = "ClusterConfig"
// HierarchyConfigKind is the string constant for the HierarchyConfig GroupVersionKind
HierarchyConfigKind = "HierarchyConfig"
// RGControllerNamespace is the namespace used for the resource-group controller
RGControllerNamespace = "resource-group-system"
// MonitoringNamespace is the namespace used for Config Sync monitoring
MonitoringNamespace = "config-management-monitoring"
// RGControllerName is the name used for the resource-group controller
RGControllerName = "resource-group-controller-manager"
)
// IsControllerNamespace returns true if the namespace is one of the Config Sync controller Namespace.
func IsControllerNamespace(name string) bool {
return name == ControllerNamespace ||
name == RGControllerNamespace ||
name == MonitoringNamespace
}