Closed enrique-ayala closed 1 year ago
@enrique-ayala thanks for reporting, just want to confirm if this is preventing you from installing, or is just throwing a warning?
Yes, this is preventing us to install it. Thanks for checking.
@enrique-ayala While I agree that there is a bug (we need to change the if statement to prevent the empty project volume), I am trying to understand what makes your situation not allow installing, when many others have had no problem.
What are the exact commands you are running when you get the error?
I'm using terraform from a build/release pipeline . Command executed looks like :
terraform apply -var-file="varfile.tfvars"
@enrique-ayala what is the terraform code you are referencing the chart with?
This is via Azure Pipeline :
- task: TerraformCLI@0
displayName: 'terraform apply'
env: ${{ parameters.env }}
inputs:
command: apply
commandOptions: '-var-file=env_values/$(terraform_workspace_environment).tfvars -var kube_config_path=$(KUBECONFIG)'
workingDirectory: $(terraform_working_directory)
Where terraformcli refers to extension: https://marketplace.visualstudio.com/items?itemName=ms-devlabs.custom-terraform-tasks&ssr=false#overview
and terraform version: terraformVersion: 1.3.4
@enrique-ayala I understand that part, I was meaning what helm provider are you using?
Presumably, you are using the helm one: https://registry.terraform.io/providers/hashicorp/helm/latest/docs
Either way, can you share the specific terraform code?
Oh got it , helm provider version is v2.7.1:
- Installing hashicorp/helm v2.7.1...
- Installed hashicorp/helm v2.7.1 (signed by HashiCorp)
Which seems to refer to helm 3.9.4 (https://github.com/hashicorp/terraform-provider-helm/releases/tag/v2.7.0)
@enrique-ayala I am actually wanting your terraform code, lol.
For example, you might be using the helm_release
resource, or you could be using some other method.
The following is an example of a helm_release
pattern, but can you share what you are actually using?
resource "helm_release" "example" {
name = "my-redis-release"
repository = "https://charts.bitnami.com/bitnami"
chart = "redis"
version = "6.0.1"
values = [
"${file("values.yaml")}"
]
set {
name = "cluster.enabled"
value = "true"
}
set {
name = "metrics.enabled"
value = "true"
}
set {
name = "service.annotations.prometheus\\.io/port"
value = "9127"
type = "string"
}
}
Let me try to put as much as possible ( we have a strict policy regarding exposing internal configs) :
# main.tf
resource "helm_release" "airflow" {
name = var.release_name
repository = "https://airflow-helm.github.io/charts"
chart = var.chart_name
version = var.chart_version
namespace = var.namespace
values = [
templatefile("chart_values/airflow.yaml", {PVC_XXX = var.xxx_pvc_name}),
file("chart_values/airflow-${var.environment_name}.yaml")
]
}
# vars.tf
variable "xxx_pvc_name" {
type = string
nullable = false
description = "PVC name to use as working volume (/mnt/work)"
}
variable "release_name" {
type = string
nullable = false
default = "airflow"
description = "Helm release name for airflow"
}
variable "chart_name" {
type = string
nullable = false
default = "airflow"
description = "Helm chart name for airflow"
}
variable "chart_version" {
type = string
nullable = false
default = "airflow"
description = "Helm chart version for airflow"
}
variable "kube_config_path" {
type = string
nullable = false
description = "Kubernetes config yaml file"
}
variable "namespace" {
type = string
nullable = false
description = "Kubernetes namespace name to deploy chart"
}
variable "environment_name" {
type = string
nullable = false
}
terraform {
backend "azurerm" {
# XXXX
}
}
provider "azurerm" {
# XXX
}
provider "helm" {
kubernetes {
config_path = var.kube_config_path
}
}
terraform {
required_version = ">=1.1.9"
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.14.0"
}
helm = {
version = "2.7.1"
}
}
}
And a sample from a tfvars file :
namespace = "airflow"
chart_name = "airflow"
chart_version = "8.7.1"
Thanks again for checking this.
@enrique-ayala as a temporary fix (until a chart version that does not have the invalid resource schema is released), you can disable Terraform's built-in validation setting the disable_openapi_validation
config to true
on the helm_release
resource.
thanks @thesuperzapper ! I'll test it .
@enrique-ayala I have released chart version 8.8.0 which contains a fix for this schema error.
Thanks @thesuperzapper ! Worked with no issue.
Checks
User-Community Airflow Helm Chart
.Chart Version
8.7.1
Kubernetes Version
Helm Version
Description
Hi good day, I'm upgrading chart version from 8.6.1 to 8.7.1 and received the following error:
I have executed
helm template
to render values and compare . I can see the following for file# Source: airflow/templates/pgbouncer/pgbouncer-deployment.yaml
With 8.6.1, volume
pgbouncer-certs
looks good :However with 8.7.1 ,
projected.sources
is empty :Seems like issue comes from https://github.com/airflow-helm/charts/pull/718 .
See below section for custom values I've used under ``pgbouncer``` section . Thanks.
Relevant Logs
Custom Helm Values