-
Notifications
You must be signed in to change notification settings - Fork 39
/
constants.go
51 lines (46 loc) · 2.18 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
package resources
import (
"os"
)
const (
// HTTPApplicationPort is the HTTP port for the application domain
HTTPApplicationPort int32 = 8080
// HTTPManagementPort is the HTTP port for the management domain
HTTPManagementPort int32 = 9990
// MarkerServiceActive marks a pod as actively served by its service
MarkerServiceActive = "active"
// MarkerOperatedByLoadbalancer is a label used to remove a pod from receiving load from loadbalancer during transaction recovery
MarkerOperatedByLoadbalancer = "wildfly.org/operated-by-loadbalancer"
// MarkerOperatedByHeadless is a label used to remove a pod from receiving load from headless service when it's cleaned to shutdown
MarkerOperatedByHeadless = "wildfly.org/operated-by-headless"
// MarkerImageType is an annotation that tell us if the pod is a bootable-jar image or an generic one
MarkerImageType = "wildfly.org/server-type"
// ImageTypeGeneric is one of the possible values for MarkerImageType annotation
ImageTypeGeneric = "generic"
// ImageTypeGeneric is one of the possible values for MarkerImageType annotation denoting a bootable JAR type image
ImageTypeBootable = "bootable-jar"
// SecretsDir is the the directory to mount volumes from Secrets
SecretsDir = "/etc/secrets/"
// ConfigMapsDir is the the directory to mount volumes from ConfigMaps
ConfigMapsDir = "/etc/configmaps/"
// StatefuleSetTemplateLabelsEnvVarName is the name of the envvar containg label/value map for pods created from the statefulset's template
StatefuleSetTemplateLabelsEnvVarName string = "STATEFULSET_TEMPLATE_LABELS"
)
var (
// StandaloneServerDataDirRelativePath is the path to the server standalone data directory
StandaloneServerDataDirRelativePath = "standalone/data"
)
// JBossHome is read from the env var JBOSS_HOME or, in case of a Bootable JAR, from JBOSS_BOOTABLE_HOME
func JBossHome(bootable bool) string {
if bootable {
return os.Getenv("JBOSS_BOOTABLE_HOME")
}
return os.Getenv("JBOSS_HOME")
}
// JBossHome is read from the env var JBOSS_HOME or, in case of a Bootable JAR, from JBOSS_BOOTABLE_DATA_DIR
func JBossHomeDataDir(bootable bool) string {
if bootable {
return os.Getenv("JBOSS_BOOTABLE_DATA_DIR")
}
return os.Getenv("JBOSS_HOME")
}