kubernetes-deploy

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

README

kubernetes-deploy

A Go module for deploying to Kubernetes and retrieving status of that deploy.

Useful for deploy bots.

Includes main.go sample app demonstrates its features.

Build Status

How does it work?

Calls Kubernetes API to update the image of an existing deployment and checks that new images are running successful.

Authorization for Kubernetes API via Authorization: Bearer <token> header. Offers a BearerTokenRetriever interface to provide flexibility -- either grab a long-lived token once from an environment variables, or refresh and retrieve short-lived tokens prior to each call.

NOTE that you need to have a running deployment of your app in your Kubernetes cluster first. Deploying only changes an existing deployment's image to a new Docker image.

Getting Started with Sample Program

Copy the sample .env file and fill in your values.

cp .env-sample .env

The sample main.go program supports two commands:

# list current pods in deployment
go run main.go ls     

# deploy container with this specific tag
go run main.go deploy 77d0ea51fdc30234918f2726d26479c66b7f777   

Run tests

go test ./...

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