feat(k8s): Add detect env vars option (#4488)

* feat(k8s): Add detect env vars option

Have added the option to trigger the k8s module based on what env vars
are set, this has been done in a backwards compatible way so if nothing
is changed from the defaults the module will still behave the same way
as before. This is similar to what I did in #4486 for the python module
and if goes well I'd like to rollout to other modules.

* Update src/modules/kubernetes.rs

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Update src/modules/kubernetes.rs

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Thomas O'Donnell
2024-04-06 15:30:19 +02:00
committed by GitHub
parent 3e3f18ef27
commit e3b5dff352
4 changed files with 34 additions and 5 deletions
+8
View File
@@ -952,6 +952,7 @@
"default": {
"context_aliases": {},
"contexts": [],
"detect_env_vars": [],
"detect_extensions": [],
"detect_files": [],
"detect_folders": [],
@@ -4256,6 +4257,13 @@
"type": "string"
}
},
"detect_env_vars": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
},
"contexts": {
"default": [],
"type": "array",