1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

React to 1.23 bump

Logging validation functions changed in upstream commit
54ecfcdac8.
This uses the new function name.
This commit is contained in:
Mike Dame
2021-12-06 09:21:07 -05:00
parent 5fe3ca86ff
commit 2f7c496944
2 changed files with 3 additions and 4 deletions

View File

@@ -62,9 +62,9 @@ func NewDeschedulerServer() (*DeschedulerServer, error) {
}
// Validation checks for DeschedulerServer.
func (s *DeschedulerServer) Validate() error {
func (s *DeschedulerServer) ValidateAndApply() error {
var errs []error
errs = append(errs, s.Logs.Validate()...)
errs = append(errs, s.Logs.ValidateAndApply())
return utilerrors.NewAggregate(errs)
}

View File

@@ -49,7 +49,6 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
Long: `The descheduler evicts pods which may be bound to less desired nodes`,
Run: func(cmd *cobra.Command, args []string) {
s.Logs.Config.Format = s.Logging.Format
s.Logs.Apply()
// LoopbackClientConfig is a config for a privileged loopback connection
var LoopbackClientConfig *restclient.Config
@@ -59,7 +58,7 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
return
}
if err := s.Validate(); err != nil {
if err := s.ValidateAndApply(); err != nil {
klog.ErrorS(err, "failed to validate server configuration")
return
}