Closed ctison closed 1 year ago
I'm also experiencing a similar issue, but while using helm.v3.Chart
instead of helm.v3.Release
.
After upgrading to v4.5.1, I installed the Helm chart on k8s v1.22.0, and my current cluster version remains unchanged.
I'm not sure where the v1.20.0 version is coming from.
error: Error: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to create chart from template: chart requires kubeVersion: >=1.21.0-0 which is incompatible with Kubernetes v1.20.0
I wonder if this issue is related to PR #2593.
If there were zero k8s contexts --> this field was unset meaning helm would default to some old version (1.20.0 at the time of writing) if it couldn't connect to the k8s context 1+ k8s contexts --> would always try to contact the API server to get the version leading to an error if the API server was unreachable.
Additional Findings:
provider
directly in the ComponentResourceOptions
while creating a helm.v3.Chart
.up
on the same cluster doesn't result in a helm template error.Further Update on My Case:
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.It happens the same to me. But if I switch version back to 4.3.0 it works normally.
My helm release:
export const certManager = new k8s.helm.v3.Release("cert-manager", {
chart: "cert-manager",
version: "v1.12.2",
repositoryOpts: {
repo: "https://charts.jetstack.io",
},
name: "cert-manager",
createNamespace: true,
namespace: "cert-manager",
values: {
installCRDs: true,
},
});
@EronWright This sounds like a regression, could you please take a look?
kubernetes:helm.sh/v3:Release (helm-cert-manager):
error: kubernetes:helm.sh/v3:Release resource 'helm-cert-manager': property chart value {cert-manager} has a problem: chart requires kubeVersion: >= 1.22.0-0 which is incompatible with Kubernetes v1.20.0; check the chart name and repository configuration.
new k8s.helm.v3.Release(
'helm-cert-manager',
{
chart: 'cert-manager',
version: '1.13.2',
repositoryOpts: {
repo: 'https://charts.jetstack.io',
},
namespace: 'cert-manager',
createNamespace: true,
values: {
installCRDs: true,
prometheus: {
enabled: false,
},
},
},
{ provider: k8sProvider },
);
When i use Chart, ChartOpts, FetchOpts - everything works fine. But when using Release, ReleaseArgs, RepositoryOptsArgs i receive error:
Diagnostics: kubernetes:helm.sh/v3:Release (sonarqube-test): error: kubernetes:helm.sh/v3:Release resource 'sonarqube-test': property chart value {sonarqube} has a problem: chart requires kubeVersion: >= 1.24.0-0 which is incompatible with Kubernetes v1.20.0; check the chart name and repository configuration.
Code for repeate:
from pulumi_kubernetes.helm.v3 import Chart, ChartOpts, FetchOpts
Chart(
"sonarqube-test",
ChartOpts(
chart="sonarqube",
namespace="test",
version="10.2.1",
fetch_opts=FetchOpts(
repo="https://sonarSource.github.io/helm-chart-sonarqube",
),
# atomic=True,
# create_namespace=True,
),
)
# from pulumi_kubernetes.helm.v3 import Release, ReleaseArgs, RepositoryOptsArgs
# Release(
# "sonarqube-test",
# args=ReleaseArgs(
# chart="sonarqube",
# namespace="test",
# version="10.2.1",
# repository_opts=RepositoryOptsArgs(
# repo="https://sonarSource.github.io/helm-chart-sonarqube",
# ),
# atomic=True,
# create_namespace=True,
# ),
# )
poetry show
arpeggio 2.0.2 Packrat parser interpreter
aspy-refactor-imports 3.0.2 Utilities for refactoring imports in python-like syntax.
attrs 23.1.0 Classes Without Boilerplate
bandit 1.7.5 Security oriented static analyser for python code.
black 22.8.0 The uncompromising code formatter.
certifi 2023.7.22 Python package for providing Mozilla's CA Bundle.
cfgv 3.4.0 Validate configuration and produce human readable error messages.
charset-normalizer 3.3.0 The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
click 8.1.7 Composable command line interface toolkit
dill 0.3.7 serialize all of Python
distlib 0.3.7 Distribution utilities
filelock 3.12.4 A platform independent file lock.
flake8 6.1.0 the modular source code checker: pep8 pyflakes and co
flake8-bugbear 23.9.16 A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes an...
gitdb 4.0.10 Git Object Database
gitpython 3.1.37 GitPython is a Python library used to interact with Git repositories
grpcio 1.51.3 HTTP/2-based RPC framework
identify 2.5.30 File identification library for Python
idna 3.4 Internationalized Domain Names in Applications (IDNA)
iniconfig 2.0.0 brain-dead simple config-ini parsing
isort 5.12.0 A Python utility / library to sort Python imports.
jinja2 3.1.2 A very fast and expressive template engine.
markdown-it-py 3.0.0 Python port of markdown-it. Markdown parsing, done right!
markupsafe 2.1.3 Safely add untrusted strings to HTML/XML markup.
mccabe 0.7.0 McCabe checker, plugin for flake8
mdurl 0.1.2 Markdown URL utilities
mergedeep 1.3.4 A deep merge function for 🐍.
mock 5.1.0 Rolling backport of unittest.mock for all Pythons
mypy-extensions 1.0.0 Type system extensions for programs checked with the mypy type checker.
mysql-connector-python 8.1.0 MySQL driver written in Python
netaddr 0.8.0 A network address manipulation library for Python
nodeenv 1.8.0 Node.js virtual environment builder
packaging 23.2 Core utilities for Python packages
parver 0.5 Parse and manipulate version numbers.
pathspec 0.11.2 Utility library for gitignore style pattern matching of file paths.
pbr 5.11.1 Python Build Reasonableness
platformdirs 3.11.0 A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir".
pluggy 1.3.0 plugin and hook calling mechanisms for python
pre-commit 3.4.0 A framework for managing and maintaining multi-language pre-commit hooks.
protobuf 4.21.12 Protocol Buffers
pulumi 3.68.0 Pulumi's Python SDK
pulumi-aws 5.41.0 A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
pulumi-aws-iam 0.2.0
pulumi-aws-native 0.11.0 A native Pulumi package for creating and managing Amazon Web Services (AWS) resources.
pulumi-kubernetes 4.4.0 A Pulumi package for creating and managing Kubernetes resources.
pulumi-mongodbatlas 3.11.0 A Pulumi package for creating and managing mongodbatlas cloud resources.
pulumi-mysql 3.1.0 A Pulumi package for creating and managing mysql cloud resources.
pulumi-postgresql 3.10.0 A Pulumi package for creating and managing postgresql cloud resources.
pulumi-rabbitmq 3.3.0 A Pulumi package for creating and managing RabbitMQ resources.
pulumi-random 4.14.0 A Pulumi package to safely use randomness in Pulumi programs.
pulumi-tls 4.11.0 A Pulumi package to create TLS resources in Pulumi programs.
pycodestyle 2.11.1 Python style guide checker
pyflakes 3.1.0 passive checker of Python programs
pygments 2.16.1 Pygments is a syntax highlighting package written in Python.
pytest 7.4.2 pytest: simple powerful testing with Python
pytest-dotenv 0.5.2 A py.test plugin that parses environment files before running tests
python-dotenv 1.0.0 Read key-value pairs from a .env file and set them as environment variables
pyyaml 6.0.1 YAML parser and emitter for Python
requests 2.31.0 Python HTTP for Humans.
rich 13.6.0 Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
seed-isort-config 2.2.0 Statically populate the `known_third_party` `isort` setting.
semver 2.13.0 Python helper for Semantic Versioning (http://semver.org/)
setuptools 68.2.2 Easily download, build, install, upgrade, and uninstall Python packages
six 1.16.0 Python 2 and 3 compatibility utilities
smmap 5.0.1 A pure Python implementation of a sliding window memory map manager
stevedore 5.1.0 Manage dynamic plugins for Python applications
strenum 0.4.15 An Enum that inherits from str.
urllib3 2.0.6 HTTP library with thread-safe connection pooling, file post, and more.
virtualenv 20.24.5 Virtual Python Environment builder
After downgrading version to pulumi_kubernetes 4.3.0 everything started working fine!
poetry add pulumi_kubernetes=4.3.0
Updating dependencies
Resolving dependencies... (0.4s)
Package operations: 0 installs, 11 updates, 0 removals
• Downgrading charset-normalizer (3.3.1 -> 3.3.0)
• Downgrading urllib3 (2.0.7 -> 2.0.6)
• Downgrading filelock (3.13.0 -> 3.12.4)
• Downgrading gitdb (4.0.11 -> 4.0.10)
• Downgrading gitpython (3.1.40 -> 3.1.37)
• Downgrading identify (2.5.31 -> 2.5.30)
• Downgrading pulumi-kubernetes (4.5.2 -> 4.3.0)
• Downgrading pytest (7.4.3 -> 7.4.2)
• Downgrading virtualenv (20.24.6 -> 20.24.5)
• Downgrading mysql-connector-python (8.2.0 -> 8.1.0)
• Downgrading pre-commit (3.5.0 -> 3.4.0)
pulumi up -s sonar-test
Previewing update (sonar-test):
Downloading plugin: 37.07 MiB / 37.07 MiB [=========================] 100.00% 2s
[resource plugin kubernetes-4.3.0] installing
Type Name Plan
+ pulumi:pulumi:Stack sonar-test-sonar-test create
+ └─ kubernetes:helm.sh/v3:Release sonarqube-test create
Resources:
+ 2 to create
Do you want to perform this update? no
confirmation declined, not proceeding with the update
yeah, bitten by this bug - can confirm 4.3.0 works
v4.4.0 still works.
Tested until v4.5.3 . Not working yet.
I have same issue, https://github.com/longhorn/longhorn/issues/4788#issuecomment-1792937587
I fixed the version pulumi-kubernetes==4.3.0
but how about other packages ?
The pip
can't determine which version is compatible with other requirements.
The requirements.txt
file:
pulumi
pulumi-aws
pulumi-aws-native
pulumi-awsx
pulumi-cloudflare
pulumi-docker
pulumi-eks
pulumi-kubernetes==4.3.0
I'm sorry for the trouble everyone - we are working on a fix in https://github.com/pulumi/pulumi-kubernetes/pull/2653 and will land it soon, then cut a new version of the provider.
Update: the fix was shipped in v4.5.4: https://github.com/pulumi/pulumi-kubernetes/pull/2653
@EronWright I am still getting the kubeVersion error post v4.5.4 on deployment of cert-manager - noticed that the JsonNames (lines 400/402) are transposed here: https://github.com/pulumi/pulumi-kubernetes/blob/master/provider/pkg/gen/dotnet-templates/helm/v3/Chart.cs
@johnsonp57 thanks for the help, I filed an issue based on your observation and will prioritize: https://github.com/pulumi/pulumi-kubernetes/issues/2739
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
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).