w

    wet-noon-14291

    2 months ago
    How does
    dependsOn
    work with
    ConfigFile
    ? I have two typescript classes, A and B, that both extends
    ComponentResource
    class. In both A and B I use the
    ConfigFile
    resource. First I create A and when creating B I set that it depends on A, but for some reason it seems like all the resources in A isn't running when B is provisioned... is that by design? Do I need to depend on the actual
    ConfigFile
    that A creates for it to work? I thought A wouldn't be done until everything I create in the constructor of A is done.
    s

    steep-toddler-94095

    2 months ago
    I'm guessing you need to set
    dependsOn: configFile.resources
    instead of
    dependsOn: configFile
    w

    wet-noon-14291

    2 months ago
    I'll try that. Thanks.
    l

    limited-rainbow-51650

    2 months ago
    @wet-noon-14291 when creating the
    ConfigFile
    resource, did you set your
    ComponentResource
    subclass as its
    parent
    in
    opts
    ?
    AnotherResource
    will only be created when
    MyComponent
    and all it’s child resources are created when they are properly
    parent
    -ed.
    Hmm… on the other hand, I would have thought this would be fixed by now:https://github.com/pulumi/pulumi-kubernetes/issues/1773 Depending on the exposed set of
    resources
    seems to be what you need in the meantime:https://github.com/pulumi/pulumi-kubernetes/issues/861#issuecomment-901862700
    w

    wet-noon-14291

    2 months ago
    @limited-rainbow-51650, related thing here: https://github.com/mastoj/pulumiaksexperiments/blob/main/kubernetes/index.ts#L13. When I create
    Viz
    it depends on my
    linkerd
    resources (through
    ready
    ). But for some reason it doesn't work on first run since the linkerd proxy isn't injected into the
    viz
    pods, which they should be if
    linkerd
    was running. Commenting out
    viz
    to remove it and then deploy again when
    linkerd
    is already running works as expected.