eks

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package eks contains all of the logic and data structures relevant to enumerating EKS instances and their related resources. It is primarily leveraged by the `methodaws eks` subcommand.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CredsEks added in v0.0.11

func CredsEks(ctx context.Context, cfg aws.Config, clusterName string) (*methodaws.CredentialReport, error)

Types

type AWSResourceReport

type AWSResourceReport struct {
	AccountID string       `json:"account_id" yaml:"account_id"`
	Resources AWSResources `json:"resources"`
	Errors    []string     `json:"errors"`
}

AWSResourceReport contains the EKS resources and any non-fatal errors that occurred during the execution of the

func EnumerateEks

func EnumerateEks(ctx context.Context, cfg aws.Config, regions []string) (*AWSResourceReport, error)

func EnumerateEksForRegion added in v0.0.18

func EnumerateEksForRegion(ctx context.Context, cfg aws.Config, region string) (*AWSResourceReport, error)

EnumerateEksForRegion enumerates all EKS clusters in a specified regionand their associated node groups and EC2 instances. Non-fatal errors will be captured and returned in the report. However, if a fatal error occurs (e.g., during the initial listing of clusters), the function will return early with the error.

type AWSResources

type AWSResources struct {
	EKSClusters []ClusterInfo `json:"eks_clusters" yaml:"eks_clusters"`
}

AWSResources contains all EKS resources.

type ClusterInfo

type ClusterInfo struct {
	eksTypes.Cluster
	NodeGroups []NodeGroup `json:"node_groups" yaml:"node_groups"`
	Region     string      `json:"region" yaml:"region"`
}

ClusterInfo represents an EKS cluster and its associated node groups.

type EC2Instance

type EC2Instance struct {
	InstanceID string `json:"instance_id" yaml:"instance_id"`
}

EC2Instance represents an EC2 instance in the context of an EKS node group.

type NodeGroup

type NodeGroup struct {
	Name      string        `json:"name" yaml:"name"`
	NodeRole  string        `json:"node_role" yaml:"node_role"`
	Instances []EC2Instance `json:"instances" yaml:"instances"`
}

NodeGroup represents an EKS node group and its associated EC2 instances.

Jump to

Keyboard shortcuts

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