GithubHelp home page GithubHelp logo

isabella232 / ht-k8s-action-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from banzaicloud/ht-k8s-action-plugin

0.0 0.0 0.0 16.84 MB

Hollowtrees plugin used to interact with Kubernetes on specific event triggers

License: Apache License 2.0

Makefile 6.39% Go 91.21% Dockerfile 2.40%

ht-k8s-action-plugin's Introduction

Kubernetes Hollowtrees action plugin

This is an action plugin for the Hollowtrees project. It interacts with the Kubernetes API to handle different Hollowtrees events in a K8S cluster.

When started it is listening on a gRPC interface and accepts Hollowtrees events.

Quick start

The project can be build with make. To create the binary locally, run:

make build

It creates the binary in the ./bin directory.

To create a docker image that can be run on Kubernetes run:

make docker-build

It creates a docker image with the name banzaicloud/ht-k8s-action-plugin:$(GIT_REVISION)

Configuration

The following options can be configured when starting the action plugin. Configuration is done through a plugin-config.toml file that can be placed in conf/ or near the binary:

[log]
    format = "text"
    level = "debug"

[plugin]
    port = "8887"

Instead of using a configuration file, environment variables can be used as well with the prefix HTPLUGIN. For example to configure the port where the application will listen, use the environment variable HTPLUGIN_PLUGIN_PORT.

The project is using an in-cluster config to interact with Kubernetes so it must be deployed accordingly.

To run:

kubectl run ht-k8s-action-plugin --image=banzaicloud/ht-k8s-action-plugin:$GITREV  --port=8887

Event types that the plugin can understand:

prometheus.server.alert.SpotTerminationNotice - Prepares a node for termination by draining it similarily to kubectl drain. It cordons the Kubernetes node by making it unschedulable (node.Spec.Unschedulable = true) and evicts or deletes the pods on the node that will be terminated.

Default Hollowtrees plugins

There are a few default Hollowtrees action plugins available:

  • Kubernetes action plugin to execute k8s operations (e.g. graceful drain)
  • AWS autoscaling group plugin to replace instances with a better cost or stability characteristics

ht-k8s-action-plugin's People

Contributors

martonsereg avatar matyix avatar tarokkk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.