Documentation
¶
Overview ¶
Package aws contains AWS-specific structures for installer configuration and management.
Index ¶
Constants ¶
const ( // AvailabilityZoneType is the type of regular zone placed on the region. AvailabilityZoneType = "availability-zone" // LocalZoneType is the type of AWS Local Zones placed on the metropolitan area. LocalZoneType = "local-zone" // WavelengthZoneType is the type of AWS Wavelength Zones placed on the telecommunications // providers’ data centers at the edge of the 5G network. WavelengthZoneType = "wavelength-zone" // ZoneOptInStatusOptedIn is the opt-in status of the zone. // For Availability Zones, this parameter always has the value of opt-in-not-required. // For Local Zones and Wavelength Zones, this parameter is the opt-in status. ZoneOptInStatusOptedIn = "opted-in" )
const ( // VolumeTypeGp2 is the type of EBS volume for General Purpose SSD gp2. VolumeTypeGp2 = "gp2" // VolumeTypeGp3 is the type of EBS volume for General Purpose SSD gp3. VolumeTypeGp3 = "gp3" )
const Name string = "aws"
Name is name for the AWS platform.
Variables ¶
This section is empty.
Functions ¶
func IsSecretRegion ¶ added in v0.4.15
IsSecretRegion returns true if the region is part of either the ISO or ISOB partitions.
Types ¶
type EC2Metadata ¶ added in v0.4.15
type EC2Metadata struct {
// Authentication determines whether or not the host requires the use of authentication when interacting with the metadata service.
// When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service.
// When omitted, this means the user has no opinion and the value is left to the platform to choose a good
// default, which is subject to change over time. The current default is optional.
// At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API
// https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html
// +kubebuilder:validation:Enum=Required;Optional
// +optional
Authentication string `json:"authentication,omitempty"`
}
EC2Metadata defines the metadata service interaction options for an ec2 instance. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html
type EC2RootVolume ¶
type EC2RootVolume struct {
// IOPS defines the amount of provisioned IOPS. (KiB/s). IOPS may only be set for
// io1, io2, & gp3 volume types.
//
// +kubebuilder:validation:Minimum=0
// +optional
IOPS int `json:"iops"`
// Size defines the size of the volume in gibibytes (GiB).
//
// +kubebuilder:validation:Minimum=0
Size int `json:"size"`
// Type defines the type of the volume.
Type string `json:"type"`
// The KMS key that will be used to encrypt the EBS volume.
// If no key is provided the default KMS key for the account will be used.
// https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetEbsDefaultKmsKeyId.html
// +optional
KMSKeyARN string `json:"kmsKeyARN,omitempty"`
}
EC2RootVolume defines the storage for an ec2 instance.
type MachinePool ¶
type MachinePool struct {
// Zones is list of availability zones that can be used.
//
// +optional
Zones []string `json:"zones,omitempty"`
// InstanceType defines the ec2 instance type.
// eg. m4-large
//
// +optional
InstanceType string `json:"type"`
// AMIID is the AMI that should be used to boot the ec2 instance.
// If set, the AMI should belong to the same region as the cluster.
//
// +optional
AMIID string `json:"amiID,omitempty"`
// EC2RootVolume defines the root volume for EC2 instances in the machine pool.
//
// +optional
EC2RootVolume `json:"rootVolume"`
// EC2MetadataOptions defines metadata service interaction options for EC2 instances in the machine pool.
//
// +optional
EC2Metadata EC2Metadata `json:"metadataService"`
// IAMRole is the name of the IAM Role to use for the instance profile of the machine.
// Leave unset to have the installer create the IAM Role on your behalf.
// Cannot be specified together with iamProfile.
// +optional
IAMRole string `json:"iamRole,omitempty"`
// IAMProfile is the name of the IAM instance profile to use for the machine.
// Leave unset to have the installer create the IAM Profile on your behalf.
// Cannot be specified together with iamRole.
// +optional
IAMProfile string `json:"iamProfile,omitempty"`
// AdditionalSecurityGroupIDs contains IDs of additional security groups for machines, where each ID
// is presented in the format sg-xxxx.
//
// +kubebuilder:validation:MaxItems=10
// +optional
AdditionalSecurityGroupIDs []string `json:"additionalSecurityGroupIDs,omitempty"`
}
MachinePool stores the configuration for a machine pool installed on AWS.
func (*MachinePool) Set ¶
func (a *MachinePool) Set(required *MachinePool)
Set sets the values from `required` to `a`.
type Metadata ¶
type Metadata struct {
Region string `json:"region"`
// ServiceEndpoints list contains custom endpoints which will override default
// service endpoint of AWS Services.
// There must be only one ServiceEndpoint for a service.
// +optional
ServiceEndpoints []ServiceEndpoint `json:"serviceEndpoints,omitempty"`
// Identifier holds a slice of filter maps. The maps hold the
// key/value pairs for the tags we will be matching against. A
// resource matches the map if all of the key/value pairs are in its
// tags. A resource matches Identifier if it matches any of the maps.
Identifier []map[string]string `json:"identifier"`
// ClusterDomain is the domain for the cluster.
ClusterDomain string `json:"clusterDomain"`
// HostedZoneRole is the role to assume when performing operations
// on a hosted zone owned by another account.
HostedZoneRole string `json:"hostedZoneRole,omitempty"`
}
Metadata contains AWS metadata (e.g. for uninstalling the cluster).
type Platform ¶
type Platform struct {
// The field is deprecated. AMIID is the AMI that should be used to boot
// machines for the cluster. If set, the AMI should belong to the same
// region as the cluster.
//
// +optional
AMIID string `json:"amiID,omitempty"`
// Region specifies the AWS region where the cluster will be created.
Region string `json:"region"`
// Subnets specifies existing subnets (by ID) where cluster
// resources will be created. Leave unset to have the installer
// create subnets in a new VPC on your behalf.
//
// +optional
Subnets []string `json:"subnets,omitempty"`
// HostedZone is the ID of an existing hosted zone into which to add DNS
// records for the cluster's internal API. An existing hosted zone can
// only be used when also using existing subnets. The hosted zone must be
// associated with the VPC containing the subnets.
// Leave the hosted zone unset to have the installer create the hosted zone
// on your behalf.
// +optional
HostedZone string `json:"hostedZone,omitempty"`
// HostedZoneRole is the ARN of an IAM role to be assumed when performing
// operations on the provided HostedZone. HostedZoneRole can be used
// in a shared VPC scenario when the private hosted zone belongs to a
// different account than the rest of the cluster resources.
// If HostedZoneRole is set, HostedZone must also be set.
//
// +optional
HostedZoneRole string `json:"hostedZoneRole,omitempty"`
// UserTags additional keys and values that the installer will add
// as tags to all resources that it creates. Resources created by the
// cluster itself may not include these tags.
// +optional
UserTags map[string]string `json:"userTags,omitempty"`
// ServiceEndpoints list contains custom endpoints which will override default
// service endpoint of AWS Services.
// There must be only one ServiceEndpoint for a service.
// +optional
ServiceEndpoints []ServiceEndpoint `json:"serviceEndpoints,omitempty"`
// DefaultMachinePlatform is the default configuration used when
// installing on AWS for machine pools which do not define their own
// platform configuration.
// +optional
DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`
// The field is deprecated. ExperimentalPropagateUserTags is an experimental
// flag that directs in-cluster operators to include the specified
// user tags in the tags of the AWS resources that the operators create.
// +optional
ExperimentalPropagateUserTag *bool `json:"experimentalPropagateUserTags,omitempty"`
// PropagateUserTags is a flag that directs in-cluster operators
// to include the specified user tags in the tags of the
// AWS resources that the operators create.
// +optional
PropagateUserTag bool `json:"propagateUserTags,omitempty"`
// LBType is an optional field to specify a load balancer type.
// When this field is specified, all ingresscontrollers (including the
// default ingresscontroller) will be created using the specified load-balancer
// type by default.
//
// Following are the accepted values:
//
// * "Classic": A Classic Load Balancer that makes routing decisions at
// either the transport layer (TCP/SSL) or the application layer
// (HTTP/HTTPS). See the following for additional details:
// https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb
//
// * "NLB": A Network Load Balancer that makes routing decisions at the
// transport layer (TCP/SSL). See the following for additional details:
// https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb
//
// If this field is not set explicitly, it defaults to "Classic". This
// default is subject to change over time.
//
// +optional
LBType configv1.AWSLBType `json:"lbType,omitempty"`
// PreserveBootstrapIgnition is deprecated. Use bestEffortDeleteIgnition instead.
// +optional
PreserveBootstrapIgnition bool `json:"preserveBootstrapIgnition,omitempty"`
// BestEffortDeleteIgnition is an optional field that can be used to ignore errors from S3 deletion of ignition
// objects during cluster bootstrap. The default behavior is to fail the installation if ignition objects cannot be
// deleted. Enable this functionality when there are known reasons disallowing their deletion.
// +optional
BestEffortDeleteIgnition bool `json:"bestEffortDeleteIgnition,omitempty"`
// PublicIpv4Pool is an optional field that can be used to tell the installation process to use
// Public IPv4 address that you bring to your AWS account with BYOIP.
// +optional
PublicIpv4Pool string `json:"publicIpv4Pool,omitempty"`
}
Platform stores all the global configuration that all machinesets use.
type ServiceEndpoint ¶ added in v0.4.15
type ServiceEndpoint struct {
// Name is the name of the AWS service.
// This must be provided and cannot be empty.
Name string `json:"name"`
// URL is fully qualified URI with scheme https, that overrides the default generated
// endpoint for a client.
// This must be provided and cannot be empty.
//
// +kubebuilder:validation:Pattern=`^https://`
URL string `json:"url"`
}
ServiceEndpoint store the configuration for services to override existing defaults of AWS Services.