cloud-agent

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 8 Imported by: 0

README

Cloud Agent

license Go Report Card build Coverage

The simple and easy-to-use program designed to watch user activity and possible orphan clusters for Cloud Providers:

  • Gardener
  • GCP (work in progress)

This application is created with a view to using it as the tmux status. To fulfill this criterion the procedure of getting resources from the gardener is separated and is in the second service which serves the UNIX socket that is used by the first one. This architecture allows not to block the main tmux process during calling the right gardener endpoint.

Prerequisites

Installation

  1. Build program:

    make build
    
  2. Add program to PATH and install it as a system agent:

    make ln-to-path
    make install-agent kubeconfigPath=<KUBECONFIG_PATH> namespace=<NAMESPACE>
    

    NOTE: for local development or need to get more informations from the agent you can pass more arguments to the make install-agent command like: other_flags=--agentVerbose.

  3. Check if program works by getting its logs:

    tail /tmp/cloud-agent.stdout
    
  4. After waiting ~60 seconds for first iteration of the watcher you can get cluster state:

    cloudagent state --createdBy <OWNER_NAME>
    

Un-installation

  1. Remove application from path and remove system agent:

    make rm-from-path
    make uninstall-agent
    

Integration with tmux

To add this application to tmux put line below in the ~/.tmux.conf file:

set -ag status-right ' #(cloudagent state --createdBy <OWNER_NAME> -o text) '

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL