demo-kube-restarter

command module
v0.0.0-...-17d1d9d Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 14 Imported by: 0

README

Example Kubernetes Restarter from FireHydrant

This repository contains an example Go HTTP service that can handle Slack command extensions from FireHydrant.com. To learn more about command extensions, checkout https://firehydrant.com/docs/integration-guides/slack-command-extensions/

Running this service

Make sure you've exported your KUBECONFIG environment variable. This service does not support in-cluster configuration for Kubernetes clientsets. Please adopt it as you need!

Once you've done that, you can run in your terminal:

export KUBECONIG=~/.kube/config
go get
go run *.go

Then, you should be able to send an example request to it from another terminal window/tab:

$ curl -X POST -H "Content-Type: application/json" -d @examples/restart-deployment.json https://localhost:8080/webhooks

You'll see this service do a quick restart of the pods in the default namespace for the deployment nginx-deployment.

Take a look at the example payload FireHydrant sends when extensions are executed.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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