Skip to content
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

Helm Provider install behaviour inconsistent with CLI #1582

Open
flavioab opened this issue Feb 6, 2025 · 0 comments
Open

Helm Provider install behaviour inconsistent with CLI #1582

flavioab opened this issue Feb 6, 2025 · 0 comments

Comments

@flavioab
Copy link

flavioab commented Feb 6, 2025

While installing helm charts with dependencies on non-default namespaces with the CLI, all resources get installed in the correct namespace, but with the provider all dependency resources get installed on the default namespace, ignoring the namespace configuration.

Example:

helm repo add openebs https://openebs.github.io/charts
helm repo update
helm template openebs openebs/openebs \
  --set engines.replicated.mayastor.enabled=false \
  --set engines.local.lvm.enabled=false \
  --set engines.local.zfs.enabled=false \
  --namespace openebs \
  --create-namespace

All resources are installed in the openebs namespace.

kubectl get pods -n openebs
NAME                                           READY   STATUS    RESTARTS   AGE
openebs-localpv-provisioner-7b8f5b78d7-msgb4   1/1     Running   0          44h

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: v1.10.5-dev
Provider version: v3.0.0-pre1
Kubernetes version: v1.32.1

Affected Resource(s)

  • helm_release

Terraform Configuration Files

resource "helm_release" "storage" {
  name              = "openebs"
  namespace         = "openebs"
  chart             = "openebs"
  repository        = "https://openebs.github.io/openebs"
  version           = "4.1.3"
  create_namespace  = true
  atomic            = true
  dependency_update = true

  set = [
    {
      name  = "engines.replicated.mayastor.enabled"
      value = "false"
      type  = "auto"
    },
    {
      name  = "engines.local.lvm.enabled"
      value = "false"
      type  = "auto"
    },
    {
      name  = "localpv-provisioner.localpv.annotations.namespace"
      value = "openebs"
      type  = "string"
    },
    {
      name  = "engines.local.zfs.enabled"
      value = "false"
      type  = "auto"
    }
  ]
}

Panic Output

module.helm.helm_release.storage: Creating...
module.helm.helm_release.storage: Still creating... [10s elapsed]
module.helm.helm_release.storage: Still creating... [20s elapsed]
module.helm.helm_release.storage: Still creating... [30s elapsed]
module.helm.helm_release.storage: Still creating... [40s elapsed]
module.helm.helm_release.storage: Still creating... [50s elapsed]
module.helm.helm_release.storage: Still creating... [1m0s elapsed]
module.helm.helm_release.storage: Still creating... [1m10s elapsed]
module.helm.helm_release.storage: Still creating... [1m20s elapsed]
module.helm.helm_release.storage: Still creating... [1m30s elapsed]
module.helm.helm_release.storage: Still creating... [1m40s elapsed]
module.helm.helm_release.storage: Still creating... [1m50s elapsed]
module.helm.helm_release.storage: Still creating... [2m0s elapsed]
module.helm.helm_release.storage: Still creating... [2m10s elapsed]
module.helm.helm_release.storage: Still creating... [2m20s elapsed]
module.helm.helm_release.storage: Still creating... [2m30s elapsed]
module.helm.helm_release.storage: Still creating... [2m40s elapsed]
module.helm.helm_release.storage: Still creating... [2m50s elapsed]
module.helm.helm_release.storage: Still creating... [3m0s elapsed]
module.helm.helm_release.storage: Still creating... [3m10s elapsed]
module.helm.helm_release.storage: Still creating... [3m20s elapsed]
module.helm.helm_release.storage: Still creating... [3m30s elapsed]
module.helm.helm_release.storage: Still creating... [3m40s elapsed]
module.helm.helm_release.storage: Still creating... [3m50s elapsed]
module.helm.helm_release.storage: Still creating... [4m0s elapsed]
module.helm.helm_release.storage: Still creating... [4m10s elapsed]
module.helm.helm_release.storage: Still creating... [4m20s elapsed]
module.helm.helm_release.storage: Still creating... [4m30s elapsed]
module.helm.helm_release.storage: Still creating... [4m40s elapsed]
module.helm.helm_release.storage: Still creating... [4m50s elapsed]
module.helm.helm_release.storage: Still creating... [5m0s elapsed]
╷
│ Error: installation failed
│
│   with module.helm.helm_release.storage,
│   on modules/helm/main.tf line 24, in resource "helm_release" "storage":
│   24: resource "helm_release" "storage" {
│
│ release openebs failed, and has been uninstalled due to atomic being set: context deadline exceeded
╵

Steps to Reproduce

  1. terraform apply

Expected Behavior

All resources are installed in the specified namespace openebs.

Actual Behavior

Resources from the helm chart dependencies deployed in the default namespace:

kubectl get pods -n openebs
No resources found in openebs namespace.

kubectl get pods -n default
NAME                                           READY   STATUS             RESTARTS      AGE
openebs-localpv-provisioner-7b8f5b78d7-mp29r   0/1     CrashLoopBackOff   5 (53s ago)   3m53s

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@flavioab flavioab added the bug label Feb 6, 2025
@flavioab flavioab changed the title Helm Provider install behaviour inconsistent with CLI Helm Provider install behavior inconsistent with CLI Feb 6, 2025
@flavioab flavioab changed the title Helm Provider install behavior inconsistent with CLI Helm Provider install behaviour inconsistent with CLI Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants