Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add more than one config map #96

Open
ugumba opened this issue Sep 19, 2019 · 9 comments
Open

Unable to add more than one config map #96

ugumba opened this issue Sep 19, 2019 · 9 comments

Comments

@ugumba
Copy link

ugumba commented Sep 19, 2019

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).

@tintoy
Copy link
Owner

tintoy commented Sep 19, 2019

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).

@ugumba
Copy link
Author

ugumba commented Sep 23, 2019

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.

@tintoy
Copy link
Owner

tintoy commented Sep 23, 2019

This is with the code I just committed?

@tintoy
Copy link
Owner

tintoy commented Sep 23, 2019

(8da7227 ?)

@ugumba
Copy link
Author

ugumba commented Sep 24, 2019

Sorry - I naively assumed this commit was present in 2.3.2.

@tintoy
Copy link
Owner

tintoy commented Sep 24, 2019

No problem - will get you a build you can try out :)

@tintoy
Copy link
Owner

tintoy commented Sep 24, 2019

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?

@ugumba
Copy link
Author

ugumba commented Sep 24, 2019

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.)

@tintoy
Copy link
Owner

tintoy commented Sep 24, 2019

Thanks for testing so quickly! I'll look into #101 sometime tomorrow (it's 10pm here and I have an early start).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants