mirror of https://github.com/kubernetes/kops.git
commit
09d869a4cb
|
|
@ -907,7 +907,7 @@ spec:
|
|||
group
|
||||
properties:
|
||||
enableLifecycleHook:
|
||||
description: EnableLifecyleHook determines if an ASG lifecycle
|
||||
description: EnableLifecycleHook determines if an ASG lifecycle
|
||||
hook will be added ensuring that nodeup runs to completion.
|
||||
Note that the metadata API must be protected from arbitrary
|
||||
Pods when this is enabled.
|
||||
|
|
|
|||
|
|
@ -194,9 +194,9 @@ type WarmPoolSpec struct {
|
|||
// (unless the resulting number is smaller than MinSize).
|
||||
// The default is the instance group's MaxSize.
|
||||
MaxSize *int64 `json:"maxSize,omitempty"`
|
||||
// EnableLifecyleHook determines if an ASG lifecycle hook will be added ensuring that nodeup runs to completion.
|
||||
// EnableLifecycleHook determines if an ASG lifecycle hook will be added ensuring that nodeup runs to completion.
|
||||
// Note that the metadata API must be protected from arbitrary Pods when this is enabled.
|
||||
EnableLifecyleHook bool `json:"enableLifecycleHook,omitempty"`
|
||||
EnableLifecycleHook bool `json:"enableLifecycleHook,omitempty"`
|
||||
}
|
||||
|
||||
func (in *WarmPoolSpec) IsEnabled() bool {
|
||||
|
|
|
|||
|
|
@ -159,9 +159,9 @@ type WarmPoolSpec struct {
|
|||
// (unless the resulting number is smaller than MinSize).
|
||||
// The default is the instance group's MaxSize.
|
||||
MaxSize *int64 `json:"maxSize,omitempty"`
|
||||
// EnableLifecyleHook determines if an ASG lifecycle hook will be added ensuring that nodeup runs to completion.
|
||||
// EnableLifecycleHook determines if an ASG lifecycle hook will be added ensuring that nodeup runs to completion.
|
||||
// Note that the metadata API must be protected from arbitrary Pods when this is enabled.
|
||||
EnableLifecyleHook bool `json:"enableLifecycleHook,omitempty"`
|
||||
EnableLifecycleHook bool `json:"enableLifecycleHook,omitempty"`
|
||||
}
|
||||
|
||||
// InstanceMetadataOptions defines the EC2 instance metadata service options (AWS Only)
|
||||
|
|
|
|||
|
|
@ -6413,7 +6413,7 @@ func Convert_kops_VolumeSpec_To_v1alpha2_VolumeSpec(in *kops.VolumeSpec, out *Vo
|
|||
func autoConvert_v1alpha2_WarmPoolSpec_To_kops_WarmPoolSpec(in *WarmPoolSpec, out *kops.WarmPoolSpec, s conversion.Scope) error {
|
||||
out.MinSize = in.MinSize
|
||||
out.MaxSize = in.MaxSize
|
||||
out.EnableLifecyleHook = in.EnableLifecyleHook
|
||||
out.EnableLifecycleHook = in.EnableLifecycleHook
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -6425,7 +6425,7 @@ func Convert_v1alpha2_WarmPoolSpec_To_kops_WarmPoolSpec(in *WarmPoolSpec, out *k
|
|||
func autoConvert_kops_WarmPoolSpec_To_v1alpha2_WarmPoolSpec(in *kops.WarmPoolSpec, out *WarmPoolSpec, s conversion.Scope) error {
|
||||
out.MinSize = in.MinSize
|
||||
out.MaxSize = in.MaxSize
|
||||
out.EnableLifecyleHook = in.EnableLifecyleHook
|
||||
out.EnableLifecycleHook = in.EnableLifecycleHook
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
warmPoolTask.MinSize = warmPool.MinSize
|
||||
warmPoolTask.MaxSize = warmPool.MaxSize
|
||||
|
||||
if warmPool.EnableLifecyleHook {
|
||||
if warmPool.EnableLifecycleHook {
|
||||
name := "kops-warmpool"
|
||||
|
||||
lifecyleTask := &awstasks.AutoscalingLifecycleHook{
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ func (b *IAMModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
for profileARN, igRole := range sharedProfileARNsToIGRole {
|
||||
lchPermissions := false
|
||||
for _, ig := range b.InstanceGroups {
|
||||
if ig.Spec.Role == igRole && ig.Spec.WarmPool.IsEnabled() && ig.Spec.WarmPool.EnableLifecyleHook {
|
||||
if ig.Spec.Role == igRole && ig.Spec.WarmPool.IsEnabled() && ig.Spec.WarmPool.EnableLifecycleHook {
|
||||
lchPermissions = true
|
||||
break
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ func (b *IAMModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
for igRole := range managedRoles {
|
||||
warmPool := false
|
||||
for _, ig := range b.InstanceGroups {
|
||||
if ig.Spec.Role == igRole && ig.Spec.WarmPool.IsEnabled() && ig.Spec.WarmPool.EnableLifecyleHook {
|
||||
if ig.Spec.Role == igRole && ig.Spec.WarmPool.IsEnabled() && ig.Spec.WarmPool.EnableLifecycleHook {
|
||||
warmPool = true
|
||||
break
|
||||
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ func (c *NodeUpCommand) Run(out io.Writer) error {
|
|||
klog.Exitf("error closing target: %v", err)
|
||||
}
|
||||
|
||||
if modelContext.InstanceGroup.Spec.WarmPool.IsEnabled() && modelContext.InstanceGroup.Spec.WarmPool.EnableLifecyleHook {
|
||||
if modelContext.InstanceGroup.Spec.WarmPool.IsEnabled() && modelContext.InstanceGroup.Spec.WarmPool.EnableLifecycleHook {
|
||||
if api.CloudProviderID(c.cluster.Spec.CloudProvider) == api.CloudProviderAWS {
|
||||
err := completeWarmingLifecycleAction(cloud.(awsup.AWSCloud), modelContext)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue