Skip to content

Commit 6c51a68

Browse files
authored
Merge pull request #156 from utkarsh-pro/utkarsh-pro/fix/containerised-uninstall
Fix: linkerd uninstallation inside the container
2 parents 2a6d9f1 + 5846881 commit 6c51a68

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

linkerd/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (linkerd *Linkerd) fetchManifest(version string, isDel bool) (string, error
6666
if err != nil {
6767
return "", ErrFetchManifest(err, err.Error())
6868
}
69-
execCmd := []string{"install", "--ignore-cluster"}
69+
execCmd := []string{"install"}
7070
if isDel {
7171
execCmd = []string{"uninstall"}
7272
}

main.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ func main() {
5353
os.Exit(1)
5454
}
5555

56+
// Set $KUBECONFIG environmental variable
57+
// crucial when adapter's running within the containers
58+
err = os.Setenv("KUBECONFIG", path.Join(
59+
config.KubeConfig[configprovider.FilePath],
60+
fmt.Sprintf("%s.%s", config.KubeConfig[configprovider.FileName], config.KubeConfig[configprovider.FileType])),
61+
)
62+
if err != nil {
63+
// Fail silently
64+
log.Warn(err)
65+
}
66+
5667
// Initialize application specific configs and dependencies
5768
// App and request config
5869
cfg, err := config.New(configprovider.ViperKey)

0 commit comments

Comments
 (0)