diff --git a/package.json b/package.json index c111b0ef..d4843c17 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "Juozas Gaigalas ", "Alexander ", "Taras Novak ", - "Leonardo Murillo " + "Leonardo Murillo ", + "Seth Falco " ], "publisher": "weaveworks", "icon": "resources/icons/gitops-logo.png", @@ -321,6 +322,11 @@ "type": "string", "default": "60", "description": "Seconds until SIGTERM for every shell exec (except `kubectl proxy`). Set to 0 for no timeout." + }, + "gitops.ignoreConfigRecommendations": { + "type": "boolean", + "default": false, + "description": "Stop recommending changes to editor or extension settings." } } }, diff --git a/src/commands/showLogs.ts b/src/commands/showLogs.ts index 0e02f7ca..6c547387 100644 --- a/src/commands/showLogs.ts +++ b/src/commands/showLogs.ts @@ -1,9 +1,9 @@ -import { commands, window } from 'vscode'; +import { ConfigurationTarget, commands, window, workspace } from 'vscode'; import { getPodsOfADeployment } from 'cli/kubernetes/kubectlGet'; +import { ResourceNode, podResourceKind } from 'types/showLogsTypes'; import { ClusterDeploymentNode } from 'ui/treeviews/nodes/cluster/clusterDeploymentNode'; import { getResourceUri } from 'utils/getResourceUri'; -import { ResourceNode, podResourceKind } from 'types/showLogsTypes'; /** * Show logs in the editor webview (running Kubernetes extension command) @@ -31,4 +31,32 @@ export async function showLogs(deploymentNode: ClusterDeploymentNode): Promise { + if (!result) { + return; + } + + if (result === 'Never Show Again') { + workspace.getConfiguration('gitops').update('ignoreConfigRecommendations', true, ConfigurationTarget.Global); + return; + } + + vscKubeConfig.update('autorun', true, ConfigurationTarget.Global); + vscKubeConfig.update('follow', true, ConfigurationTarget.Global); + }); }