config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 22 Imported by: 41

Documentation

Index

Constants

View Source
const (
	PLATO                   = "plato"
	ODYSSEIA_PATH           = "odysseia-greek"
	DefaultSidecarService   = "localhost:50051"
	DefaultKubeConfig       = "/.kube/config"
	DefaultNamespace        = "odysseia"
	DefaultPodname          = "somepod-08595-383"
	DefaultSearchWord       = "greek"
	DefaultRoleName         = "solon"
	DefaultJobName          = "demokritos"
	DefaultServiceAddress   = "http://odysseia-greek.internal"
	DefaultCaValidity       = "3650"
	DefaultCrdName          = "perikles-mapping"
	EnvHealthCheckOverwrite = "HEALTH_CHECK_OVERWRITE"
	EnvPodName              = "POD_NAME"
	EnvNamespace            = "NAMESPACE"
	EnvIndex                = "ELASTIC_ACCESS"
	EnvSecondaryIndex       = "ELASTIC_SECONDARY_ACCESS"
	EnvVaultService         = "VAULT_SERVICE"
	EnvSolonService         = "SOLON_SERVICE"
	EnvPtolemaiosService    = "PTOLEMAIOS_SERVICE"
	EnvHerodotosService     = "HERODOTOS_SERVICE"
	EnvAlexandrosService    = "ALEXANDROS_SERVICE"
	EnvSokratesService      = "SOKRATES_SERVICE"
	EnvDionysiosService     = "DIONYSIOS_SERVICE"
	EnvRunOnce              = "RUN_ONCE"
	EnvTlSKey               = "TLS_ENABLED"
	EnvKey                  = "ENV"
	EnvSearchWord           = "SEARCH_WORD"
	EnvRole                 = "ELASTIC_ROLE"
	EnvRoles                = "ELASTIC_ROLES"
	EnvIndexes              = "ELASTIC_INDEXES"
	EnvRootToken            = "VAULT_ROOT_TOKEN"
	EnvAuthMethod           = "AUTH_METHOD"
	EnvTLSEnabled           = "VAULT_TLS"
	EnvVaultRole            = "VAULT_ROLE"
	EnvKubePath             = "KUBE_PATH"
	EnvSidecarOverwrite     = "SIDECAR_OVERWRITE"
	EnvJobName              = "JOB_NAME"
	EnvCAValidity           = "CA_VALIDITY"
	EnvCrdName              = "CRD_NAME"
	EnvTLSFiles             = "TLS_FILES"
	EnvRootTlSDir           = "CERT_ROOT"
	AuthMethodKube          = "kubernetes"
	AuthMethodToken         = "token"

	DefaultRoleAnnotation   = "odysseia-greek/role"
	DefaultAccessAnnotation = "odysseia-greek/access"
	DefaultTLSFileLocation  = "/etc/certs"

	EnvTestOverWrite         = "TEST_OVERWRITE"
	EnvChannel               = "EUPALINOS_CHANNEL"
	EnvEupalinosService      = "EUPALINOS_SERVICE"
	DefaultEupalinosService  = "eupalinos:50051"
	DefaultParmenidesChannel = "parmenides"
	DefaultDutchChannel      = "mouseion"
	DefaultTracingName       = "agreus"
	HeaderKey                = "aischylos"
	CreatorElasticRole       = "creator"
	SeederElasticRole        = "seeder"
	HybridElasticRole        = "hybrid"
	ApiElasticRole           = "api"
	AliasElasticRole         = "alias"
	TracingElasticIndex      = "tracing"
)

Variables

This section is empty.

Functions

func BoolFromEnv

func BoolFromEnv(envName string) bool

func ConfigFromVault

func ConfigFromVault(optionalName ...string) (*pb.ElasticConfigVault, error)

ConfigFromVault establishes a gRPC connection to the Ptolemaios service, checks the health status, and retrieves a secret from the service. It retries with an increasing sleep time for establishing the gRPC connection and for the health check. The maximum sleep duration for the health check is capped at 8 seconds for the last 5 attempts. If successful, it returns the retrieved secret and nil error. If the maximum number of attempts is reached without success, it returns an error indicating the failure.

func CreateCertClient

func CreateCertClient(org []string) (certificates.CertClient, error)

func CreateNewRandomizer

func CreateNewRandomizer() (randomizer.Random, error)

func CreateOdysseiaClient

func CreateOdysseiaClient() (service.OdysseiaClient, error)

func OdysseiaRootPath

func OdysseiaRootPath(path string) string

func ParsedPodNameFromEnv

func ParsedPodNameFromEnv() string

func PlatoPath

func PlatoPath(path string) string

func RetrieveCertPathLocally

func RetrieveCertPathLocally(testOverwrite bool, service string) (cert string, key string)

func SliceFromEnv

func SliceFromEnv(sliceName string) []string

func StringFromEnv

func StringFromEnv(envName, defaultValue string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL