aws

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEC2ServicePrincipal added in v1.0.18

func GetEC2ServicePrincipal(partition string) string

GetEC2ServicePrincipal returns the correct EC2 service principal for a partition. AWS China (aws-cn) uses ec2.amazonaws.com.cn All other partitions use ec2.amazonaws.com

func GetPartitionDNSSuffix added in v1.0.18

func GetPartitionDNSSuffix(partition string) string

GetPartitionDNSSuffix returns the DNS suffix for a given partition

func GetPartitionFromConfig added in v1.0.18

func GetPartitionFromConfig(ctx context.Context, cfg aws.Config) (string, error)

GetPartitionFromConfig determines the AWS partition from the AWS config by calling STS GetCallerIdentity and parsing the ARN

func GetPartitionFromRegionFallback added in v1.0.18

func GetPartitionFromRegionFallback(region string) string

GetPartitionFromRegionFallback determines the AWS partition based on the region prefix This is used as a fallback when partition info is not in the manifest

func GetServiceEndpointForPartition added in v1.0.18

func GetServiceEndpointForPartition(service, region, partition string) string

GetServiceEndpointForPartition constructs service endpoints for different partitions

func ParsePartitionFromARN added in v1.0.18

func ParsePartitionFromARN(arn string) (string, error)

ParsePartitionFromARN extracts the partition from an ARN string ARN format: arn:partition:service:region:account-id:resource

Types

type Artifact

type Artifact struct {
	Name        string `json:"name"`
	Arch        string `json:"arch"`
	OS          string `json:"os"`
	URI         string `json:"uri"`
	ChecksumURI string `json:"checksum_uri,omitempty"`
	GzipURI     string `json:"gzip_uri,omitempty"`
}

type Config

type Config interface {
	ConfigureAws(ctx context.Context) error
	GetConfig() *aws.Config
}

type EksPatchRelease

type EksPatchRelease struct {
	Version      string     `json:"version"`
	PatchVersion string     `json:"patch_version"`
	ReleaseDate  string     `json:"release_date"`
	Artifacts    []Artifact `json:"artifacts"`
}

type IamRolesAnywhereRelease

type IamRolesAnywhereRelease struct {
	Version   string     `json:"version"`
	Artifacts []Artifact `json:"artifacts"`
}

type Manifest

type Manifest struct {
	SupportedEksReleases     []SupportedEksRelease     `json:"supported_eks_releases"`
	IamRolesAnywhereReleases []IamRolesAnywhereRelease `json:"iam_roles_anywhere_releases"`
	SsmReleases              []SsmRelease              `json:"ssm_releases"`
	RegionConfig             RegionConfig              `json:"region_config"`
}

type RegionConfig added in v1.0.9

type RegionConfig map[string]RegionData

RegionConfig represents the structure of the manifest file

type RegionData added in v1.0.9

type RegionData struct {
	EcrAccountID  string          `json:"ecr_account_id"`
	Partition     string          `json:"partition"`
	DnsSuffix     string          `json:"dns_suffix"`
	CredProviders map[string]bool `json:"cred_providers"`
}

RegionData represents data for a specific region

func GetRegionConfig added in v1.0.9

func GetRegionConfig(ctx context.Context, region string) (*RegionData, error)

func GetRegionConfigFromManifest added in v1.0.17

func GetRegionConfigFromManifest(ctx context.Context, region, manifestURI string) (*RegionData, error)

type Source

type Source struct {
	Eks        EksPatchRelease
	Iam        IamRolesAnywhereRelease
	RegionInfo RegionData
}

Source defines a single version source for aws provided artifacts

func GetLatestSource

func GetLatestSource(ctx context.Context, eksVersion, region string) (Source, error)

GetLatestSource gets the source for latest version of aws provided artifacts from the hybrid nodes CDN manifest https://hybrid-assets.eks.amazonaws.com/manifest.yaml

func GetLatestSourceFromManifest added in v1.0.16

func GetLatestSourceFromManifest(ctx context.Context, eksVersion, region, manifestURI string) (Source, error)

GetLatestSourceFromManifest gets the source for latest version of aws provided artifacts from a manifest URI (supports file:// and https:// protocols)

func (Source) GetCniPlugins

func (as Source) GetCniPlugins(ctx context.Context) (artifact.Source, error)

GetCniPlugins satisfies cniplugins.Source

func (Source) GetIAMAuthenticator

func (as Source) GetIAMAuthenticator(ctx context.Context) (artifact.Source, error)

GetIAMAuthenticator satisfies iamrolesanywhere.IAMAuthenticatorSource.

func (Source) GetImageCredentialProvider

func (as Source) GetImageCredentialProvider(ctx context.Context) (artifact.Source, error)

GetImageCredentialProvider satisfies imagecredentialprovider.Source.

func (Source) GetKubectl

func (as Source) GetKubectl(ctx context.Context) (artifact.Source, error)

GetKubectl satisfies kubectl.Source.

func (Source) GetKubelet

func (as Source) GetKubelet(ctx context.Context) (artifact.Source, error)

GetKubelet satisfies kubelet.Source.

func (Source) GetSigningHelper

func (as Source) GetSigningHelper(ctx context.Context) (artifact.Source, error)

GetSingingHelper satisfies iamrolesanywhere.SigningHelperSource

type SsmRelease

type SsmRelease struct {
	Version   string     `json:"version"`
	Artifacts []Artifact `json:"artifacts"`
}

type SupportedEksRelease

type SupportedEksRelease struct {
	MajorMinorVersion  string            `json:"major_minor_version"`
	LatestPatchVersion string            `json:"latest_patch_version"`
	PatchReleases      []EksPatchRelease `json:"patch_releases"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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