k9s doesn't honor KUBECONFIG environment variable when replacing value for plugin (#2862)

mine
Varun Rathod 2024-11-28 23:51:03 +05:30 committed by GitHub
parent 4ef39f512b
commit c9ad95ab0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"context"
"errors"
"fmt"
"os"
"strconv"
"strings"
@ -96,6 +97,8 @@ func k8sEnv(c *client.Config) Env {
kcfg := c.Flags().KubeConfig
if kcfg != nil && *kcfg != "" {
cfg = *kcfg
} else {
cfg = os.Getenv("KUBECONFIG")
}
return Env{