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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user