Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultDir is the default path for the token and certificate // files. DefaultDir = "/var/run/secrets/kubernetes.io/serviceaccount/" // DefaultTokenFile is the default file with the bearer token used // in requests to the Kubernetes API server. DefaultTokenFile = DefaultDir + "token" // DefaultCAFile is the default root certificate used by requests // with a bearer token, sent to the Kubernetes API Server. DefaultCAFile = DefaultDir + "ca.crt" )
View Source
const (
// DefaultAWSRegion is the default Region used by the AWS client.
DefaultAWSRegion = "eu-central-1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWS ¶
type AWS struct {
// contains filtered or unexported fields
}
AWS executes HTTP requests to the AWS API.
func NewAWSClient ¶
NewAWSClient creates a new client targeted to the specified region of the current AWS account.
func (*AWS) GetInstancesToRetire ¶
GetInstancesToRetire returns the list of EC2 instances with scheduled events.
type Kubernetes ¶
type Kubernetes struct {
// contains filtered or unexported fields
}
Kubernetes executes HTTP requests to the Kubernetes API Server.
func NewKubernetesClient ¶
func NewKubernetesClient(k8sURL, caFile, tokenFile string) ( *Kubernetes, error, )
NewKubernetesClient creates a new HTTP client pointing to the Kubernetes API server specified by k8sURL.
func (*Kubernetes) GetMatchingNodes ¶
func (c *Kubernetes) GetMatchingNodes( instNames []string, labelFilter map[string]string, ) ([]string, error)
GetMatchingNodes returns the nodes from the cluster matching the specified instance list.
If labelFilter is set, only nodes with the specified labels are matched.
type Metadata ¶
type Metadata struct { Name string `json:"name,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
Metadata contains the node's name and labels.
Click to show internal directories.
Click to hide internal directories.