in response to this code: ```var ingress = new Ing...
# dotnet
s
in response to this code:
Copy 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
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
lets see!
bah, same
b
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
the property is declared as
public Input<Inputs.ReleaseArgs>? HelmOptions { get; set; }
so it seems to be accurate
b
Hmm yea that would be right then
s
😭
b
@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:
Copy code
appServicesNamespace.Metadata.Name
(bearing in mind dotnet is not my strong suit)
s
i havent, lets see!
actually that's not possible
b
okay, you might be better implenting directly as a helm release in that case
s
Copy code
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
try the
helm.Release
rather than
helm.Chart
Chart doesn't support hooks,
Release
does
s
aha