Releases: vmware-tanzu/crash-diagnostics
v0.3.10
v0.3.9
v0.3.8
v0.3.7
v0.3.6
v0.3.5
v0.3.5
This is a small release with with the followings
- Update go.mod to use package gexe (which fixes an internal command exec bug)
- Fix to prevent script command
capture_local
from stopping script execution upon error
Changelog
fc708c7 Merge pull request #221 from vladimirvivien/capture_local_error_return
8833fa2 Merge pull request #220 from vladimirvivien/update_echo_module
v0.3.4
This is a large release with several features and many improvements added including:
- Enhancement of the Kubernetes search for
kube_capture
andkube_get
- Script function
run_local
now always return a result, even on error, to avoid halting script execution. - Introduction of the new script function
log
to print timed messages - Script configuration function
kube_config
now supports cluster context name - Introduction of script module load when executing script using the exec package
run_local
update
Before this release, a call to run_local
with an error would cause the entire script to stop and exit in an error. With this release, when a run_local
encounters an error, the error string is returned to the script, allowing for further handling.
log
function
This new script function prints a message, along with an optional prefix, as part of the script execution:
log(prefix="Info", msg="Hello World!")
kube_config
cluster context
This long-awaited update makes it possible for scripts that use Kubernetes-releated functions (kube_capture
, kube_get
) to use specify the cluster's context name to use to connect to the server.
kube_config(path="/path/to/kubeconfig", cluster_context="my-cluster")
Preloading script modules
This new feature is for people using the Crashd-Diagnostics packages to run their own script. With this addition, a script can be launched by passing both the script and a set of other library scripts which are pre-loaded before the actual script.
func main() {
lib := `
def multiply(x, y):
return x*y
`
src := `log(msg="{} * {} = {}".format(3,5, multiply(3,5)))`
exec.ExecuteWithModules("test", strings.NewReader(src), StarlarkModule{Name:"multiply", Srouce:strings.NewReader(lib)})
}
Changelog
65f2d6f Support for script module preloading
a31dd61 Support for cluster context name in kube_config function (#122)
7a31101 Implement starlark log script function
d004762 Modify run_local to return error (#197)
a89ee34 Enhance Kubernetes search and avoid overwriting captured object logs
0f7b22c Extend the timeout for linter
2299d20 Bump up k8s libraries This commit bumps up the k8s libraries to enforce the use of a newer version of github.com/gogo/protobuf.
v0.3.3
This release is mostly to introduce fixes and minor enhancements. These include:
- New parameter to function
capture_local
- Fix to properly parse script argument passed via the
--args
flag - Fix to CAPV provider to properly pull machines
Changelog
17882c6 added windows capv example
a2e37b1 Corrected order of variables to match providers
5a26dc3 Fix to properly parse key=value pair from args flag
de2dc98 add parameter to capture_local
v0.3.2
v0.3.2
This release is a small but consequential in which two new Crashd script functions are introduces and API search functions (kube_get
, kube_capture
) have been update to search by API category
.
copy_to
The new copy_to
function allows script authors to copy files from the local machine (where the script is executing) to remote compute resources.
Example:
res=resources(provider=host_list_provider(hosts=["192.168.100.2","192.168.100.3"]))
copy_to(source_path="./bar/foo.txt", target_path="bar/foo.txt", resources=res)
prog_avail_local
New function prog_avail_local
is a utility function that searches the local PATH for the specified program. If found, it returns the full path of the program on the local machine as shown below:
prog_avail_local("go"')
The previous would return the full path of the Go binary on the local system.
API Resource Category Search
In this release, the API search functionality used by the kube_*
functions (kube_get
and kube_capture
) now supports API resource category search (see Resource Categories for detail).
Example:
kube_get_data = kube_get(categories=["all"], kube_config = kube_config(path="path/to/kubecfg"))
Changelog
f6492f4 Implements support for copy_to() starlark function
d366bed add prog_avail_local function
2d5f02b add 'categories' to search, kind update to 0.9.0
v0.3.1
This version includes a few incremental changes to address the following issues:
(#176) Fix error while running script with --args
flag only
(#178) Fix relative paths for input files
Changelog
b5f0f62 Allows relative paths for kubeconfig and argsfile
5696adf Enables go-linter action for the repo
048c7de Passes an empty initialized map to process args