feat(kubernetes): parse kubeconfig by default

resolves #5443
This commit is contained in:
Jan De Dobbeleer 2024-09-02 12:33:44 +02:00 committed by Jan De Dobbeleer
parent 47976a876d
commit 90f3789057
4 changed files with 8 additions and 5 deletions

View file

@ -90,7 +90,7 @@ func (k *Kubectl) Enabled() bool {
}
}()
parseKubeConfig := k.props.GetBool(ParseKubeConfig, false)
parseKubeConfig := k.props.GetBool(ParseKubeConfig, true)
if parseKubeConfig {
return k.doParseKubeConfig()

View file

@ -128,7 +128,9 @@ func (l *language) Enabled() bool {
if len(l.displayMode) == 0 {
l.displayMode = l.props.GetString(DisplayMode, DisplayModeFiles)
}
l.loadLanguageContext()
switch l.displayMode {
case DisplayModeAlways:
enabled = true

View file

@ -2100,7 +2100,7 @@
"type": "boolean",
"title": "Parse kubeconfig",
"description": "Parse kubeconfig files instead of calling out to kubectl to improve performance.",
"default": false
"default": true
},
"context_aliases": {
"type": "object",

View file

@ -30,12 +30,12 @@ import Config from "@site/src/components/Config.js";
## Properties
| Name | Type | Default | Description |
| Name | Type | Default | Description |
| ------------------ | :-------: | :-----: | ------------------------------------------------------------------------------- |
| `display_error` | `boolean` | `false` | show the error context when failing to retrieve the kubectl information |
| `parse_kubeconfig` | `boolean` | `false` | parse kubeconfig files instead of calling out to kubectl to improve performance |
| `parse_kubeconfig` | `boolean` | `true` | parse kubeconfig files instead of calling out to kubectl to improve performance |
| `context_aliases` | `object` | | custom context namespace |
| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached |
| `cache_timeout` | `int` | `0` | in minutes - how long is the context cached |
## Template ([info][templates])
@ -64,6 +64,7 @@ render an empty current namespace using the word "default", you can use somethin
```
{{.Context}} :: {{if .Namespace}}{{.Namespace}}{{else}}default{{end}}
```
:::
[templates]: /docs/configuration/templates