-
Notifications
You must be signed in to change notification settings - Fork 377
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
Always do helm repo update
#630
Comments
Could you please share the versions of provider and Terraform that you're using? |
I have the same issues running on Auzre Pipeliens Agents (Ubuntu 20.04) and MacOS (Big Sur 11.1 Beta) locally. Terraform 0.13.5 |
Terraform v0.14.0
Initially I ran the below (identical inputs to OP but in a different order...); resource "helm_release" "helm_jetstack_cert_manager" {
name = "cert-manager"
namespace = "cert-manager"
create_namespace = true
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "1.1.0"
timeout = 120
} I received I ran I don't understand how running the same inputs in a different order would cause different error messages!? |
Provider Version: 2.2.0 resource "helm_release" "argo-cd" {
name = "argo-cd"
repository = "https://argoproj.github.io/argo-helm"
chart = "argo-cd"
version = "3.11.1"
namespace = kubernetes_namespace.infra-namespaces["infra-argo-cd"].metadata[0].name
wait = true
timeout = 300
atomic = true
cleanup_on_fail = true
values = [""]
} I could confirm, this error only occurs, if the local helm installation has some contained Based on that, I modified the environment variable Then, terraform runs successfully. Could someone confirm that? Edit: I could resolve the issue, by setting provider "helm" {
registry_config_path = "repositories.yaml"
kubernetes {
...
}
} To the specific value. I could be any value, the file does not need to be exist. |
Confirming removing extra repos ( |
You might also need to actually run |
My workaround for this issue: provider "helm" {
repository_config_path = "${path.module}/.helm/repositories.yaml"
repository_cache = "${path.module}/.helm"
kubernetes {
host = module.cluster_linux.cluster_endpoint
cluster_ca_certificate = base64decode(module.cluster_linux.cluster_ca[0].data)
token = data.aws_eks_cluster_auth.this.token
}
} |
I notice this issue struck me this time, and the answer is to run "helm repo update" before running helm_release. |
Im confused about what this is doing. Does it use your local helm cache by default and not run update every time, but if you set it to any other value (even if the folder and repositories.yaml doesn't exist like one poster said) it will update every time? |
@red8888, these two strings instruct the provider to look and use the repository_config_path = "${path.module}/.helm/repositories.yaml"
repository_cache = "${path.module}/.helm" https://www.terraform.io/language/expressions/references#filesystem-and-workspace-info |
I'm runing the automated pipeline in a remote host, but I'm not able to get a Last version of an helm, I'm instaled the helm 6 months ago, and I need update this chart to lastest version, locally works, but runing on pipeline I got 404 error, on same .tf file but with another target, another state backend, and another runner, repository_config_path and repository_cache doesn't change anything, same 404 error. |
I am currently considering using the unix ticks as the version in the helm chart to make sure it runs. |
Confirm this worked for me also. A more elegant solution would be nice, but this quick fix did it for me |
export |
Workaround for: Error: could not download chart: no cached repo found. (try 'helm repo update') Refs: hashicorp/terraform-provider-helm#630
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
Bad bot |
Description
I was trying to install the following manifest:
And it did not work. I set
SET HELM_DEBUG=1
and it showed me the following error:I solved it by doing a manual
helm repo update
in the console, then I ran againtf apply
and it worked.Potential Terraform Configuration
It would be nice to have a new argument so we could decide whether to do a previous
helm repo update
.Community Note
The text was updated successfully, but these errors were encountered: