-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.go
69 lines (55 loc) · 2.42 KB
/
settings.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
/*
Copyright 2018 Pressinfra SRL
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 mysqlcluster
import (
"github.com/presslabs/mysql-operator/pkg/util/constants"
"k8s.io/apimachinery/pkg/util/intstr"
)
// TODO: make those consts private and move them in the file where are used.
const (
// MysqlPortName represents the mysql port name.
MysqlPortName = "mysql"
// MysqlPort is the default mysql port.
MysqlPort = constants.MysqlPort
// OrcTopologyDir path where orc conf secret is mounted
OrcTopologyDir = constants.OrcTopologyDir
// SidecarServerPortName name of the port
SidecarServerPortName = "sidecar-http"
// SidecarServerPort represents the port on which http server will run
SidecarServerPort = constants.SidecarServerPort
// SidecarServerProbePath the probe path
SidecarServerProbePath = constants.SidecarServerProbePath
// ExporterPort is the port that metrics will be exported
ExporterPort = constants.ExporterPort
//ExporterPortName the name of the metrics exporter port
ExporterPortName = "prometheus"
// ExporterPath is the path on which metrics are expose
ExporterPath = constants.ExporterPath
// ConfVolumeMountPath is the path where mysql configs will be mounted
ConfVolumeMountPath = constants.ConfVolumeMountPath
// DataVolumeMountPath is the path to mysql data
DataVolumeMountPath = constants.DataVolumeMountPath
// TmpfsVolumeMountPath is the path for the tmpfs mount
TmpfsVolumeMountPath = constants.TmpfsVolumeMountPath
// ConfMapVolumeMountPath represents the temp config mount path in init containers
ConfMapVolumeMountPath = constants.ConfMapVolumeMountPath
// ConfDPath is the path to extra mysql configs dir
ConfDPath = constants.ConfDPath
confClientPath = constants.ConfClientPath
)
var (
// TargetPort is the mysql port that is set for headless service and should be string
TargetPort = intstr.FromInt(MysqlPort)
// ExporterTargetPort is the port for the exporter
ExporterTargetPort = intstr.FromInt(ExporterPort)
)