Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1000 Bytes

README copy.md

File metadata and controls

44 lines (33 loc) · 1000 Bytes

Butcherctl

A service that kills idle pods in your kubernetes cluster.

kubernetes data structs

  • PodMetricsList
// PodMetricsList : PodMetricsList stores api metric  object
type PodMetricsList struct {
	Kind       string `json:"kind"`
	APIVersion string `json:"apiVersion"`
	Metadata   struct {
		SelfLink string `json:"selfLink"`
	} `json:"metadata"`
	Items []struct {
		Metadata struct {
			Name              string    `json:"name"`
			Namespace         string    `json:"namespace"`
			SelfLink          string    `json:"selfLink"`
			CreationTimestamp time.Time `json:"creationTimestamp"`
		} `json:"metadata"`
		Timestamp  time.Time `json:"timestamp"`
		Window     string    `json:"window"`
		Containers []struct {
			Name  string `json:"name"`
			Usage struct {
				CPU    string `json:"cpu"`
				Memory string `json:"memory"`
			} `json:"usage"`
		} `json:"containers"`
	} `json:"items"`
}

Local development redis

sudo docker run --name my-first-redis -d redis