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

azure-ts-aks-mean fails due to older version of helm #462

Closed
prasannapad opened this issue Nov 17, 2019 · 9 comments · Fixed by #466
Closed

azure-ts-aks-mean fails due to older version of helm #462

prasannapad opened this issue Nov 17, 2019 · 9 comments · Fixed by #466
Assignees
Milestone

Comments

@prasannapad
Copy link
Contributor

https://github.com/pulumi/examples/tree/master/azure-ts-aks-mean sample is currently failing as the new version of helm (3.0) doesn't seem to support a few of the commands that the sample depends on.

For example, the helm init --client-only option doesn't exist, helm --fetch has been replaced by helm --pull and couple more downstream issues.

Perhaps you can add a note to the README.md for now that the sample only works with helm 2.0 while you track this backlog item to address the compat issues?

@lukehoban
Copy link
Contributor

What is the error you are seeing?

Helm 3 support is being added in pulumi/pulumi-kubernetes#882 which I believe should fix this once it's rolled out.

@prasannapad
Copy link
Contributor Author

I am seeing 3 errors:

  1. Error Add container example #1:
    (When running helm init --client-only referenced as one of the pre-req steps here)
PS C:\repos\pulumi\examples\azure-ts-aks-mean> helm init --client-only
Error: unknown flag: --client-only

This can be removed from the example README instructions as per https://helm.sh/docs/topics/v2_v3_migration there is no longer a need to initialize helm.

  1. Error Make sure license for voting-app is correct #2:
PS C:\repos\pulumi\examples\azure-ts-aks-mean> pulumi up
Previewing update (azure-mean):

     Type                                         Name                   Plan       Info
 +   pulumi:pulumi:Stack                          azure-mean-azure-mean  create     1 error; 4 messages
 +   ├─ azuread:index:Application                 aks                    create
 +   ├─ azuread:index:ServicePrincipal            aksSp                  create
 +   ├─ azure:core:ResourceGroup                  aks                    create
 +   ├─ azuread:index:ServicePrincipalPassword    aksSpPassword          create
 +   ├─ azure:cosmosdb:Account                    cosmosDb               create
 +   ├─ azure:containerservice:KubernetesCluster  aksCluster             create
 +   ├─ pulumi:providers:kubernetes               aksK8s                 create
 +   ├─ kubernetes:core:Secret                    mongo-secrets          create
 +   └─ kubernetes:helm.sh:Chart                  node                   create

Diagnostics:
  pulumi:pulumi:Stack (azure-mean-azure-mean):
    Error: repo bitnami not found
    (node:23496) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
    (node:23496) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
    (node:23496) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)

    error: Error: Command failed: helm fetch bitnami/node --untar --version 4.0.1 --destination C:\Users\Prasanna\AppData\Local\Temp\tmp-23496OZvpK2eWia8W
    Error: repo bitnami not found

Fix for this is to replace helm fetch with helm pull.

  1. Error Add README for each sample #3:
PS C:\repos\pulumi\examples\azure-ts-aks-mean> pulumi up
Previewing update (azure-mean):

     Type                                         Name                   Plan       Info
 +   pulumi:pulumi:Stack                          azure-mean-azure-mean  create     1 error; 4 messages
 +   ├─ azuread:index:Application                 aks                    create
 +   ├─ azure:core:ResourceGroup                  aks                    create
 +   ├─ azuread:index:ServicePrincipal            aksSp                  create
 +   ├─ azure:cosmosdb:Account                    cosmosDb               create
 +   ├─ azuread:index:ServicePrincipalPassword    aksSpPassword          create
 +   ├─ azure:containerservice:KubernetesCluster  aksCluster             create
 +   ├─ pulumi:providers:kubernetes               aksK8s                 create
 +   ├─ kubernetes:core:Secret                    mongo-secrets          create
 +   └─ kubernetes:helm.sh:Chart                  node                   create

