Kubeadm: remove klog and util/errors dependencies from the kubeadm system-validators

Created on 21 Aug 2019  Â·  4Comments  Â·  Source: kubernetes/kubeadm

/kind cleanup
/priority important-longterm

as discussed on slack the validators under k/k/cmd/kubeadm/app/utils/system should drop certain dependencies:

mini-guide:

for the validation utils repo, I'd strongly recommend dropping the k8s.io/klog and k8s.io/apimachinery/pkg/util/errors dependencies
the main things I see you might consider changing:
• the places you are logging messages should potentially be returned to the caller as warning/info data (that they could log if desired)
• the places you aggregate multiple errors into a single error (using the apimachinery method), you might consider returning []error (or defining your own type AggregateError []error type that implements Error() string and Errors() []error to allow getting at the underlying errors)

see the conversation history on slack for more detail:

https://kubernetes.slack.com/archives/C2C40FMNF/p1566414724378100?thread_ts=1566411984.368700&cid=C2C40FMNF

https://kubernetes.slack.com/archives/C2C40FMNF/p1566415427380800?thread_ts=1566411984.368700&cid=C2C40FMNF

  • send PR
help wanted kincleanup prioritimportant-longterm

Most helpful comment

I can do this.
/assign

All 4 comments

I can do this.
/assign

punting to 1.17 as we are in code freeze.

@neolit123 I must have screwed up the reference as this has been merged and this issue can be closed now.

@Klaven
thanks, i guess the next step is to decide on the versioning of the validators repo and move them.

cc @yastij

Was this page helpful?
0 / 5 - 0 ratings