React to 1.23 bump

Logging validation functions changed in upstream commit
https://github.com/kubernetes/component-base/commit/54ecfcdac8c92a7f0c88a65a2e9861baa089ac90.
This uses the new function name.
This commit is contained in:
Mike Dame
2021-12-10 10:02:26 -05:00
parent 5fe3ca86ff
commit 2f7c496944
2 changed files with 3 additions and 4 deletions
+2 -2
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)
}
+1 -2
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
}