Class IServiceCollectionExtensions
- Namespace
- Steeltoe.Common.Kubernetes
- Assembly
- Steeltoe.Common.Kubernetes.dll
public static class IServiceCollectionExtensions
- Inheritance
-
IServiceCollectionExtensions
- Inherited Members
Methods
AddKubernetesApplicationInstanceInfo(IServiceCollection)
Removes any existing IApplicationInstanceInfo if found. Registers a KubernetesApplicationOptions
public static IServiceCollection AddKubernetesApplicationInstanceInfo(this IServiceCollection serviceCollection)
Parameters
serviceCollection
IServiceCollectionCollection of configured services
Returns
- IServiceCollection
AddKubernetesClient(IServiceCollection, Action<KubernetesClientConfiguration>)
Add a k8s.IKubernetes client to the service collection
public static IServiceCollection AddKubernetesClient(this IServiceCollection serviceCollection, Action<KubernetesClientConfiguration> kubernetesClientConfiguration = null)
Parameters
serviceCollection
IServiceCollectionMicrosoft.Extensions.DependencyInjection.IServiceCollection
kubernetesClientConfiguration
Action<KubernetesClientConfiguration>Customization of the Kubernetes Client
Returns
- IServiceCollection
Collection of configured services
GetKubernetesApplicationOptions(IServiceCollection)
Retrieves KubernetesApplicationOptions from the service collection
[Obsolete("This method builds a temporary service provider and should not be used")]
public static IApplicationInstanceInfo GetKubernetesApplicationOptions(this IServiceCollection serviceCollection)
Parameters
serviceCollection
IServiceCollectionCollection of configured services