-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move util funcs in sub packages #5754
Conversation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Codecov Report
@@ Coverage Diff @@
## main #5754 +/- ##
=======================================
Coverage ? 34.88%
=======================================
Files ? 189
Lines ? 20862
Branches ? 0
=======================================
Hits ? 7277
Misses ? 12782
Partials ? 803
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -53,7 +53,7 @@ func main() { | |||
kyvernoClient := internal.CreateKyvernoClient(logger) | |||
client := internal.CreateDClient(logger, ctx, dynamicClient, kubeClient, 15*time.Minute) | |||
// Exit for unsupported version of kubernetes cluster | |||
if !utils.HigherThanKubernetesVersion(kubeClient.Discovery(), logging.GlobalLogger(), 1, 16, 0) { | |||
if !kubeutils.HigherThanKubernetesVersion(kubeClient.Discovery(), logging.GlobalLogger(), 1, 16, 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is no longer needed, we should consider removing it.
Signed-off-by: shuting <shutting06@gmail.com>
* refactor: move util func in sub packages Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * Update pkg/utils/kube/crd.go Signed-off-by: shuting <shutting06@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: shuting <shutting06@gmail.com> Co-authored-by: shuting <shutting06@gmail.com> Signed-off-by: Md Sahil <Mohdssahil1@gmail.com>
* refactor: move util func in sub packages Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * Update pkg/utils/kube/crd.go Signed-off-by: shuting <shutting06@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: shuting <shutting06@gmail.com> Co-authored-by: shuting <shutting06@gmail.com> Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
* refactor: move util func in sub packages Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * Update pkg/utils/kube/crd.go Signed-off-by: shuting <shutting06@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: shuting <shutting06@gmail.com> Co-authored-by: shuting <shutting06@gmail.com> Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Explanation
This PR moves a couple util funcs in sub packages.
The root utils package is too generic and it will be easier to track unit tests coverage.