Open ugumba opened 5 years ago
Yeah - I can see why that doesn’t work (to be honest I’ve never tried using more than one ConfigMap to source configuration from) but it’s a valid use case. I should be able to add support for multiple over the weekend (it’s because there’s only a single set of properties in the dictionary of provider settings and I was too lazy to create a class to model those settings - I’ll switch to storing a list of objects representing the provider settings).
Thanks for the quick update - just wanted to let you know that it doesn't seem to fix my problem. I'm still seeing the last configmap being read twice in KubeClient's debug log - effectively ignoring the first one.
This is with the code I just committed?
Sorry - I naively assumed this commit was present in 2.3.2.
No problem - will get you a build you can try out :)
There's a development package feed at https://www.myget.org/F/dotnet-kube-client/api/v3/index.json - are you able to try installing version 2.4.0-multiple-configm0012
of the KubeClient packages and see if it works for you?
Tested it locally now, and both configmaps are now loaded and provide configuration. Thanks!
(Will also need #101 resolved, so don't rush releasing this fix for me. Using a workaround in the meantime.)
Thanks for testing so quickly! I'll look into #101 sometime tomorrow (it's 10pm here and I have an early start).
builder .AddKubeConfigMap(client, "config") .AddKubeConfigMap(client, "jaeger") ;
This results in the following trace - i.e. only the last ConfigMap is read, and it is read twice. (It doesn't exist in this test, but that's besides the point :-))
trce: KubeClient.Extensions.Configuration.ConfigMapConfigurationProvider[0] Attempting to load ConfigMap jaeger in namespace f... dbug: KubeClient.KubeApiClient.Http[100] Performing GET request to 'https://10.96.0.1/api/v1/namespaces/f/configmaps/jaeger'. dbug: KubeClient.KubeApiClient.Http[110] Completed GET request to 'https://10.96.0.1/api/v1/namespaces/f/configmaps/jaeger' (NotFound). trce: KubeClient.Extensions.Configuration.ConfigMapConfigurationProvider[0] ConfigMap jaeger was not found in namespace f (isReload: False). trce: KubeClient.Extensions.Configuration.ConfigMapConfigurationProvider[0] Attempting to load ConfigMap jaeger in namespace f... dbug: KubeClient.KubeApiClient.Http[100] Performing GET request to 'https://10.96.0.1/api/v1/namespaces/f/configmaps/jaeger'. dbug: KubeClient.KubeApiClient.Http[110] Completed GET request to 'https://10.96.0.1/api/v1/namespaces/f/configmaps/jaeger' (NotFound). trce: KubeClient.Extensions.Configuration.ConfigMapConfigurationProvider[0] ConfigMap jaeger was not found in namespace f (isReload: False).