Documentation ¶
Index ¶
- Constants
- func HybridInstanceGroup(ig *kops.InstanceGroup) bool
- func UseLaunchTemplate(ig *kops.InstanceGroup) bool
- func UseMixedInstancePolicies(ig *kops.InstanceGroup) bool
- type APILoadBalancerBuilder
- type AWSModelContext
- type AutoscalingGroupModelBuilder
- type BastionModelBuilder
- type ByScoreDescending
- type DNSModelBuilder
- type ExternalAccessModelBuilder
- type OIDCProviderBuilder
- type SpotInstanceGroupModelBuilder
Constants ¶
const ( // DefaultVolumeType is the default volume type DefaultVolumeType = ec2.VolumeTypeGp3 // DefaultLegacyVolumeType is the default volume type when using LaunchConfigurations DefaultLegacyVolumeType = ec2.VolumeTypeGp2 // DefaultVolumeIonIops is the default volume IOPS when volume type is io1 or io2 DefaultVolumeIonIops = 100 // DefaultVolumeGp3Iops is the default volume IOPS when volume type is gp3 DefaultVolumeGp3Iops = 3000 // DefaultVolumeGp3Throughput is the default volume throughput when volume type is gp3 DefaultVolumeGp3Throughput = 125 // DefaultVolumeDeleteOnTermination is the default volume behavior after instance termination DefaultVolumeDeleteOnTermination = true // DefaultVolumeEncryption is the default volume encryption behavior DefaultVolumeEncryption = true )
const ( BastionELBSecurityGroupPrefix = "bastion" BastionELBDefaultIdleTimeout = 5 * time.Minute )
const ( // SpotInstanceGroupLabelHybrid is the metadata label used on the instance group // to specify that the Spotinst provider should be used to upon creation. SpotInstanceGroupLabelHybrid = "spotinst.io/hybrid" SpotInstanceGroupLabelManaged = "spotinst.io/managed" // for backward compatibility // SpotInstanceGroupLabelSpotPercentage is the metadata label used on the // instance group to specify the percentage of Spot instances that // should spin up from the target capacity. SpotInstanceGroupLabelSpotPercentage = "spotinst.io/spot-percentage" // SpotInstanceGroupLabelOrientation is the metadata label used on the // instance group to specify which orientation should be used. SpotInstanceGroupLabelOrientation = "spotinst.io/orientation" // SpotInstanceGroupLabelUtilizeReservedInstances is the metadata label used // on the instance group to specify whether reserved instances should be // utilized. SpotInstanceGroupLabelUtilizeReservedInstances = "spotinst.io/utilize-reserved-instances" // SpotInstanceGroupLabelFallbackToOnDemand is the metadata label used on the // instance group to specify whether fallback to on-demand instances should // be enabled. SpotInstanceGroupLabelFallbackToOnDemand = "spotinst.io/fallback-to-ondemand" // SpotInstanceGroupLabelDrainingTimeout is the metadata label used on the // instance group to specify a period of time, in seconds, after a node // is marked for termination during which on running pods remains active. SpotInstanceGroupLabelDrainingTimeout = "spotinst.io/draining-timeout" // SpotInstanceGroupLabelGracePeriod is the metadata label used on the // instance group to specify a period of time, in seconds, that Ocean // should wait before applying instance health checks. SpotInstanceGroupLabelGracePeriod = "spotinst.io/grace-period" // SpotInstanceGroupLabelHealthCheckType is the metadata label used on the // instance group to specify the type of the health check that should be used. SpotInstanceGroupLabelHealthCheckType = "spotinst.io/health-check-type" // SpotInstanceGroupLabelOceanDefaultLaunchSpec is the metadata label used on the // instance group to specify whether to use the SpotInstanceGroup's spec as the default // Launch Spec for the Ocean cluster. SpotInstanceGroupLabelOceanDefaultLaunchSpec = "spotinst.io/ocean-default-launchspec" // SpotInstanceGroupLabelOceanInstanceTypes[White|Black]list are the metadata labels // used on the instance group to specify whether to whitelist or blacklist // specific instance types. SpotInstanceGroupLabelOceanInstanceTypesWhitelist = "spotinst.io/ocean-instance-types-whitelist" SpotInstanceGroupLabelOceanInstanceTypesBlacklist = "spotinst.io/ocean-instance-types-blacklist" SpotInstanceGroupLabelOceanInstanceTypes = "spotinst.io/ocean-instance-types" // launchspec // SpotInstanceGroupLabelAutoScalerDisabled is the metadata label used on the // instance group to specify whether the auto scaler should be enabled. SpotInstanceGroupLabelAutoScalerDisabled = "spotinst.io/autoscaler-disabled" // SpotInstanceGroupLabelAutoScalerDefaultNodeLabels is the metadata label used on the // instance group to specify whether default node labels should be set for // the auto scaler. SpotInstanceGroupLabelAutoScalerDefaultNodeLabels = "spotinst.io/autoscaler-default-node-labels" // SpotInstanceGroupLabelAutoScalerAuto* are the metadata labels used on the // instance group to specify whether headroom resources should be // automatically configured and optimized. SpotInstanceGroupLabelAutoScalerAutoConfig = "spotinst.io/autoscaler-auto-config" SpotInstanceGroupLabelAutoScalerAutoHeadroomPercentage = "spotinst.io/autoscaler-auto-headroom-percentage" // SpotInstanceGroupLabelAutoScalerHeadroom* are the metadata labels used on the // instance group to specify the headroom configuration used by the auto scaler. SpotInstanceGroupLabelAutoScalerHeadroomCPUPerUnit = "spotinst.io/autoscaler-headroom-cpu-per-unit" SpotInstanceGroupLabelAutoScalerHeadroomGPUPerUnit = "spotinst.io/autoscaler-headroom-gpu-per-unit" SpotInstanceGroupLabelAutoScalerHeadroomMemPerUnit = "spotinst.io/autoscaler-headroom-mem-per-unit" SpotInstanceGroupLabelAutoScalerHeadroomNumOfUnits = "spotinst.io/autoscaler-headroom-num-of-units" // SpotInstanceGroupLabelAutoScalerCooldown is the metadata label used on the // instance group to specify the cooldown period (in seconds) for scaling actions. SpotInstanceGroupLabelAutoScalerCooldown = "spotinst.io/autoscaler-cooldown" // SpotInstanceGroupLabelAutoScalerScaleDown* are the metadata labels used on the // instance group to specify the scale down configuration used by the auto scaler. SpotInstanceGroupLabelAutoScalerScaleDownMaxPercentage = "spotinst.io/autoscaler-scale-down-max-percentage" SpotInstanceGroupLabelAutoScalerScaleDownEvaluationPeriods = "spotinst.io/autoscaler-scale-down-evaluation-periods" // SpotInstanceGroupLabelAutoScalerResourceLimits* are the metadata labels used on the // instance group to specify the resource limits configuration used by the auto scaler. SpotInstanceGroupLabelAutoScalerResourceLimitsMaxVCPU = "spotinst.io/autoscaler-resource-limits-max-vcpu" SpotInstanceGroupLabelAutoScalerResourceLimitsMaxMemory = "spotinst.io/autoscaler-resource-limits-max-memory" // InstanceGroupLabelRestrictScaleDown is the metadata label used on the // instance group to specify whether the scale-down activities should be restricted. SpotInstanceGroupLabelRestrictScaleDown = "spotinst.io/restrict-scale-down" )
const LoadBalancerDefaultIdleTimeout = 5 * time.Minute
LoadBalancerDefaultIdleTimeout is the default idle time for the ELB
Variables ¶
This section is empty.
Functions ¶
func HybridInstanceGroup ¶ added in v1.20.0
func HybridInstanceGroup(ig *kops.InstanceGroup) bool
HybridInstanceGroup indicates whether the instance group labeled with a metadata label `spotinst.io/hybrid` which means the Spotinst provider should be used to upon creation if the `SpotinstHybrid` feature flag is on.
func UseLaunchTemplate ¶ added in v1.15.1
func UseLaunchTemplate(ig *kops.InstanceGroup) bool
UseLaunchTemplate checks if we need to use a launch template rather than configuration
func UseMixedInstancePolicies ¶ added in v1.15.1
func UseMixedInstancePolicies(ig *kops.InstanceGroup) bool
UseMixedInstancePolicies indicates if we are using mixed instance policies
Types ¶
type APILoadBalancerBuilder ¶
type APILoadBalancerBuilder struct { *AWSModelContext Lifecycle *fi.Lifecycle SecurityLifecycle *fi.Lifecycle }
APILoadBalancerBuilder builds a LoadBalancer for accessing the API
func (*APILoadBalancerBuilder) Build ¶
func (b *APILoadBalancerBuilder) Build(c *fi.ModelBuilderContext) error
Build is responsible for building the KubeAPI tasks for the aws model
type AWSModelContext ¶
type AWSModelContext struct {
*model.KopsModelContext
}
AWSModelContext provides the context for the aws model
type AutoscalingGroupModelBuilder ¶
type AutoscalingGroupModelBuilder struct { *AWSModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder Lifecycle *fi.Lifecycle SecurityLifecycle *fi.Lifecycle }
AutoscalingGroupModelBuilder configures AutoscalingGroup objects
func (*AutoscalingGroupModelBuilder) Build ¶
func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error
Build is responsible for constructing the aws autoscaling group from the kops spec
type BastionModelBuilder ¶ added in v1.20.0
type BastionModelBuilder struct { *model.KopsModelContext Lifecycle *fi.Lifecycle SecurityLifecycle *fi.Lifecycle }
func (*BastionModelBuilder) Build ¶ added in v1.20.0
func (b *BastionModelBuilder) Build(c *fi.ModelBuilderContext) error
type ByScoreDescending ¶
type ByScoreDescending []*scoredSubnet
func (ByScoreDescending) Len ¶
func (a ByScoreDescending) Len() int
func (ByScoreDescending) Less ¶
func (a ByScoreDescending) Less(i, j int) bool
func (ByScoreDescending) Swap ¶
func (a ByScoreDescending) Swap(i, j int)
type DNSModelBuilder ¶ added in v1.20.0
type DNSModelBuilder struct { *model.KopsModelContext Lifecycle *fi.Lifecycle }
DNSModelBuilder builds DNS related model objects
func (*DNSModelBuilder) Build ¶ added in v1.20.0
func (b *DNSModelBuilder) Build(c *fi.ModelBuilderContext) error
type ExternalAccessModelBuilder ¶ added in v1.20.0
type ExternalAccessModelBuilder struct { *model.KopsModelContext Lifecycle *fi.Lifecycle }
ExternalAccessModelBuilder configures security group rules for external access (SSHAccess, KubernetesAPIAccess)
func (*ExternalAccessModelBuilder) Build ¶ added in v1.20.0
func (b *ExternalAccessModelBuilder) Build(c *fi.ModelBuilderContext) error
type OIDCProviderBuilder ¶ added in v1.19.0
type OIDCProviderBuilder struct { *model.KopsModelContext KeyStore fi.CAStore Lifecycle *fi.Lifecycle }
OIDCProviderBuilder configures IAM OIDC Provider
func (*OIDCProviderBuilder) Build ¶ added in v1.19.0
func (b *OIDCProviderBuilder) Build(c *fi.ModelBuilderContext) error
type SpotInstanceGroupModelBuilder ¶ added in v1.20.0
type SpotInstanceGroupModelBuilder struct { *model.KopsModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder Lifecycle *fi.Lifecycle SecurityLifecycle *fi.Lifecycle }
SpotInstanceGroupModelBuilder configures SpotInstanceGroup objects
func (*SpotInstanceGroupModelBuilder) Build ¶ added in v1.20.0
func (b *SpotInstanceGroupModelBuilder) Build(c *fi.ModelBuilderContext) error