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

Experiments Feature Breaking the helm_release asking for CRD to install First #1217

Open
srikanth2302 opened this issue Aug 2, 2023 · 3 comments
Labels

Comments

@srikanth2302
Copy link

srikanth2302 commented Aug 2, 2023

Terraform, Provider, Kubernetes and Helm Versions

Terraform version: 1.5.2
Provider version:2.10.1
Kubernetes version:2.22.0

Affected Resource(s)

  • helm_release

Terraform Configuration Files

resource "helm_release" "agent" {
  name            = var.helm_deployments.connect-agent.name
  repository      = try(var.helm_deployments.connect-agent.repository != null ? var.helm_deployments.agent.repository : local.helm_default_repository)
  chart           = var.helm_deployments.agent.chart
  version         = var.helm_deployments.agent.chart_version
  timeout         = var.helm_deployments.agent.timeout
  cleanup_on_fail = var.helm_deployments.agent.cleanup_on_fail
  force_update    = var.helm_deployments.agent.force_update
  reuse_values    = var.helm_deployments.agent.reuse_values
  reset_values    = var.helm_deployments.agent.reset_values
  namespace       = kubernetes_namespace.agent.metadata.0.name
  recreate_pods   = var.helm_deployments.agent.recreate_pods
  values = [
    yamlencode(try(yamldecode(local.common_values)["agent"], {})),
    yamlencode(try(yamldecode(local.cluster_values)["agent"], {}))
  ]
}

Debug Output

NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.
Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "virtualservice" namespace: "istio-system" from "": no matches for kind "Certificate" in version "networking.istio.io/v1beta1"
│ ensure CRDs are installed first, resource mapping not found for name: "virtualservice" namespace: "kube-system" from "": no matches for kind "Issuer" in version "networking.istio.io/v1beta1"
│ ensure CRDs are installed first, unable to recognize no matches for kind "VirtualService" in version "networking.istio.io/v1beta1"]

Panic Output

Steps to Reproduce

  1. terraform apply

Expected Behavior

A parameter that can Isolate or bypass CRD Installation so that it can show only chart values diff would be helpful

Actual Behavior

I was trying to get the Helm chart Value file differences which can be properly seen only if experiments manifest feature is set to true. But It is Unable to do Plan throwing error to install CRD First.

Important Factoids

References

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
@sheneska
Copy link
Contributor

sheneska commented Aug 9, 2023

Hi @srikanth2302, do you have the CRDs installed?

@srikanth2302
Copy link
Author

No... CRD's are not installed that should be taken care by Helm Package.. Without Experiments feature it doesnt check and plan was successful. I am looking for Just to check values difference and not to check CRD's.

@mmerickel
Copy link

Ran into this issue as well - this error occurs when running a plan containing a new helm chart with manifest=true experiment enabled. If you manually install the CRDS then you can get a successful plan. Or if you turn off manifest=true you can also get a successful plan.

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