Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDeveloperUser users to access the cluster rest API DefaultDeveloperUser = "developer" // DefaultCacheName default cache name for the CacheService DefaultCacheName = "default" AdminUsernameKey = "username" AdminPasswordKey = "password" InfinispanAdminPort = 11223 InfinispanAdminPortName = "infinispan-adm" InfinispanJmxPort = 9999 InfinispanJmxPortName = "jfr-jmx" // Jmx constant required for automatic lookup of JMX endpoint InfinispanPingPort = 8888 InfinispanPingPortName = "ping" InfinispanUserPort = 11222 InfinispanUserPortName = "infinispan" CrossSitePort = 7900 CrossSitePortName = "xsite" GossipRouterDiagPort = 7500 StatefulSetPodLabel = "app.kubernetes.io/created-by" StaticCrossSiteUriSchema = "infinispan+xsite" CacheServiceFixedMemoryXmxMb = 200 CacheServiceJvmNativeMb = 220 CacheServiceMinHeapFreeRatio = 5 CacheServiceMaxHeapFreeRatio = 10 CacheServiceJvmNativePercentageOverhead = 1 CacheServiceMaxRamMb = CacheServiceFixedMemoryXmxMb + CacheServiceJvmNativeMb CacheServiceJavaOptions = "" /* 134-byte string literal not displayed */ CacheServiceNativeJavaOptions = "-Xmx%dM -Xms%dM -Dsun.zip.disableMemoryMapping=true %s" NativeImageMarker = "native" GeneratedSecretSuffix = "generated-secret" InfinispanFinalizer = "finalizer.infinispan.org" ServerEncryptRoot = "/etc/encrypt" ServerEncryptTruststoreRoot = ServerEncryptRoot + "/truststore" ServerEncryptKeystoreRoot = ServerEncryptRoot + "/keystore" SiteTransportKeyStoreRoot = ServerEncryptRoot + "/transport-site-tls" SiteRouterKeyStoreRoot = ServerEncryptRoot + "/router-site-tls" SiteTrustStoreRoot = ServerEncryptRoot + "/truststore-site-tls" ServerSecurityRoot = "/etc/security" ServerIdentitiesFilename = "identities.yaml" CliPropertiesFilename = "cli.properties" ServerIdentitiesBatchFilename = "identities.cli" ServerAdminIdentitiesRoot = ServerSecurityRoot + "/admin" ServerUserIdentitiesRoot = ServerSecurityRoot + "/user" ServerOperatorSecurity = ServerSecurityRoot + "/conf/operator-security" ServerRoot = "/opt/infinispan/server" EncryptTruststoreKey = "truststore.p12" EncryptTruststorePasswordKey = "truststore-password" DefaultCacheTemplate = `` /* 318-byte string literal not displayed */ )
View Source
const ( //DefaultWaitOnCluster delay for the Infinispan cluster wait if it not created while Cache creation DefaultWaitOnCluster = 10 * time.Second // DefaultWaitOnCreateResource delay for wait until resource (Secret, ConfigMap, Service) is created DefaultWaitOnCreateResource = 2 * time.Second // DefaultLongWaitOnCreateResource delay for wait until non core resource is create (only Grafana CRD atm) DefaultLongWaitOnCreateResource = 60 * time.Second //DefaultWaitClusterNotWellFormed wait delay until cluster is not well formed DefaultWaitClusterNotWellFormed = 15 * time.Second // DefaultWaitPodsNotReady wait delay until cluster pods are ready DefaultWaitClusterPodsNotReady = 2 * time.Second )
View Source
const ( DefaultSiteKeyStoreFileName = "keystore.p12" DefaultSiteTransportKeyStoreAlias = "transport" DefaultSiteRouterKeyStoreAlias = "router" DefaultSiteTrustStoreFileName = "truststore.p12" )
View Source
const ( AnnotationDomain = "infinispan.org/" ListenerAnnotationGeneration = AnnotationDomain + "listener-generation" ListenerAnnotationDelete = AnnotationDomain + "listener-delete" ListenerControllerDelete = AnnotationDomain + "controller-delete" )
View Source
const DefaultKubeConfig = "~/.kube/config"
Variables ¶
View Source
var ( // InitContainerImageName allows a custom initContainer image to be used InitContainerImageName = GetEnvWithDefault("INITCONTAINER_IMAGE", "registry.access.redhat.com/ubi8-micro") // ConfigListenerImageName is the image used by the ConfigListener Deployment ConfigListenerImageName = os.Getenv(ConfigListenerEnvName) ConfigListenerEnvName = "CONFIG_LISTENER_IMAGE" // JGroupsDiagnosticsFlag is used to enable traces for JGroups JGroupsDiagnosticsFlag = GetEnvBool("JGROUPS_DIAGNOSTICS") // ThreadDumpPreStopFlag is used to print a server thread dump on container stop ThreadDumpPreStopFlag = GetEnvBool("THREAD_DUMP_PRE_STOP") // DefaultMemorySize string with default size for memory DefaultMemorySize = resource.MustParse("1Gi") // DefaultPVSize default size for persistent volume DefaultPVSize = resource.MustParse("1Gi") DeploymentAnnotations = map[string]string{ "openshift.io/display-name": "Infinispan Cluster", "openshift.io/documentation-url": "http://infinispan.org/documentation/", } SystemPodLabels = map[string]bool{ appsv1.StatefulSetPodNameLabel: true, appsv1.StatefulSetRevisionLabel: true, StatefulSetPodLabel: true, } JGroupsFastMerge = strings.ToUpper(GetEnvWithDefault("TEST_ENVIRONMENT", "false")) == "TRUE" // 14.0.24.Final required to enable expiry in Gossip Router MinVersionGossipRouterHeartBeat = semver.Version{ Major: 14, Minor: 0, Patch: 24, } // 15.0.7.Final required to support the automatic reloading of TLS certs MinVersionAutomaticCertificateReloading = semver.Version{ Major: 15, Minor: 0, Patch: 7, } )
Functions ¶
func GetEnvBool ¶
func GetEnvWithDefault ¶
GetEnvWithDefault return os.Getenv(name) if exists else return defValue
func GetWithDefault ¶
GetWithDefault return value if not empty else return defValue
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.