kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.18k stars 103 forks source link

Don't run the CRD validation if validation flag is false #1720

Closed nfnt closed 4 years ago

nfnt commented 4 years ago

What this PR does / why we need it: CRD validation can result in warning logs on Kubernetes >=1.19. These should be skipped if running commands with '--validate-install=false'.

Before:

$ kubectl kudo --validate-install=false get instances
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
List of current installed instances in namespace "default":
.

After:

$ kubectl kudo --validate-install=false get instances
List of current installed instances in namespace "default":
.