Diagnostics:
  pulumi:pulumi:Stack (azure-mean-azure-mean):
    Error: unknown flag: --name
    (node:6276) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
    (node:6276) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
    (node:6276) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)

    error: Error: Command failed: helm template C:\Users\Prasanna\AppData\Local\Temp\tmp-6276p7Lzjv0A1QSD\node --name node --values C:\Users\Prasanna\AppData\Local\Temp\tmp-6276p7Lzjv0A1QSD\node\values.yaml --values C:\Users\Prasanna\AppData\Local\Temp\tmp-6276ayB6s1iPrI7S.yaml
    Error: unknown flag: --name

@lukehoban
Copy link
Contributor

Issue 3 above is fixed now in master of the kubernetes providers.

Issue 2 sounds like it was a missing step in the tutorial even for Helm 2.

Issue 1 sounds like something that will unfortunately need separate guidance depending on version of Helm the user has installed.

Cc @lblackstone

@lukehoban
Copy link
Contributor

FWIW - We’ll need to make similar updates in all examples and docs (as well as potentially updating blog posts).

@prasannapad
Copy link
Contributor Author

@lblackstone

Thanks for making the change. Looks like you've addressed the READMEs for these two samples that use Helm charts:

  • azure-ts-aks-helm
  • azure-ts-aks-keda

There's a third (which is the one for this issue) that also needs to be updated.

@lblackstone
Copy link
Member

@prasannapad Oops, sure enough. Fixed in #467

@dangersorus
Copy link

Hey all, looks like this is still broken. Running Helm 3.3.4, latest version of Pulumi, just tried to run through azure-ts-aks-mean and got the same error.

pulumi up
Previewing update (azure-mean)

View Live: https://app.pulumi.com/dangersorus/azure-mean/azure-mean/previews/14ea5e2f-bb64-4940-abb6-ebbee8b4af99

 Type                                         Name                   Plan       Info
  • pulumi:pulumi:Stack azure-mean-azure-mean create 1 error; 4 messages
  • ├─ azuread:index:Application aks create
  • ├─ azuread:index:ServicePrincipal aksSp create
  • ├─ azure:core:ResourceGroup aks create
  • ├─ azuread:index:ServicePrincipalPassword aksSpPassword create
  • ├─ azure:cosmosdb:Account cosmosDb create
  • ├─ azure:containerservice:KubernetesCluster aksCluster create
  • ├─ pulumi:providers:kubernetes aksK8s create
  • ├─ kubernetes:core/v1:Secret mongo-secrets create
  • └─ kubernetes:helm.sh/v2:Chart node create

Diagnostics:
pulumi:pulumi:Stack (azure-mean-azure-mean):
Error: chart "bitnami/node" version "4.0.1" not found in https://charts.bitnami.com/bitnami repository
(node:16239) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(Use node --trace-warnings ... to show where the warning was created)
(node:16239) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)

error: Error: Command failed: helm fetch bitnami/node --untar --version 4.0.1 --destination /var/folders/ll/yjnk2rl11xl7snrrm363084w0000gn/T/tmp-16239AmDGmVeMHWO6 --repo https\://charts.bitnami.com/bitnami
Error: chart "bitnami/node" version "4.0.1" not found in https://charts.bitnami.com/bitnami repository

@dangersorus
Copy link

So the command Fetch is deprecated in helm, so I went to helm.js, line 327, and replaced
child_process_1.execSync(helm fetch ${shell.quote([chart])} ${flags.join(" ")}, { env });

with
child_process_1.execSync(helm pull ${shell.quote([chart])} ${flags.join(" ")}, { env });

Still getting same error

Error: chart "bitnami/node" version "4.0.1" not found in https://charts.bitnami.com/bitnami repository
(node:16674) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16674) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)

error: Error: Command failed: helm pull bitnami/node --untar --version 4.0.1 --destination /var/folders/ll/yjnk2rl11xl7snrrm363084w0000gn/T/tmp-16674E83oYuVy916S --repo https\://charts.bitnami.com/bitnami
Error: chart "bitnami/node" version "4.0.1" not found in https://charts.bitnami.com/bitnami repository

@lblackstone
Copy link
Member

lblackstone commented Oct 22, 2020

@dangersorus #814 should fix the issue you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants