Documentation
¶
Index ¶
- func CreateIAMCloudFormationStack(ctx context.Context) error
- func GetAccountID(ctx context.Context) (string, error)
- func LoadSDKConfig(ctx context.Context) (aws.Config, error)
- func NewAWSCloudProvider() (cloud.CloudProvider, error)
- func SelectedProfile() string
- func SetAWSSpecificEnvs(ctx context.Context) error
- type AWS
- func (a *AWS) GetVMSpecs(ctx context.Context, vmType string) (*cloud.VMSpec, error)
- func (a *AWS) SetupDisasterRecovery(ctx context.Context) error
- func (*AWS) UpdateCapiClusterValuesFile(ctx context.Context, path string, updates any) error
- func (*AWS) UpdateMachineTemplate(ctx context.Context, clusterClient client.Client, name string, updates any) error
- type AWSMachineTemplateUpdates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateIAMCloudFormationStack ¶
CreateIAMCloudFormationStack creates / updates the AWS CloudFormation Stack containing necessary IAM role-policies, required by ClusterAPI and the EC2 instance of the provisioned cluster.
func GetAccountID ¶
GetAccountID returns the AWS Account ID. NOTE: Picks up AWS credentials from the environment.
func LoadSDKConfig ¶ added in v0.31.9
LoadSDKConfig builds an AWS SDK config, pinned to the profile selected in secrets.yaml when there is one. Every AWS SDK client in kubeaid-cli is built from this, so that on a machine carrying several AWS accounts we talk to the account the cluster belongs to rather than the SDK's default profile.
func NewAWSCloudProvider ¶
func NewAWSCloudProvider() (cloud.CloudProvider, error)
func SelectedProfile ¶ added in v0.31.9
func SelectedProfile() string
SelectedProfile returns the ~/.aws profile chosen in secrets.yaml (aws.profile), or "" when the SDK's own default resolution applies.
func SetAWSSpecificEnvs ¶
SetAWSSpecificEnvs sets AWS specific environment variables, required by the 'clusterawsadm bootstrap iam' command / core.getTemplateValues( ) / AWS SDK.
Types ¶
type AWS ¶
type AWS struct {
// contains filtered or unexported fields
}
func (*AWS) GetVMSpecs ¶
func (*AWS) SetupDisasterRecovery ¶
SetupDisasterRecovery sets up the provisioned cluster for Disaster Recovery. NOTE: Picks up AWS credentials from the environment.
func (*AWS) UpdateCapiClusterValuesFile ¶
type AWSMachineTemplateUpdates ¶
type AWSMachineTemplateUpdates struct {
AMIID string
}