2

I'm currently setting up an AGIC (Kubernetes Application Gateway Ingress Controller) for an AKS environment (https://azure.github.io/application-gateway-kubernetes-ingress/setup/install-existing/#using-a-service-principal).

As the whole environment is setup with Terraform, I'd like to install the necessary Helm repository also with Terraform.

Thought, the following simple code should do the trick:


data "helm_repository" "agic_repo" {
 name      = "agic_repository"
 url       = "https://appgwingress.blob.core.windows.net/ingress-azure-helm-package/"
}

resource "helm_release" "agic" {
 name        = "agic"
 namespace   = "agic"
 repository  = data.helm_repository.agic_repo.metadata[0].url
 chart       = "application-gateway-kubernetes-ingress"

 depends_on = [
    data.helm_repository.agic_repo,
  ]
}

But I ran into this issue:


module.agic.helm_release.agic: Creating...



Error: chart "application-gateway-kubernetes-ingress" not found in https://appgwingress.blob.core.windows.net/ingress-azure-helm-package/ repository



  on ../../modules/agic/main.tf line 91, in resource "helm_release" "agic":

  91: resource "helm_release" "agic" {

So it looks, as if the package cannot be found. Did anyone else solve this before?

I'm not familiar with Helm, so I don't know how to 'browse' within the Helm repos to check whether I'm addressing the right URI...

So I added the repo manually with

helm repo add application-gateway-kubernetes-ingress https://appgwingress.blob.core.windows.net/ingress-azure-helm-package/

When I search for the repo I receive:

V5T:~$ helm search | grep ingress
application-gateway-kubernetes-ingress/ingress-azure    1.0.0           1.0.0                   Use Azure Application Gateway as the ingress for an Azure...

Any help appreciated!

P.S.: Sure, I could do it with a bash one-liner, but would be great to have the whole environment created by Terraform...

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
MaxiPalle
  • 410
  • 1
  • 6
  • 15

1 Answers1

0

According to the data you provided it has to be this:

resource "helm_release" "agic" {
 name        = "agic"
 namespace   = "agic"
 repository  = data.helm_repository.agic_repo.metadata[0].url
 chart       = "ingress-azure"

 depends_on = [
    data.helm_repository.agic_repo,
  ]
}

so the chart name is different

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • This didn't fix it yet ... `module.agic.helm_release.agic: Creating... Error: execution error at (ingress-azure/templates/configmap.yaml:1:7): A valid appgw entry is required! on ../../modules/agic/main.tf line 91, in resource "helm_release" "agic": 91: resource "helm_release" "agic" { ` – MaxiPalle Apr 15 '20 at 07:08
  • well, that's a completely different issue, you should raise a new question for that one and accept this answer. did you setup all the prerequisites? https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/setup/install-new.md – 4c74356b41 Apr 15 '20 at 08:59
  • 1
    Checked and you're right: it's a problem with a missing requirements. I start to understand Helm and the corresponding the processes. Thanks! – MaxiPalle Apr 15 '20 at 16:01