-
Notifications
You must be signed in to change notification settings - Fork 115
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
Depending on Helm Chart that installs CRDs does not work #3247
Comments
Hi @nathanielkeeler, sorry to hear you’re experiencing this issue. After investigating, it seems the error stems from this templated file in the For Helm v4 charts, Pulumi performs a server-side dry run (reference:
validate-install-crd to run against the live cluster. However, because the CRDs aren’t yet available during preview (and preview operations don’t persist on the cluster, causing dependent previews to fail), this error occurs. As a workaround, you can either use the Helm v3 chart object to install the non-CRD chart (i.e., rancher-backup ), or skip preview as you mentioned.
Here’s an example: rancher_backup_restore_crds = helmv4.Chart(
"rancher-backup-restore-crds",
chart='rancher-backup-crd',
namespace='cattle-resources-system',
repository_opts=helmv4.RepositoryOptsArgs(
repo="https://charts.rancher.io"
),
opts=pulumi.ResourceOptions(
provider=k8s_provider
)
)
# Install the Rancher Backup Restore Operator
rancher_backup_restore_operator = helmv3.Chart(
"rancher-backup-restore-operator",
helmv3.ChartOpts(
chart="rancher-backup",
namespace="cattle-resources-system",
fetch_opts=helmv3.FetchOpts(
repo="https://charts.rancher.io",
),
),
opts=pulumi.ResourceOptions(
provider=k8s_provider,
depends_on=rancher_backup_restore_crds,
),
) Since Helm v3 charts don’t perform a server-side dry run, this error won’t occur. Additionally, we’re tracking another issue (#3073) to reassess dry-run behavior for non-Helm resources as well, and will also take this scenario into consideration. |
This makes sense, thank you for clarifying the problem in such a comprehensible manner! Will be looking forward to see a solution to this case. I will be closing the issue then. |
What happened?
Hello together,
I am trying to install the Rancher Backup Operator on my Cluster, using Helm. For that, I need to first install the the CRD Helm Chart and make the Operator Chart depend on that. I've tried this using v3 and v4 Charts, but it does not work. Using a Release is also not a good solution since a lot of resources depend on these installs and I don't want to have to wrap my whole program in 'apply' functions. What I noticed is that the Operator Helm Chart seems to want to validate the installation of the CRDs, however they are not there yet. Not sure if this can be solved through pulumi or if it is something inside the Operator Chart that needs to be fixed for it to work with IaC Tools that depend on other resources.
For now the only way to bypass this problem is to add the
--skip-preview
flag when runningpulumi up
.This is the output of the example below using helm.v3.Chart:
This is the output of the example below using helm.v4.Chart:
Example
Trying it with Helm v3 Chart like this, using the
.ready
Status:The other way i've tried running it, using Helm v4 Chart, using the variable name of the chart directly in the dependencies:
Output of
pulumi about
CLI
Version 3.112.0
Go Version go1.22.1
Go Compiler gc
Plugins
NAME VERSION
command 0.10.0
kubernetes 4.18.1
python unknown
rancher2 6.1.1
tls 4.10.0
vault 5.20.0
vsphere 4.10.0
Host
OS debian
Version 12.6
Arch x86_64
This project is written in python: executable='/usr/local/bin/python3' version='3.12.4'
Backend
Dependencies:
NAME VERSION
openshift 0.13.2
pip 24.2
pulumi_kubernetes 4.18.1
pulumi_rancher2 6.1.1
pulumi_tls 4.10.0
sds-pulumi 0.2.16
setuptools 75.1.0
wheel 0.44.0
Additional context
No response
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).
The text was updated successfully, but these errors were encountered: