-
Notifications
You must be signed in to change notification settings - Fork 157
/
constants.go
86 lines (70 loc) · 2.57 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
package naming
// These labels are only used on the ClusterIP services
// acting as each member's identity (static ip).
// Each of these labels is a record of intent to do
// something. The controller sets these labels and each
// member watches for them and takes the appropriate
// actions.
//
// See the sidecar design doc for more details.
const (
// SeedLabel determines if a member is a seed or not.
SeedLabel = "scylla/seed"
// DecommissionLabel expresses the intent to decommission
// the specific member. The presence of the label expresses
// the intent to decommission. If the value is true, it means
// the member has finished decommissioning.
// Values: {true, false}
DecommissionLabel = "scylla/decommissioned"
// ReplaceLabel express the intent to replace pod under the specific member.
ReplaceLabel = "scylla/replace"
// NodeMaintenanceLabel means that node is under maintenance.
// Readiness check will always fail when this label is added to member service.
NodeMaintenanceLabel = "scylla/node-maintenance"
LabelValueTrue = "true"
LabelValueFalse = "false"
)
// Generic Labels used on objects created by the operator.
const (
ClusterNameLabel = "scylla/cluster"
DatacenterNameLabel = "scylla/datacenter"
RackNameLabel = "scylla/rack"
AppName = "scylla"
OperatorAppName = "scylla-operator"
ManagerAppName = "scylla-manager"
PrometheusScrapeAnnotation = "prometheus.io/scrape"
PrometheusPortAnnotation = "prometheus.io/port"
)
// Environment Variables
const (
EnvVarEnvVarPodName = "POD_NAME"
EnvVarPodNamespace = "POD_NAMESPACE"
EnvVarCPU = "CPU"
)
// Recorder Values
const (
// SuccessSynced is used as part of the Event 'reason' when a Cluster is
// synced.
SuccessSynced = "Synced"
// ErrResourceExists is used as part of the Event 'reason' when a
// Cluster fails to sync due to a resource of the same name already
// existing.
ErrSyncFailed = "ErrSyncFailed"
)
// Configuration Values
const (
ScyllaContainerName = "scylla"
PVCTemplateName = "data"
SharedDirName = "/mnt/shared"
ScyllaConfigDirName = "/mnt/scylla-config"
ScyllaAgentConfigDirName = "/mnt/scylla-agent-config"
ScyllaAgentConfigDefaultFile = "/etc/scylla-manager-agent/scylla-manager-agent.yaml"
ScyllaClientConfigDirName = "/mnt/scylla-client-config"
ScyllaClientConfigFileName = "scylla-client.yaml"
ScyllaConfigName = "scylla.yaml"
ScyllaRackDCPropertiesName = "cassandra-rackdc.properties"
DataDir = "/var/lib/scylla"
ReadinessProbePath = "/readyz"
LivenessProbePath = "/healthz"
ProbePort = 8080
)