Class ConfigurationBuilderExtensions
- Namespace
- Steeltoe.Configuration.Kubernetes.ServiceBindings
- Assembly
- Steeltoe.Configuration.Kubernetes.ServiceBindings.dll
Extension methods for registering Kubernetes Steeltoe.Configuration.Kubernetes.ServiceBindings.KubernetesServiceBindingConfigurationProvider with IConfigurationBuilder.
public static class ConfigurationBuilderExtensions
- Inheritance
-
ConfigurationBuilderExtensions
- Inherited Members
Methods
AddKubernetesServiceBindings(IConfigurationBuilder)
Adds configuration using files from the directory path specified by the environment variable "SERVICE_BINDING_ROOT". File name and directory paths are used as the key, and the file contents are used as the values.
public static IConfigurationBuilder AddKubernetesServiceBindings(this IConfigurationBuilder builder)
Parameters
builderIConfigurationBuilderThe IConfigurationBuilder to add configuration to.
Returns
- IConfigurationBuilder
The incoming
builderso that additional calls can be chained.
AddKubernetesServiceBindings(IConfigurationBuilder, IServiceBindingsReader)
Adds configuration using files from the directory path specified by the environment variable "SERVICE_BINDING_ROOT". File name and directory paths are used as the key, and the file contents are used as the values.
public static IConfigurationBuilder AddKubernetesServiceBindings(this IConfigurationBuilder builder, IServiceBindingsReader serviceBindingsReader)
Parameters
builderIConfigurationBuilderThe IConfigurationBuilder to add configuration to.
serviceBindingsReaderIServiceBindingsReaderThe source to read Kubernetes secret files on disk from.
Returns
- IConfigurationBuilder
The incoming
builderso that additional calls can be chained.
AddKubernetesServiceBindings(IConfigurationBuilder, bool, bool, Predicate<string>, IServiceBindingsReader, ILoggerFactory)
Adds configuration using files from the directory path specified by the environment variable "SERVICE_BINDING_ROOT". File name and directory paths are used as the key, and the file contents are used as the values.
public static IConfigurationBuilder AddKubernetesServiceBindings(this IConfigurationBuilder builder, bool optional, bool reloadOnChange, Predicate<string> ignoreKeyPredicate, IServiceBindingsReader serviceBindingsReader, ILoggerFactory loggerFactory)
Parameters
builderIConfigurationBuilderThe IConfigurationBuilder to add configuration to.
optionalboolWhether the directory path is optional.
reloadOnChangeboolWhether the configuration should be reloaded if the files are changed, added or removed.
ignoreKeyPredicatePredicate<string>A predicate that is called before adding a key to the configuration. If it returns false, the key will be ignored.
serviceBindingsReaderIServiceBindingsReaderThe source to read Kubernetes secret files on disk from.
loggerFactoryILoggerFactoryUsed for internal logging. Pass Instance to disable logging.
Returns
- IConfigurationBuilder
The incoming
builderso that additional calls can be chained.