eks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package eks implements EKS utils.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterStatus

func GetClusterStatus(out *aws_eks_v2.DescribeClusterOutput) (string, string, string)

Returns version, status, and health information.

func IsErrClusterDeleted

func IsErrClusterDeleted(err error) bool

Types

type Cluster

type Cluster struct {
	Name   string `json:"name"`
	ARN    string `json:"arn"`
	Region string `json:"region"`

	Version         string `json:"version"`
	PlatformVersion string `json:"platform_version"`
	MothershipState string `json:"mothership_state"`
	Status          string `json:"status"`
	Health          string `json:"health"`

	CreatedAt time.Time `json:"created_at"`

	VPCID             string   `json:"vpc_id"`
	ClusterSGID       string   `json:"cluster_sg_id"`
	AttachedELBv2ARNs []string `json:"attached_elbv2_arns,omitempty"`

	Endpoint             string `json:"endpoint"`
	CertificateAuthority string `json:"certificate_authority"`
	OIDCIssuer           string `json:"oidc_issuer"`
}

func GetCluster

func GetCluster(ctx context.Context, cfg aws.Config, clusterName string, opts ...OpOption) (Cluster, error)

func (Cluster) KubeconfigWithAWSIAMAuthenticator

func (c Cluster) KubeconfigWithAWSIAMAuthenticator(opts ...OpOption) (clientcmd_api_v1.Config, error)

func (Cluster) String

func (c Cluster) String() string

func (Cluster) WriteKubeconfigWithAWSIAMAuthenticator

func (c Cluster) WriteKubeconfigWithAWSIAMAuthenticator(opts ...OpOption) (string, error)

type Op

type Op struct {
	// contains filtered or unexported fields
}

type OpOption

type OpOption func(*Op)

func WithClusterCAFile

func WithClusterCAFile(v string) OpOption

Set cluster CA file path to write.

func WithClusterName

func WithClusterName(name string) OpOption

func WithKubeconfigFile

func WithKubeconfigFile(v string) OpOption

Set kubeconfig file path to write.

func WithLimit

func WithLimit(limit int) OpOption

func WithRoleARN

func WithRoleARN(v string) OpOption

func WithSessionName

func WithSessionName(v string) OpOption

Jump to

Keyboard shortcuts

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