Documentation ¶
Index ¶
- Constants
- func CheckPushGatewayEnabled() bool
- func DisableDNSServer()
- func FatalOnAbsentKey(key string)
- func FatalOnAbsentKeyInMap(key string, conf map[string]string)
- func FatalOnAbsentKeysets(keyset1 []string, keyset2 []string)
- func GetCAKey() string
- func GetDataStoreConfig() map[string]string
- func GetDataStoreType() string
- func GetDebugLearnerOptions() string
- func GetEtcdCertLocation() string
- func GetEtcdEndpoints() []string
- func GetEtcdPassword() string
- func GetEtcdPrefix() string
- func GetEtcdUsername() string
- func GetFileContents(filename string) string
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetLCMSecret() string
- func GetLCMServiceAccount() string
- func GetLCMServiceName() string
- func GetLearnerKubeCAFile() string
- func GetLearnerKubeCertFile() string
- func GetLearnerKubeKeyFile() string
- func GetLearnerKubeToken() string
- func GetLearnerKubeTokenFile() string
- func GetLearnerKubeURL() string
- func GetLearnerNamespace() string
- func GetLearnerServiceAccount() string
- func GetMongoCertLocation() string
- func GetPodName() string
- func GetPodNamespace() string
- func GetPodNamespaceForPrometheus() string
- func GetPushgatewayURL() string
- func GetRatelimiterServiceName() string
- func GetResourceLimit() int
- func GetResourceLimitQuerySize() int
- func GetSSLSecret() string
- func GetServerCert() string
- func GetServerName() string
- func GetServerPrivateKey() string
- func GetString(key string) string
- func GetTDSServiceName() string
- func GetTrainerServiceName() string
- func GetValue(key string) string
- func GetVolumeSize() int64
- func InitViper()
- func IsFfDLExtendedEnabled() bool
- func IsTLSEnabled() bool
- func SetDefault(key string, value interface{})
Constants ¶
const ( // PortKey is a key for looking up the Port setting in the viper config. PortKey = "port" // ObjectStoreKey is a key for looking up the ObjectStore setting in the viper config. ObjectStoreKey = "objectstore" // LogLevelKey is a key for looking up the LogLevel setting in the viper config. LogLevelKey = "loglevel" // EnvKey is a key for looking up the Environment setting in the viper config. EnvKey = "env" // DNSServerKey is a key for looking up the DNS server setting in the viper config. DNSServerKey = "dns_server" // ETCDEndpoints ... ETCDEndpoints = "etcd.address" //ETCDUsername ... ETCDUsername = "etcd.username" //ETCDPassword ... ETCDPassword = "etcd.password" //ETCDPrefix ... ETCDPrefix = "etcd.prefix" // TLSKey is the config key for looking up whether TLS is enabled. TLSKey = "tls" // ServerCertKey is the config key for the TLS server certificate. ServerCertKey = "server_cert" // ServerPrivateKey is the config key for the TLS server private key. ServerPrivateKey = "server_private_key" // ServerNameKey is the config key for the TLS cert server name. ServerNameKey = "server_name" // CACertKey is the config key for the TLS cert authority. CACertKey = "ca_cert" // DLaaS image tag key is the config key that indicates which DLAAS images to use DLaaSImageTagKey = "image_tag" // ServiceTagKey is the config key that indicates the namespace under which the services are deployed. ServicesTagKey = "image_tag" // LearnerTagKey is the config key that indicates which learner images to use. LearnerTagKey = "learner_tag" // DataBrokerTagKey is the config key that indicates which data broker images to use. DataBrokerTagKey = "databroker_tag" // IBMDockerRegistryKey is the config key for the docker registry to use for hybrid deployments. IBMDockerRegistryKey = "ibm_docker_registry" // LearnerRegistryKey is the config key for the docker registry to use. LearnerRegistryKey = "learner_registry" // LearnerImagePullSecretKey is the config key for docker registry pull secret LearnerImagePullSecretKey = "learner_image_pull_secret" //Use by LCM to know where it is deployed LCMDeploymentKey = "lcm_deployment" // HybridEnv denotes a hybrid deployment on minikube and remote cluster. Used by LCM only HybridEnv = "hybrid" // LocalEnv denotes the value for the "local" environment configuration (non-Softlayer) LocalEnv = "local" // DevelopmentEnv denotes the value for the "development" SL environment configuration DevelopmentEnv = "development" // StagingEnv denotes the value for the "staging" SL environment configuration StagingEnv = "staging" // ProductionEnv denotes the value for the "production" SL environment configuration ProductionEnv = "production" LoggingType = "logging_type" LoggingTypeJson = "json" LoggingTypeText = "text" //PushMetricsEnabled whether push based metrics is enabled PushMetricsEnabled = "push_metrics_enabled" PodName = "pod.name" // PodNamespaceKey is the key to find the K8S namespace a pod is running in. PodNamespaceKey = "pod.namespace" // LearnerNamespaceKey is the key to find the K8S namespace learners are supposed to run in. LearnerKubeNamespaceKey = "learner.kube.namespace" // LearnerKubeServiceAccount is the key to find the K8S ServiceAccount that learners will use in order to be assigned a PodSecurityPolicy (ICP) LearnerKubeServiceAccount = "learner.kube.serviceaccount" // This is temporary until we support specifying storage requirements in the manifest. VolumeSize = "external_volume_size" // TODO this a duplication witht the storage package - needs to align UsernameKey = "user_name" PasswordKey = "password" AuthURLKey = "auth_url" DomainKey = "domain_name" RegionKey = "region" ProjectKey = "project_id" StorageType = "type" DebugLearnerOptions = "learner.debug" // possible value for DebugLearnerOptions // learner pods should not be cleaned up NoCleanup = "nocleanup" DlaasResourceLimit = "resource.limit" DlaasResourceLimitQuerySize = "resource.limit.query.size" TrainerServiceName = "trainer.service.name" LCMServiceName = "lcm.service.name" RatelimiterServiceName = "ratelimiter.service.name" TDSServiceName = "tds.service.name" // If this is true, the LCM will use the non-split configuration, // and will use the host mount on the nodes for logs and emetrics // (and control data), and will launch fluentd on each node. // Will be DLAAS_LCM_FLUENT_EMETRICS_ENABLE in environment. LcmFluentdEmetricsEnable = "lcm.fluentd.emetrics.enable" // If this is true, the log collectors will still push to // the tds. If it is false, the emetrics 1.0 will not be pushed // to the tds, and the 1.0 files will not be written to the // user's COS. The emetrics 2.0.0 files will be written in // in either case, for pickup by the fluentd collectors on // each node. // Will be DLAAS_LOGCOLLECTOR_EMETRICS_TDS_PUSH_ENABLED in environment. LogcollectorEmetricsTdsPushEnabled = "logcollector.emetrics.tds.push.enabled" // The serviceaccount that LCM and jobmonitor uses, which has permissions to get pods LCMServiceAccount = "lcm.serviceaccount" // Secret name for LCM secrets LCMSecretName = "lcm.secret" // Secret name for LCM secrets SSLSecretName = "ssl.secret" // FfDLExtendedEnabled tells if we should be using FfDL extended learner mechanism FfDLExtendedEnabled = "ffdl.extended" )
Variables ¶
This section is empty.
Functions ¶
func CheckPushGatewayEnabled ¶
func CheckPushGatewayEnabled() bool
CheckPushGatewayEnabled ... for sending out metrics
func DisableDNSServer ¶
func DisableDNSServer()
DisableDNSServer disables the DNS server in the global config. This is usefule for testing.
func FatalOnAbsentKey ¶
func FatalOnAbsentKey(key string)
FatalOnAbsentKey fails if the key is absent.
func FatalOnAbsentKeyInMap ¶
FatalOnAbsentKeyInMap fails if the key is absent in the conf map.
func FatalOnAbsentKeysets ¶
FatalOnAbsentKeysets fatals if either set of keys is not set correctly. (i.e., keys of `keyset1` xor `keyset2` are not set)
func GetCAKey ¶
func GetCAKey() string
GetCAKey gets the CA certificate file name for clients to use
func GetDataStoreConfig ¶
GetDataStoreConfig returns the configuration for the internal data store used to store model configuration, trained models, etc. TODO rename this config to data_store later
func GetDataStoreType ¶
func GetDataStoreType() string
GetDataStoreType returns the configuration type for the internal data store.
func GetDebugLearnerOptions ¶
func GetDebugLearnerOptions() string
GetDebugLearnerOptions returns comma separated list of options for debugging learners
func GetFileContents ¶
Return the contents of a file. Return an empty string if the file doesn't exist or can't be read.
func GetFloat64 ¶
GetFloat64 returns the float64 value for the config key.
func GetLearnerNamespace ¶
func GetLearnerNamespace() string
GetLearnerNamespace gets the namespace where the learners should run.
func GetLearnerServiceAccount ¶
func GetLearnerServiceAccount() string
GetLearnerServiceAccount gets the serviceaccount that learners will use to be assigned a PodSecurityPolicy (ICP)
func GetPodName ¶
func GetPodName() string
func GetPodNamespace ¶
func GetPodNamespace() string
GetPodNamespace gets the namespace of a POD or returns the default one.
func GetPodNamespaceForPrometheus ¶
func GetPodNamespaceForPrometheus() string
func GetRatelimiterServiceName ¶
func GetRatelimiterServiceName() string
GetRatelimiterServiceName ...
func GetServerCert ¶
func GetServerCert() string
GetServerCert gets the server's TLS certificate file name.
func GetServerName ¶
func GetServerName() string
GetServerName gets the server name that is encoded in the TLS certificate.
func GetServerPrivateKey ¶
func GetServerPrivateKey() string
GetServerPrivateKey gets the private key file name of the server.
func GetVolumeSize ¶
func GetVolumeSize() int64
GetVolumeSize returns the size (in bytes) of the external volume to use. If 0, don't use an external volume.
func IsFfDLExtendedEnabled ¶
func IsFfDLExtendedEnabled() bool
func IsTLSEnabled ¶
func IsTLSEnabled() bool
IsTLSEnabled is true if the microservices should all use TLS for communiction, otherwise it is false.
func SetDefault ¶
func SetDefault(key string, value interface{})
SetDefault sets the default value for the config key.
Types ¶
This section is empty.