Skip to content

rt-logs is a Helm plugin designed for CI/CD pipelines, enabling real-time log collection from Kubernetes resources without direct cluster access. It's tailored for scenarios requiring post-release log analysis in restricted-access environments.

License

Notifications You must be signed in to change notification settings

noperformance/helm-rt-logs

Repository files navigation

Helm real time logs Plugin

License Go Report Card CircleCI Release

Overview:

rt-logs is a Helm plugin designed for CI/CD pipelines, enabling real-time log collection from Kubernetes resources without direct cluster access. It's tailored for scenarios requiring post-release log analysis in restricted-access environments.

Prerequisite

  • Helm client with rt-logs plugin installed on the same system
  • Access to the cluster(s) that Helm manages. This access is similar to kubectl access using kubeconfig files. The --kubeconfig, --kube-context and --namespace flags can be used to set the kubeconfig path, kube context and namespace context to override the environment configuration.

Install

Based on the version in plugin.yaml, release binary will be downloaded from GitHub:

$ helm plugin install https://github.com/noperformance/helm-rt-logs
Downloading and installing helm-rt-logs v0.1.0 ...
https://github.com/noperformance/helm-rt-logs/releases/download/v0.1.0/helm-rt-logs_0.1.0_darwin_amd64.tar.gz
Installed plugin: rt-logs

For Windows (using WSL)

Helm's plugin install hook system relies on /bin/sh, regardless of the operating system present. Windows users can work around this by using Helm under WSL.

$ wget https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz
$ tar xzf helm-v3.0.0-linux-amd64.tar.gz
$ ./linux-amd64/helm plugin install https://github.com/noperformance/helm-rt-logs

Usage

$ helm rt-logs RELEASE [flags]

		tail logs of a release

Usage:
  rtlogs [flags] RELEASE

Flags:
  -h, --help                    help for rtlogs
      --stop-string string      string to stop the logs
      --stop-timeout int        timeout to stop the logs, in Seconds!
  -o, --only-failed             tail logs only from failed pods
  -s, --time-since int          time since to start the logs
  -d, --debug                   enables debug messages

Support old helm

No

Todo

  • Enhance Debugging Features
  • Break down large functions into smaller, more manageable ones. / Improve code comments for better understanding and maintenance.
  • Implement Advanced Error Handling
  • Optimize Performance / Goroutines control
  • Expand Filtering Capabilities / Additional flags
  • Tests
  • ? CI/CD Pipeline Integration ?

About

rt-logs is a Helm plugin designed for CI/CD pipelines, enabling real-time log collection from Kubernetes resources without direct cluster access. It's tailored for scenarios requiring post-release log analysis in restricted-access environments.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published