You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Copy-paste your Terraform configurations here - for large Terraform configs,# please use a service like Dropbox and share a link to the ZIP file. For# security, you can also encrypt the files using our GPG public key.
I'm trying to install metrics-server and add 2 labels to the service one of them having the value = "true"
error:
terrafrom code
module "metrics-server" {
source = "terraform-module/release/helm"
version = "2.7.0"
namespace = "kube-system"
repository = "https://kubernetes-sigs.github.io/metrics-server/"
app = {
name = "metrics-server"
version = "3.8.2"
chart = "metrics-server"
force_update = true
wait = false
recreate_pods = false
deploy = 1
}
set = [
{
name = "service.labels.kubernetes\\.io/name"
value = "Metrics-server"
},
{
name = "service.labels.kubernetes\\.io/cluster-service"
value = "true"
}
]
}
**Error:** unable to build kubernetes objects from release manifest: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found t, error found in #10 byte of ...|service":true,"kuber|..., bigger context ...|cs-server-3.8.2","kubernetes.io/cluster-service":true,"kubernetes.io/name":"Metrics-server"},"name":|...
Error: unable to build kubernetes objects from release manifest: unable to decode "": resource.metadataOnlyObject.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or n, but found t, error found in #10 byte of ...|service":true,"kuber|..., bigger context ...|cs-server-3.8.2","kubernetes.io/cluster-service":true,"kubernetes.io/name":"Metrics-server"},"name":|...
│
│ with module.mindlinc.module.metrics-server.helm_release.this[0],
│ on .terraform/modules/mindlinc.metrics-server/main.tf line 1, in resource "helm_release" "this":
│ 1: resource "helm_release" "this" {
Try setting the type = "string in the set block here. I think what's happening is that it's defaulting to auto and assuming you want to set a boolean value in the yaml – but because it's a label you're modifying it needs to be the string "true"
Oh! I just realized you're using the the terraform-module/release/helm terraform module, which wraps the helm provider. I can see in their code their set input doesn't actually implement the type attribute:
Terraform, Provider, Kubernetes and Helm Versions
Affected Resource(s)
Terraform Configuration Files
I'm trying to install metrics-server and add 2 labels to the service one of them having the value = "true"
error:
terrafrom code
Debug Output
Gist - url
NOTE: In addition to Terraform debugging, please set HELM_DEBUG=1 to enable debugging info from helm.
Panic Output
Steps to Reproduce
terraform apply -target module.mindlinc.module.metrics-server
Expected Behavior
Create a metrics-server with lables added
Actual Behavior
Important Factoids
Running in EKS
References
Community Note
The text was updated successfully, but these errors were encountered: