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 specify loadBalancerIp #12

Open
chaoyangnz opened this issue Jun 13, 2022 · 6 comments · May be fixed by #20
Open

Unable to specify loadBalancerIp #12

chaoyangnz opened this issue Jun 13, 2022 · 6 comments · May be fixed by #20
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@chaoyangnz
Copy link

chaoyangnz commented Jun 13, 2022

What happened?

const ingressExternalIp = new gcp.compute.Address('ingress-external-ip', {
    addressType: 'EXTERNAL',
    purpose: 'SHARED_LOADBALANCER_VIP',
});

const ingressNginxController = new ingressNginx.IngressController('ingress-nginx-controller', {
  controller: {
      publishService: {
          enabled: true,
      },
      service: {
          loadBalancerIPs: ingressExternalIp.address,
      },
  }
})

Then I got this error:

 warning: resource plugin kubernetes-ingress-nginx is expected to have version >=0.0.5, but has 0.0.1; the wrong version may be on your path, or this may be a bug in the plugin
    warning: resource plugin kubernetes-ingress-nginx is expected to have version >=0.0.5, but has 0.0.1; the wrong version may be on your path, or this may be a bug in the plugin
    error: Error: failed to register new resource ingress-nginx-controller [kubernetes-ingress-nginx:index:IngressController]: 2 UNKNOWN: setting args: copying input "controller": expected destination type to implement pulumi.Input or pulumi.Output, got string
        at Object.registerResource (/Users/chao.yang/Private/stackbase/node_modules/@pulumi/runtime/resource.ts:293:27)
        at new Resource (/Users/chao.yang/Private/stackbase/node_modules/@pulumi/resource.ts:393:13)
        at new ComponentResource (/Users/chao.yang/Private/stackbase/node_modules/@pulumi/resource.ts:881:9)
        at new IngressController (/Users/chao.yang/Private/stackbase/node_modules/@pulumi/ingressController.ts:62:9)

Steps to reproduce

the above code

Expected Behavior

Should be able to specify the IP address

Actual Behavior

Error when run preview

Versions used

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@chaoyangnz chaoyangnz added the kind/bug Some behavior is incorrect or out of spec label Jun 13, 2022
@stack72
Copy link
Contributor

stack72 commented Jun 14, 2022

Hi @chaoyangnz

Have you built this provider yourself? It seems there's an ambient version of the provider on your path already

if you run the command:

pulumi plugin ls then what do you see? Do you see multiple versions of the provider installed?

Paul

@chaoyangnz
Copy link
Author

chaoyangnz commented Jun 14, 2022

@stack72 No, I installed the npm version.

pulumi version: v3.34.1

installed plugins:

NAME                      KIND      VERSION  SIZE    INSTALLED   LAST USED
cloudflare                resource  4.7.0    37 MB   3 days ago  2 days ago
gcp                       resource  6.26.0   122 MB  3 days ago  2 days ago
kubernetes                resource  3.19.3   77 MB   3 days ago  2 days ago
kubernetes-ingress-nginx  resource  0.0.5    67 MB   3 days ago  2 days ago
random                    resource  4.8.0    32 MB   3 days ago  2 days ago
tls                       resource  4.6.0    32 MB   3 days ago  2 days ago

TOTAL plugin cache size: 368 MB


searched my package-lock.json and node_modules, only one kubernetes-ingress-nginx is installed, and version is 0.0.5

@rshade
Copy link
Contributor

rshade commented Jul 11, 2022

Can you test 0.0.6?

@robertvanhoesel
Copy link

Confirming this issue is still present on 0.0.6 with only one version of kubernetes-ingress-nginx installed.
It occurs to me it is the same issue as pulumi/pulumi-kubernetes-cert-manager#1

@robertvanhoesel
Copy link

Additionally, setting a static string as displayed as a workaround in does not work.

I believe the cause of this issue may actually be a typo (I though all properties where generated?) since the actual Helm chart expects the singular controller.service.loadBalancerIP without an 's' instead of plural controller.service.loadBalancerIPs.

@robertvanhoesel robertvanhoesel linked a pull request Jul 28, 2022 that will close this issue
@robertvanhoesel
Copy link

For others experiencing issues with this package: I noticed more schema errors which may leave you scratching your head. I recommend using Helm.v3.Release directly like below

import * as k8s from "@pulumi/kubernetes";

const ns = new k8s.core.v1.Namespace("ingress-nginx", {}, { provider: kubernetes });
const namespace = ns.metadata.name;

const externalIp = new gcp.compute.Address('external-ip', { addressType: 'EXTERNAL' });

const ingressNginxController = new k8s.helm.v3.Release(
    "nginx-ingress",
    {
        chart: "ingress-nginx",
        version: "4.2.0",
        repositoryOpts: {
            repo: "https://kubernetes.github.io/ingress-nginx",
        },
        values: {
            controller: {
                publishService: {
                    enabled: true,
                },
                service: {
                    loadBalancerIP: externalIp.address,
                },
            },
        },
        namespace,
    },
    { provider: kubernetes }
);

@EronWright EronWright self-assigned this Oct 2, 2023
rshade added a commit that referenced this issue Dec 12, 2024
rshade added a commit that referenced this issue Dec 12, 2024
rshade added a commit that referenced this issue Dec 12, 2024
rshade added a commit that referenced this issue Dec 12, 2024
rshade added a commit that referenced this issue Dec 16, 2024
rshade added a commit that referenced this issue Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants