pulumi-kubernetes: v4.5.1: chart requires kubeVersion: >=1.23.0-0 which is incompatible with Kubernetes v1.20.0

What happened?

When upgrading to @pulumi/kubernetes@4.5.1, the passed Kubernetes version seems to be stucked to v1.20.0, which makes failing Helm charts installation with Kubernetes version requirement.

Example

new k8s.helm.v3.Release(
  'dragonfly',
  {
    chart: 'oci://ghcr.io/dragonflydb/dragonfly/helm/dragonfly',
    name: 'dragonfly',
    version: 'v1.11.0',
  },
  { parent: this },
);
$ pulumi up
[...]
Diagnostics:
  kubernetes:helm.sh/v3:Release (dragonfly):
    error: kubernetes:helm.sh/v3:Release resource 'dragonfly': property chart value {oci://ghcr.io/dragonflydb/dragonfly/helm/dragonfly} has a problem: chart requires kubeVersion: >=1.23.0-0 which is incompatible with Kubernetes v1.20.0; check the chart name and repository configuration.

Output of pulumi about

CLI
Version 3.90.1 Go Version go1.21.3 Go Compiler gc

Plugins NAME VERSION nodejs unknown

Host
OS darwin Version 14.0 Arch arm64

Additional context

Reverting to @pulumi/kubernetes@4.4.0 fixed my issue.

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).

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 10
  • Comments: 16 (4 by maintainers)

Commits related to this issue

Most upvoted comments

v4.4.0 still works.

Tested until v4.5.3 . Not working yet.

It happens the same to me. But if I switch version back to 4.3.0 it works normally.

Update: the fix was shipped in v4.5.4: https://github.com/pulumi/pulumi-kubernetes/pull/2653

Further Update on My Case:

  • I’ve identified the root cause in my scenario.
  • The issue appears to be with the kubernetes config information in the provider. When it fails to connect to the actual kubernetes cluster, instead of a cluster connection failure, this erroneous version message (v1.20) is displayed.
  • After correcting the cluster information, the error no longer occurs.
  • The error message seems to be misleading.

Additional Findings:

  • The issue occurs when I provide a provider directly in the ComponentResourceOptions while creating a helm.v3.Chart.
  • Removing the provider injection and using the kubernetes default provider’s context to up on the same cluster doesn’t result in a helm template error.