Skip to content

Commit

Permalink
Don't run the CRD validation if validation flag is false (#1720)
Browse files Browse the repository at this point in the history
CRD validation can result in warning logs. These should be skipped if running commands with '--validate-install=false'.

Signed-off-by: Jan Schlicht <jan@d2iq.com>
  • Loading branch information
Jan Schlicht committed Oct 16, 2020
1 parent 086302e commit 68605c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/kudoctl/util/kudo/kudo.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ func NewClientForConfig(config *rest.Config, validateInstall bool) (*Client, err
KubeClientset: kubeClient.KubeClient,
}

validationErr := client.VerifyServedCRDs(kubeClient)
if validateInstall && validationErr != nil {
return nil, validationErr
if validateInstall {
if err := client.VerifyServedCRDs(kubeClient); err != nil {
return nil, err
}
}

return client, nil
Expand Down

0 comments on commit 68605c2

Please sign in to comment.