bright-flag-46266
11/14/2022, 2:23 PMusers:
- user: foo
pass: bar
my C# configuration for doing this looks like the following
"users", new Dictionary<string, object>()
{
{"user", "foo"},
{"pass", "bar"}
}
but I am getting the following error from the pod
Expected users field to be an array, got map[pass:0xc000074e10 user:0xc000074e60]
how do I specify an array of values to a helm chart?
I have looked at the documentation for Helm Releases but it didn't help much https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/release/#releaseechoing-dinner-19531
11/14/2022, 2:53 PM-
makes it a yaml array of one object, so you probably want something like:
"users", new object[] { new { user = "foo", pass = "bar" } }
bright-flag-46266
11/14/2022, 3:00 PMAn unhandled exception has occurred while executing the request.
System.InvalidOperationException: <>f__AnonymousType21`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea
7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] is not a supported argument type.
"users", new InputList<object>()
{
(Input<object>) new {user = "foo", pass = "bar"},
}
in case there were some special handling around listsechoing-dinner-19531
11/14/2022, 3:07 PMvar bytes = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(new { user = "foo", pass = "bar"});
var obj = System.Text.Json.JsonDocument.Parse(bytes).RootElement;
Might be a nicer way of doing that, but that at least should give back a JsonElement to pass in.ancient-pillow-66484
02/16/2023, 4:05 PMworried-city-86458
03/06/2023, 6:28 PM