Skip to content

Commit

Permalink
fix: use-case while in cluster, connecting to an external (#623)
Browse files Browse the repository at this point in the history
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
  • Loading branch information
Aris Boutselis and arbreezy committed Sep 1, 2023
1 parent fc90dc8 commit 1a7f45c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *Client) GetRestClient() rest.Interface {
func NewClient(kubecontext string, kubeconfig string) (*Client, error) {
var config *rest.Config
config, err := rest.InClusterConfig()
if err != nil {
if kubeconfig != "" || err != nil {
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()

if kubeconfig != "" {
Expand Down

0 comments on commit 1a7f45c

Please sign in to comment.