custom yaml marshaling in go

In Go, you need to have field tags in your structs to instruct YAML machinery to properly marshal and unmarshal, i.e. convert from and to YAML bytes. type User struct { Name string `yaml:"name"` Surname string `yaml:"surname"` } This requirement cannot always be easily achievable when you don’t control all the implementation of the types of the fields. Go playground link. package main import ( "log" "net/url" "gopkg.in/yaml.v3" ) func main() { type User struct { Name string `yaml:"name"` Surname string `yaml:"surname"` Website *url.

installing talos on hetzner dedicated server

When you get a bare-metal instance, like EX44, from Hetzner (not Hetzner Cloud service), it gives you access to a real machine with all the quirks. As I was trying to install Talos OS v1.7.0 to get an immutable OS for my small bare-metal cluster, it just didn’t work. I even had a technician write ISO to a USB and plug it in and enable a KVM switch for me so that I can see what’s happening because it simply wouldn’t boot.

cluster autoscaler

Do you know to what properties of the candidate node group the Kubernetes autoscaler looks at exactly? It scans the node groups and looks at their members’ allocatable capacity and here is an example Node in GCP whose type is n2-standard-8, i.e. 8 CPU and 32GB: Capacity: cpu: 8 ephemeral-storage: 203056560Ki hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 32859412Ki pods: 110 Allocatable: cpu: 7910m ephemeral-storage: 105532546763 hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 29064468Ki pods: 110 If you create a Pod that requests 30Gi of memory, it will not trigger a scale-up because autoscaler doesn’t think that a similar node would be able to accommodate the Pod; it uses allocatable numbers in its calculations.