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

Using custom provider requires plugin 2.6.1 despite using newer version #1487

Closed
yarinm opened this issue Mar 7, 2021 · 4 comments · Fixed by #1520
Closed

Using custom provider requires plugin 2.6.1 despite using newer version #1487

yarinm opened this issue Mar 7, 2021 · 4 comments · Fixed by #1520
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@yarinm
Copy link

yarinm commented Mar 7, 2021

I'm creating a custom pulumi-kubernetes provider in version 2.8.0 and whenever I create a stack, pulumi forces a download of pulumi-kubernetes 2.6.1 plugin and uses it:

INFO[0039] [resource plugin kubernetes-2.6.1] installing  
INFO[0039] Downloading plugin: 0 B / 26.90 MiB [----------------------------------]   0.00% 
INFO[0040] Downloading plugin: 40.43 KiB / 26.90 MiB [>---------------------]   0.15% 2m18s 

In the state file for some reason the provider's URN is:

urn:pulumi:xxxx::yyyy::pulumi:providers:kubernetes::default_2_6_1
@yarinm yarinm added the kind/bug Some behavior is incorrect or out of spec label Mar 7, 2021
@leezen
Copy link
Contributor

leezen commented Mar 9, 2021

@yarinm Could you please clarify what you're doing and provide any relevant code as well? Is this for an existing stack and perhaps it is referencing the older plugin version? Or when you say "create a stack" -- this is for a completely new stack? And if so, how is it referencing the kubernetes package?

@leezen leezen added needs-repro Needs repro steps before it can be triaged or fixed and removed kind/bug Some behavior is incorrect or out of spec labels Mar 9, 2021
@antst
Copy link

antst commented Mar 18, 2021

I have the same problem. I need to use fresh version due to fix of the helm v3 bug with hooks.
But with freshly created project and state, it still says

    error: no resource plugin 'kubernetes-v2.6.1' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource kubernetes v2.6.1````

and if I have it, it uses it.

@antst
Copy link

antst commented Mar 18, 2021

OK, I see, it is due to #1325 which hardcode version to 2.6.1

Question is "what to do?"

@johannesdrescher
Copy link

I run into the same problem when creating Helm V3 charts in Go. Initially I thought the problem was related to the custom Kubernetes provider I set in the resource options but it also occurs without a custom provider being set (see below).

Steps to reproduce

  • Run pulumi new in empty directory, choose gcp-go template
  • Replace the contents of main.go and go.mod with code below
  • Run pulumi up

main.go

package main

import (
	"github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/helm/v3"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {

		_, err := buildNginxIngressHelmChart(ctx)
		if err != nil {
			return err
		}

		return nil
	})
}

func buildNginxIngressHelmChart(ctx *pulumi.Context) (*helm.Chart, error) {
	return helm.NewChart(ctx, "nginx-ingress-helm-chart", helm.ChartArgs{
		Chart:   pulumi.String("ingress-nginx"),
		Version: pulumi.String("3.24.0"),
		FetchArgs: helm.FetchArgs{
			Repo: pulumi.String("https://kubernetes.github.io/ingress-nginx"),
		},
	})
}

go.mod

module foo

go 1.16

require (
	github.com/pulumi/pulumi-kubernetes/sdk/v2 v2.8.3
	github.com/pulumi/pulumi/sdk/v2 v2.23.1
)

pulumi up output

Previewing update (production)

View Live: https://app.pulumi.com/organization/foo/production/previews/bar

     Type                            Name                      Plan       Info
 +   pulumi:pulumi:Stack             foo-production            create     
 +   ├─ kubernetes:helm.sh/v3:Chart  nginx-ingress-helm-chart  create     
     └─ pulumi:providers:kubernetes  default_2_6_1                        1 error
 
Diagnostics:
  pulumi:providers:kubernetes (default_2_6_1):
    error: no resource plugin 'kubernetes-v2.6.1' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource kubernetes v2.6.1`

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 resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants