Closed
Description
Issue Description
As identified in PR #1644, the Traefik HelmChart manifest has formatting issues with the valuesContent
field. While the YAML is valid, the formatting is broken, making it difficult to read and modify.
Tofu Version
OpenTofu v1.9.0
on linux_amd64
+ provider registry.opentofu.org/1password/onepassword v2.1.2
+ provider registry.opentofu.org/hashicorp/cloudinit v2.3.5
+ provider registry.opentofu.org/hashicorp/local v2.5.2
+ provider registry.opentofu.org/hashicorp/null v3.2.3
+ provider registry.opentofu.org/hashicorp/random v3.6.3
+ provider registry.opentofu.org/hashicorp/tls v4.0.6
+ provider registry.opentofu.org/hetznercloud/hcloud v1.49.1
+ provider registry.opentofu.org/integrations/github v6.5.0
+ provider registry.opentofu.org/tenstad/remote v0.1.3
Kube.tf file
module "kube-hetzner" {
source = "kube-hetzner/kube-hetzner/hcloud"
#version = "v2.16.1"
version = "2.14.5"
providers = {
hcloud = hcloud
}
hcloud_token = module.onepass_hcloud["hcloud_kubernetes"].credential
ssh_public_key = var.ssh_public_key != "" ? file(var.ssh_public_key) : module.ssh.ssh_public_key
ssh_private_key = var.ssh_private_key != "" ? file(var.ssh_private_key) : module.ssh.ssh_private_key
ssh_port = 2222
# k3s
initial_k3s_channel = var.initial_k3s_channel
# node pools
control_plane_nodepools = var.control_plane_nodepools
agent_nodepools = var.agent_nodepools
# load balancer
cluster_name = var.cluster_name
base_domain = var.base_domain
additional_tls_sans = var.additional_tls_sans
lb_hostname = var.lb_hostname
# traefik
traefik_version = var.traefik_version
traefik_additional_ports = var.traefik_additional_ports
# network
enable_wireguard = true
cni_plugin = "cilium"
cilium_routing_mode = "native"
cilium_egress_gateway_enabled = true
cilium_version = "1.14.4"
restrict_outbound_traffic = false
# storage
enable_local_storage = true
# auto upgrades
automatically_upgrade_os = false
Current Behavior
The valuesContent
field in the Traefik HelmChart manifest is not properly formatted, with line breaks and indentation appearing incorrectly when viewed with kubectl get helmcharts.helm.cattle.io -n kube-system traefik -oyaml
.
Example of current output:
valuesContent: "image:\n tag: \ndeployment:\n replicas: 3\nglobalArguments: []\nservice:\n
\ enabled: true\n type: LoadBalancer\n annotations:\n \"load-balancer.hetzner.cloud/name\":
\"staging-traefik\"\n \"load-balancer.hetzner.cloud/use-private-ip\": \"true\"\n
\ \"load-balancer.hetzner.cloud/disable-private-ingress\": \"true\"\n \"load-balancer.hetzner.cloud/disable-public-network\":
\"false\"\n \"load-balancer.hetzner.cloud/ipv6-disabled\": \"false\"\n \"load-balancer.hetzner.cloud/location\":
\"fsn1\"\n \"load-balancer.hetzner.cloud/type\": \"lb11\"\n \"load-balancer.hetzner.cloud/uses-proxyprotocol\":
\"true\"\n \"load-balancer.hetzner.cloud/algorithm-type\": \"round_robin\"\n
\ \"load-balancer.hetzner.cloud/health-check-interval\": \"15s\"\n \"load-balancer.hetzner.cloud/health-check-timeout\":
\"10s\"\n \"load-balancer.hetzner.cloud/health-check-retries\": \"3\"\n \"load-balancer.hetzner.cloud/hostname\":
\"lb.staging.example.com\"\nports:\n web:\n redirections:\n entryPoint:\n
\ to: websecure\n scheme: https\n permanent: true\n proxyProtocol:\n
\ trustedIPs:\n - 127.0.0.1/32\n - 10.0.0.0/8\n forwardedHeaders:\n
\ trustedIPs:\n - 127.0.0.1/32\n - 10.0.0.0/8\n websecure:\n
\ proxyProtocol:\n trustedIPs:\n - 127.0.0.1/32\n - 10.0.0.0/8\n
\ forwardedHeaders:\n trustedIPs:\n - 127.0.0.1/32\n - 10.0.0.0/8\n
\ cnpg:\n port: 54333\n expose:\n default: true\n exposedPort: 54333\n
\ protocol: TCP\n proxyProtocol:\n trustedIPs:\n - 127.0.0.1/32\n
\ - 10.0.0.0/8\n forwardedHeaders:\n trustedIPs:\n - 127.0.0.1/32\n
\ - 10.0.0.0/8\npodDisruptionBudget:\n enabled: true\n maxUnavailable:
33%\nadditionalArguments:\n - \"--providers.kubernetesingress.ingressendpoint.publishedservice=traefik/traefik\"\nresources:\n
\ requests:\n cpu: \"100m\"\n memory: \"50Mi\"\n limits:\n cpu: \"300m\"\n
\ memory: \"150Mi\"\nautoscaling:\n enabled: true\n minReplicas: 3\n maxReplicas:
10"
version: 34.3.0```
## Expected Behavior
The `valuesContent` field should be properly formatted with consistent indentation and line breaks, making it easier to read and modify.
## Impact
This formatting issue makes it difficult to enable additional features like metrics for Traefik, as the configuration is hard to read and modify.
## Possible Solution
Review and fix the template generation for Traefik values to ensure proper YAML formatting is preserved when the HelmChart resource is created.
Metadata
Metadata
Assignees
Labels
No labels