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

[BUG] rancher2_app_v2 values not passed to subcharts #1418

Open
SwitchTV-BenBettridge opened this issue Oct 1, 2024 · 0 comments
Open

[BUG] rancher2_app_v2 values not passed to subcharts #1418

SwitchTV-BenBettridge opened this issue Oct 1, 2024 · 0 comments
Labels

Comments

@SwitchTV-BenBettridge
Copy link

SwitchTV-BenBettridge commented Oct 1, 2024

Rancher Server Setup

  • Rancher version: 2.9.1
  • Installation option (Docker install/Helm Chart): Helm Chart
    • If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): GKE 1.29
  • Proxy/Cert Details:

Information about the Cluster

  • Kubernetes version: 1.29
  • Cluster Type (Local/Downstream): Downstream
    • If downstream, what type of cluster?: Hosted

User Information

  • What is the role of the user logged in? Admin

Provider Information

  • What is the version of the Rancher v2 Terraform Provider in use? v5.1.0
  • What is the version of Terraform in use? 1.5.7

Describe the bug

When installing the rancher-monitoring chart via the rancher2_app_v2 resource, values for subcharts are not recognised.

Terraform Code:

locals {
  monitoring_chart_values = <<-EOS
  alertmanager:                                                                                                                                                                                                                     
    alertmanagerSpec:
      storage:
        volumeClaimTemplate:
          spec:
            accessModes: ["ReadWriteOnce"]
            resources:
              requests:
                storage: 10Gi
    EOS
  cluster_id = "<CLUSTER_ID>"
  rancher_monitoring_chart_version = "104.1.0+up57.0.3"
}

resource "rancher2_app_v2" "rancher_monitoring" {
  cluster_id = local.rancher_cluster_id
  name = "rancher-monitoring"
  namespace = "cattle-monitoring-system"
  repo_name = "rancher-charts"
  chart_name = "rancher-monitoring"
  chart_version = local.rancher_monitoring_chart_version
  values = local.monitoring_chart_values 
}

output "values" {
  value = local.monitoring_chart_values
}

To Reproduce

Deploy the above to a rancher cluster after replacing <CLUSTER_ID> with an actual cluster ID.

Then check the Values YAML in Rancher or Helm to verify the settings are set.

Actual Result

Storage settings are not applied:

alertmanager:
  alertmanagerSpec:
<snip...>
    storage: {}
<snip...>

Expected Result

Values specified for alertmanager are passed through to the alertmanager chart

Additional Notes

We originally deployed this instance using the helm_release resource, and later imported it as a rancher2_app_v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants