https://pulumi.com logo
Title
s

straight-arm-50771

11/26/2022, 11:11 PM
Issue I reported on the 21st is considerably more prominent now. I have CI setup that uses the official docker image
pulumi/pulumi:latest
and deploys a k8s cluster & apps. Consistently getting the error stemming from Helm chart deploy:
kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release> (argo-deploy):
    error: failed to create chart from template: chart requires kubeVersion: >=1.22.0-0 which is incompatible with Kubernetes v1.20.0
This is preventing the
pulumi up
to fire at all. update- appears to be this stack overflow report, detailing how Pulumi reports kubeversion https://stackoverflow.com/questions/74291076/helm-reads-wrong-kubeversion-1-22-0-0-for-v1-23-0-as-v1-20-0?newreg=967f4794b98e4a319902a9848e3a8a2d update2- this update to ArgoCD Helm is what uncovered this issue: https://github.com/argoproj/argo-helm/commit/3d9e2f35a6e6249c27fd4ccd8129622d886ef4ea
b

billowy-army-68599

11/27/2022, 12:41 AM
which version of the Kubernetes provider are you using?
please update to at least 3.21.1
s

straight-arm-50771

11/27/2022, 2:41 AM
Just using the Pulumi docker image:
docker run -it --entrypoint='' pulumi/pulumi:latest bash
root@7040b4486d76:/# kubectl --version
error: unknown flag: --version
See 'kubectl --help' for usage.
root@7040b4486d76:/# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: <http://version.Info|version.Info>{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:26Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
b

billowy-army-68599

11/27/2022, 2:42 AM
i need to know the provider version, it should be printed from
pulumi about
but in any case, you need to update it
s

straight-arm-50771

11/27/2022, 2:43 AM
this is before the cluster is deployed
the same stack both deploys the cluster and deploys the argocd helm chart
b

billowy-army-68599

11/27/2022, 3:56 AM
I’m trying to help, but without the Kubernetes provider version you’re using in your stack it’s difficult to do so
s

straight-arm-50771

11/27/2022, 4:14 AM
what I'm saying is that I'm not doing anything unique here, using the official Pulumi docker image, this is before k8s is even deployed. here's a stack config to replicate
network:
  type: gcp:compute:Network

cluster:
  type: gcp:container:Cluster
  properties:
    ipAllocationPolicy: {}
    location: us-east4
    name: ${pulumi.stack}
    network: ${network.id}
    removeDefaultNodePool: true
    initialNodeCount: 2
cluster-nodepool:
  type: gcp:container:NodePool
  properties:
    cluster: ${cluster.id}
    autoscaling:
      minNodeCount: 1
      maxNodeCount: 20
    location: us-east4
    nodeLocations:
      - us-east4-c
  options:
    parent: ${cluster}

auth:
  type: command:local:Command
  properties:
    create: USE_GKE_GCLOUD_AUTH_PLUGIN=True gcloud container clusters get-credentials ${cluster.id} --region=us-east4 --project=${pulumi.stack} --verbosity=error >/dev/null 2>&1
  options:
    dependsOn:
      - ${cluster}
    parent: ${cluster}

provider:
  type: pulumi:providers:kubernetes
  properties:
    cluster: "gke_${pulumi.stack}_us-east4_${cluster.name}"
  options:
    dependsOn:
      - ${auth}
    parent: ${cluster}

argo-ns:
  type: kubernetes:core/v1:Namespace
  properties:
    metadata:
      name: argocd
  options:
    dependsOn:
      - ${provider}
    parent: ${cluster}

argo-deploy:
  type: kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release>
  properties:
    chart: argo-cd
    version: 5.14.1
    name: argo-deploy
    namespace: argocd
    repositoryOpts:
      repo: <https://argoproj.github.io/argo-helm>
  options:
    providers:
      - ${provider}
    dependsOn:
      - ${argo-ns}
      - ${auth}
    parent: ${argo-ns}
this is a fresh project here
$ docker run -it --entrypoint='' pulumi/pulumi:latest bash
root@e1a34e076f55:/# pulumi about
CLI
Version      3.48.0
Go Version   go1.19.2
Go Compiler  gc

Host
OS       debian
Version  11.5
Arch     x86_64
b

billowy-army-68599

11/27/2022, 4:17 AM
what I’m saying is that I’m not doing anything unique here
yes, that’s clear, however this was a bug in the Kubernetes provider prior to
3.21.1
which was fixed. So if you’re using an old Kubernetes provider version, it’s likely fixed. If you’re using an older version then we need to file a new issue.
this is before k8s is even deployed
Then it’s likely you have an old provider version cached in your state
s

straight-arm-50771

11/27/2022, 4:17 AM
on a fresh docker image
there's no state yet
there's no kubeconfig
b

billowy-army-68599

11/27/2022, 4:18 AM
if you do
pulumi stack export
it’s empty?
s

straight-arm-50771

11/27/2022, 4:19 AM
I'll DM you my circleci config
these are fresh stacks
b

billowy-army-68599

11/27/2022, 4:19 AM
it’s is unlikely it’s related to anything with your CI
s

straight-arm-50771

11/27/2022, 4:20 AM
yea, they spin up brand new GCP projects, lay down infra w/Pulumi
cd ~/repo/centegix-iac-pulumi/<<parameters.stack>>
gcloud config set project $PROJECT_ALIAS
pulumi stack init centegix-team/$PROJECT_ALIAS
pulumi config cp -s centegix-team/my-static-stack -d centegix-team/$PROJECT_ALIAS
pulumi stack select centegix-team/$PROJECT_ALIAS
pulumi config set gcp:project $PROJECT_ALIAS
pulumi config set environment ephemeral
pulumi config set subdomain ${CIRCLE_USERNAME,,}

n=0
until [ "$n" -ge 5 ] ; do
  pulumi up -y -s centegix-team/$PROJECT_ALIAS && break
  n=$((n+1))
  sleep 30
done
that's the basis of it