verify-deployment

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 16 Imported by: 0

README

verify-deployment

Lightweight controller for deployment pipelines.

A typical pipeline use case would be:

kubectl apply -f deployment.yaml && verify-deployment mydeployment

Usage

$ verify-deployment -h
Usage: verify-deployment <DEPLOYMENT>
  -kubeconfig string
    	absolute path to the kubeconfig file
  -master string
    	master url
  -namespace string
    	namespace (default "default")
  -timeout int
    	timeout (s) (default 300)

Scaling up a working deployment

$ kubectl scale deployment analysis --replicas=1 && ./verify-deployment analysis
deployment.extensions/analysis scaled
2019/10/04 08:19:33 INFO: verifying deployment analysis in namespace default
2019/10/04 08:21:28 INFO: 0/1
2019/10/04 08:21:33 INFO: 1/1
2019/10/04 08:21:33 INFO: deployment analysis in namespace default verified

Scaling up a broken deployment

$ kubectl scale deployment analysis --replicas=3 && ./verify-deployment analysis
deployment.extensions/analysis scaled
2019/10/04 08:16:50 INFO: verifying deployment analysis in namespace default
2019/10/04 08:16:55 INFO: pod analysis-5658667675-2d8gb in waiting state (ContainerCreating)
2019/10/04 08:16:55 INFO: pod analysis-5658667675-fxnhh in waiting state (ContainerCreating)
2019/10/04 08:16:55 INFO: pod analysis-5658667675-x2vtv in waiting state (ContainerCreating)
2019/10/04 08:16:55 INFO: 0/3
2019/10/04 08:17:00 INFO: pod analysis-5658667675-2d8gb in waiting state (ContainerCreating)
2019/10/04 08:17:00 INFO: pod analysis-5658667675-fxnhh in waiting state (ContainerCreating)
2019/10/04 08:17:00 INFO: pod analysis-5658667675-x2vtv in waiting state (ContainerCreating)
2019/10/04 08:17:00 INFO: 0/3
2019/10/04 08:17:05 INFO: pod analysis-5658667675-2d8gb in waiting state (ContainerCreating)
2019/10/04 08:17:05 INFO: pod analysis-5658667675-fxnhh in waiting state (ContainerCreating)
2019/10/04 08:17:05 INFO: pod analysis-5658667675-x2vtv in waiting state (ContainerCreating)
2019/10/04 08:17:05 INFO: 0/3
2019/10/04 08:17:10 ERROR: pod analysis-5658667675-2d8gb in waiting state (ErrImagePull)

Scaling down to zero

$ kubectl scale deployment analysis --replicas=0 && ./verify-deployment analysis
deployment.extensions/analysis scaled
2019/10/04 08:15:39 INFO: verifying deployment analysis in namespace default
2019/10/04 08:15:44 INFO: 0/0
2019/10/04 08:15:44 INFO: deployment analysis in namespace default verified

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