https://pulumi.com logo
Title
s

sparse-butcher-73713

12/22/2021, 1:05 PM
in response to this code:
var ingress = new IngressController("nginx", new IngressControllerArgs
        {
            HelmOptions = new ReleaseArgs
            {
                Chart = "ingress-nginx",
                Namespace = appServicesNamespace.Metadata.Apply(x => x.Name)
            },
            Controller = new ControllerArgs
            {
                PublishService = new ControllerPublishServiceArgs
                {
                    Enabled = true
                }
            }
        });
b

bored-oyster-3147

12/22/2021, 1:09 PM
Maybe try creating the ReleaseArgs object within the namespace apply function? Expand the apply function so that it returns the entire ReleaseArgs object.
👀 1
s

sparse-butcher-73713

12/22/2021, 1:09 PM
lets see!
bah, same
b

bored-oyster-3147

12/22/2021, 1:14 PM
Is ReleaseArgs an accurate type? Usually the property type objects are named like IngressControllerHelmOptionsArgs. Maybe the implicit cast to Input<T> isn't working because it trying to do a double cast from ReleaseArgs, try explicitly casting to that property type? I'm not at my computer so can't look at the documentation to examine the types but I can in a bit
s

sparse-butcher-73713

12/22/2021, 1:16 PM
the property is declared as
public Input<Inputs.ReleaseArgs>? HelmOptions { get; set; }
so it seems to be accurate
b

bored-oyster-3147

12/22/2021, 1:16 PM
Hmm yea that would be right then
s

sparse-butcher-73713

12/22/2021, 3:13 PM
😭
b

billowy-army-68599

12/22/2021, 3:24 PM
@sparse-butcher-73713 if you're using an apply, the name will be a string, looks like the component isnt satisfied with a string. Have you tried just:
appServicesNamespace.Metadata.Name
(bearing in mind dotnet is not my strong suit)
s

sparse-butcher-73713

12/22/2021, 3:25 PM
i havent, lets see!
actually that's not possible
b

billowy-army-68599

12/22/2021, 3:26 PM
okay, you might be better implenting directly as a helm release in that case
s

sparse-butcher-73713

12/22/2021, 3:26 PM
var ingress = new Chart("nginx-ingress", new ChartArgs
        {
            Chart = "ingress-nginx",
            Namespace = "app-services",
            Version = "4.0.13",
            FetchOptions = new ChartFetchArgs
            {
                Repo = "<https://kubernetes.github.io/ingress-nginx>"
            },
            Values = new Dictionary<string, object>
            {
                ["controller"] = new Dictionary<string, object>
                {
                    ["publishService"] = new Dictionary<string, object>
                    {
                        ["enabled"] = true
                    }
                },
            }
        });
this is I tried with that, and it fails after a bunch of warnings about hooks
seeing anything obvious?
b

billowy-army-68599

12/22/2021, 3:29 PM
try the
helm.Release
rather than
helm.Chart
Chart doesn't support hooks,
Release
does
s

sparse-butcher-73713

12/22/2021, 3:30 PM
aha