Documentation ¶
Index ¶
- Constants
- Variables
- func AutoscalerClusterNameTag(cluster string) string
- func CreateSession() *session.Session
- func GetEC2Tag(tags []*ec2.Tag, name string) *ec2.Tag
- func KubeClusterTag(cluster string) string
- func ListSecurityGroups(ec2Svc *ec2.EC2, vpcId string) ([]*ec2.SecurityGroup, error)
- func ListSubnets(ec2Svc *ec2.EC2, vpcId string) ([]*ec2.Subnet, error)
- func VPCFilter(vpcId string) *ec2.Filter
- type ACMService
- type EC2InstancePricing
- type EC2Service
- type EKSService
- func (s *EKSService) CreateNodepool(ctx context.Context, cc *v1alpha1.ClusterConfig, np *v1alpha1.Nodepool) error
- func (s *EKSService) DeleteNodeGroupNetworkingResources(ctx context.Context, nodegroup string) error
- func (s *EKSService) DeleteNodepool(ctx context.Context, clusterName string, nodePool string) error
- func (s *EKSService) GetAuthToken(ctx context.Context, cluster string, status types.ClusterStatus) (authToken *types.AuthToken, err error)
- func (s *EKSService) GetAvailableVersions(ctx context.Context) ([]string, error)
- func (s *EKSService) GetCluster(ctx context.Context, name string) (cluster *types.Cluster, err error)
- func (s *EKSService) IsNodepoolDeleted(ctx context.Context, clusterName string, nodepoolName string) (deleted bool, err error)
- func (s *EKSService) IsNodepoolReady(ctx context.Context, clusterName string, nodepoolName string) (ready bool, err error)
- func (s *EKSService) ListClusters(ctx context.Context) (clusters []*types.Cluster, err error)
- func (s *EKSService) TagSubnetsForCluster(ctx context.Context, clusterName string, subnetIds []string) error
- func (s *EKSService) UnTagSubnetsForCluster(ctx context.Context, clusterName string, subnetIds []string) error
- type IAMService
Constants ¶
View Source
const ( // By default STS signs the url for 15 minutes so we are creating a // rfc3339 timestamp with expiration in 14 minutes as part of the token, which // is used by some clients (client-go) who will refresh the token after 14 mins TOKEN_EXPIRATION_MINS = 14 URL_TIMEOUT_SECONDS = 60 )
View Source
const ( EKSServicePolicyARN = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy" EKSClusterPolicyARN = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy" )
View Source
const ( TagSubnetScope = "k11n.dev/subnetScope" TagClusterName = "k11n.dev/clusterName" TagClusterActivated = "k11n.dev/clusterActivated" TagAutoscalerEnabled = "k8s.io/cluster-autoscaler/enabled" TagKonstellation = "Konstellation" TagEKSNodeGroupName = "eks:nodegroup-name" TagVPCTopology = "k11n.dev/topology" TagKubeClusterPrefix = "kubernetes.io/cluster/" TagValue1 = "1" TagValuePrivate = "private" TagValuePublic = "public" TagValueOwned = "owned" TagValueTrue = "true" )
View Source
const (
DefaultPageSize = 100
)
Variables ¶
View Source
var EKSAllowedInstanceSeries = map[string]bool{ "t3": true, "t3a": true, "m5": true, "m5a": true, "c5": true, "r5": true, "r5a": true, "g4dn": true, "p2": true, "p3": true, "p3dn": true, }
View Source
var EKSAllowedInstanceSizes = map[string]bool{ "medium": true, "large": true, "xlarge": true, "2xlarge": true, "4xlarge": true, "8xlarge": true, "9xlarge": true, "12xlarge": true, }
View Source
var EKSAvailableVersions = []string{
"1.19",
"1.18",
"1.17",
"1.16",
}
Functions ¶
func CreateSession ¶
func KubeClusterTag ¶
func ListSecurityGroups ¶
Types ¶
type ACMService ¶
func NewACMService ¶
func NewACMService(s *session.Session) *ACMService
func (*ACMService) ImportCertificate ¶
func (a *ACMService) ImportCertificate(ctx context.Context, cert []byte, pkey []byte, chain []byte, existingID string) (certificate *types.Certificate, err error)
func (*ACMService) ListCertificates ¶
func (a *ACMService) ListCertificates(ctx context.Context) (certificates []*types.Certificate, err error)
type EC2InstancePricing ¶
type EC2InstancePricing struct { InstanceType string InstanceSeries string InstanceSize string CurrentGeneration bool Memory string Storage string VCPUs int GPUs int OperatingSystem string MaxIPs int EBSThroughput string SupportsEnhancedNetworking bool NetworkPerformance string OnDemandPriceUSD float32 }
func ListEC2Instances ¶
type EC2Service ¶
func NewEC2Service ¶
func NewEC2Service(s *session.Session) *EC2Service
type EKSService ¶
func NewEKSService ¶
func NewEKSService(s *session.Session) *EKSService
func (*EKSService) CreateNodepool ¶
func (s *EKSService) CreateNodepool(ctx context.Context, cc *v1alpha1.ClusterConfig, np *v1alpha1.Nodepool) error
func (*EKSService) DeleteNodeGroupNetworkingResources ¶
func (s *EKSService) DeleteNodeGroupNetworkingResources(ctx context.Context, nodegroup string) error
func (*EKSService) DeleteNodepool ¶
func (*EKSService) GetAuthToken ¶
func (s *EKSService) GetAuthToken(ctx context.Context, cluster string, status types.ClusterStatus) (authToken *types.AuthToken, err error)
func (*EKSService) GetAvailableVersions ¶
func (s *EKSService) GetAvailableVersions(ctx context.Context) ([]string, error)
func (*EKSService) GetCluster ¶
func (*EKSService) IsNodepoolDeleted ¶
func (*EKSService) IsNodepoolReady ¶
func (*EKSService) ListClusters ¶
func (*EKSService) TagSubnetsForCluster ¶
func (*EKSService) UnTagSubnetsForCluster ¶
type IAMService ¶
func NewIAMService ¶
func NewIAMService(s *session.Session) *IAMService
func (*IAMService) ListEKSServiceRoles ¶
func (s *IAMService) ListEKSServiceRoles() (roles []*iam.Role, err error)
func (*IAMService) ListStandardRoles ¶
func (s *IAMService) ListStandardRoles() ([]*iam.Role, error)
*
- Lists roles that are not service linked
Click to show internal directories.
Click to hide internal directories.