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

Setting provider for both OCI and legacy-based helm charts #1578

Closed
andylim0221 opened this issue Feb 3, 2025 · 1 comment
Closed

Setting provider for both OCI and legacy-based helm charts #1578

andylim0221 opened this issue Feb 3, 2025 · 1 comment
Assignees
Labels

Comments

@andylim0221
Copy link

I have a collection of helm charts that I want to deploy to my EKS cluster. Some of the helm charts are OCI-based while some are still legacy repository-based.

I'm doing this for now. Not sure if this is the best way. May I know what's the best practices or recommended ways on setting the Helm provider for both use cases?


provider "helm" {
  alias = "oci"
  kubernetes {
    host                   = data.aws_eks_cluster.this.endpoint
    cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data)

    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "aws"
      args        = ["eks", "get-token", "--cluster-name", var.cluster_name]
    }
  }

  registry {
    url      = "oci://example.jfrog.io/example-oci"
    username = local.username
    password = local.password
  }
}

provider "helm" {
  alias = "legacy"
  kubernetes {
    host                   = data.aws_eks_cluster.this.endpoint
    cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data)

    exec {
      api_version = "client.authentication.k8s.io/v1beta1"
      command     = "aws"
      args        = ["eks", "get-token", "--cluster-name", var.cluster_name]
    }
  }
}
@mardonner
Copy link

For anyone else that was facing a similar issue.
Inside the provider block you can only configure oci repos.
'legacy' repos are configured inside the helm_release resource.

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

3 participants