Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why order of fields is different? Example:

https://kubespec.dev/apps/v1/Deployment https://kubernetes.io/docs/reference/kubernetes-api/workload...

    minReadySeconds: integer
    paused: boolean
    progressDeadlineSeconds: integer
    ...
vs

    selector
    template
    replicas
    minReadySeconds
    ...
I'm very nitpicky about order of fields and I always follow kubernetes documentation order. Not sure where it really comes from, but generally it's good enough and better than alphabetical order (or inconsistent order).


> Not sure where it really comes from,

It's almost certainly from the golang struct https://github.com/kubernetes/api/blob/v0.32.0/apps/v1/types... or its more succinct generated.proto friend https://github.com/kubernetes/api/blob/v0.32.0/apps/v1/gener...

and, as you pointed out, the .dev one appears to just be alphabetical. In their defense, I would guess for humans that are looking for "paused" it's much easier to scan down to the "mnop" area and then look for "paused" than, lol, guess where the paused was introduced in the timeline of a golang struct




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: