Skip to main content

Supported config sources

Config SourcemoduleDetails
BlobConfigSourcegestalt-azureLoads a config source from Azure Blob, Must include package com.github.gestalt-config:gestalt-azure:version.
ClassPathConfigSourcegestalt-coreLoad a file from the java class path. Uses getResourceAsStream to find and load the InputStream.
EnvironmentConfigSourcegestalt-coreLoads all Environment Variables in the system. It expects Env Vars to be in screaming snake case, and will parse the "_" as a path delimiter. will convert them to a list of key values from the Env Map for the config loader. You can provide a prefix to only load Environment Variables with the prefix. Then you can choose to keep the prefix or remove it.
FileConfigSourcegestalt-coreLoads a file from the local file system. The format for the source will depend on the file extension of the file. For example if it is dev.properties, the format will be properties. Returns a InpuStream for the config loader.
InputStreamConfigSourcegestalt-coreLoad a configuration from a InputStream. The format for the source will depend on the file extension of the file. For example if it is dev.properties, the format will be properties. Returns a InpuStream for the config loader.
KubernetesSecretConfigSourcegestalt-coreSpecify a path to search for kubernetes secrets files. The directory is scanned and each file is added to the configuration. The name of the file is treated as the key for configuration and the content of the file is the value for the configuration.
GCSConfigSourcegestalt-googleLoad a config from Google Cloud Storage. Requires a bucketName and a objectName. A google Storage object is optional, otherwise it defaults to the default instance.
GitConfigSourcegestalt-gitSyncs a remote repo locally then uses the files to build a configuration. This uses jgit and supports several forms of authentication. See GitConfigSourceTest.java for examples of use.
MapConfigSourcegestalt-coreAllows you to pass in your own map, it will convert the map into a list of path and value for the config loader.
StringConfigSourcegestalt-coreTakes any string and converts it into a InputStream. You must also provide the format type so we can match it to a loader.
SystemPropertiesConfigSourcegestalt-coreLoads the Java System Properties and convert them to a list of key values or the config loader.
S3ConfigSourcegestalt-awsLoads a config source from AWS S3, Must include package com.github.gestalt-config:gestalt-aws:version.
URLConfigSourcegestalt-coreLoads a config source from a URL.