-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Minify and Flatten for In-cluster deployment with Minikube #588
Conversation
…or=Alero Awani <[email protected]> Signed-off-by: Alero Awani <[email protected]>
…uthor=Alero Awani <[email protected]> Signed-off-by: Alero Awani <[email protected]>
Thanks for tackling this, @Alero-Awani |
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.
LGTM
@Alero-Awani Can you fix these lint failures? then we are good to go. |
utils/kubernetes/client.go
Outdated
if err != nil { | ||
return nil, ErrValidateConfig(err) | ||
return nil, nil, err |
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.
Please reuse/define a new meshkit error.
utils/kubernetes/client.go
Outdated
if err != nil { | ||
return nil, ErrLoadConfig(err) | ||
return nil, nil, err |
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.
Please reuse/define a new meshkit error.
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.
Alright Noted! Thank you for the review 😃
Signed-off-by: Alero Awani <[email protected]>
1f35774
to
5614a67
Compare
utils/kubernetes/client.go
Outdated
if err != nil{ | ||
return nil, err | ||
} | ||
if config, err = clientcmd.RESTConfigFromKubeConfig(cfgFile); err == nil { | ||
return config, err |
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.
return config, err | |
return config, err |
While this is not immediately due to your changes, you can improve the logic to ensure meshkit error is returned while you are here.
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.
Alright thank you for this. I will keep in mind to prioritize returning Meshkit errors
…[email protected]> Signed-off-by: Alero Awani <[email protected]>
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.
Thanks @Alero-Awani
Signed-off-by: Mohd Uzair <[email protected]>
Description
This PR introduces a central function
ProcessConfig
for processing kubeconfig files, encapsulating the functionality for loading, validating, and writing kubeconfig files, whether from a file location or a []byte input.The function has been integrated into the
DetectKubeConfig
, addressing this issue which specifically occurs when running the commandmesheryctl system start -p Kubernetes
.Fixes #11546
Signed commits