terraform-hcloud-kube-hetzner icon indicating copy to clipboard operation
terraform-hcloud-kube-hetzner copied to clipboard

add kubelet configuration

Open Atrox opened this issue 9 months ago • 8 comments

Example:

# https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/
k3s_kubelet_config = <<-EOT
  apiVersion: kubelet.config.k8s.io/v1beta1
  kind: KubeletConfiguration
  imageGCLowThresholdPercent: 40
  imageGCHighThresholdPercent: 50
  imageMaximumGCAge: 24h
EOT

Atrox avatar Feb 23 '25 20:02 Atrox

Thanks @Atrox, that's a better way of configuring it than what we have now with the command line options k3s_server_kubelet_args and k3s_agent_kubelet_args.

mysticaltech avatar Mar 23 '25 09:03 mysticaltech

Fixed the issues. Thanks for the catch regarding the autoscaler. I don't use those myself so I didn't notice that typo...

Atrox avatar Mar 24 '25 19:03 Atrox

@Atrox Again thanks for this. There's one thing though, maybe you are on windows and using a different kind of line ending. Because the diffs change whole blocks and files, it's hard to pin point what actually really changed. Please set your file editor to edit in unix mode, that way I can better review the PR. Screenshot From 2025-05-18 08-23-48

mysticaltech avatar May 18 '25 06:05 mysticaltech

@mysticaltech i don't think the issue in that specific block is line endings. I formatted the file, so that all the lines match up with the '='. The same way it currently is, just tried to follow the project style.

Should I remove the formatting?

edit: fwiw, I did the PR on unix

Atrox avatar May 18 '25 08:05 Atrox

Ah I see @Atrox . In that case, please just run terraform fmt

mysticaltech avatar May 18 '25 08:05 mysticaltech

@mysticaltech fmt doesn't change any file for me. terraform fmt -check successfully exits on my machine.

Atrox avatar May 18 '25 09:05 Atrox

@mysticaltech did a rebase with master + terraform fmt, alignment with = stays the same.

Atrox avatar May 18 '25 09:05 Atrox

No worries, thanks for trying, I will test it ASAP and merge!

mysticaltech avatar May 18 '25 10:05 mysticaltech