Skip to content

Commit

Permalink
remove instance types
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Aug 26, 2023
1 parent 00ec087 commit 1b55c2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
1 change: 0 additions & 1 deletion pkg/providers/amifamily/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ type Options struct {
KubeletConfig *v1alpha5.KubeletConfiguration
Taints []core.Taint `hash:"set"`
Labels map[string]string `hash:"set"`
InstanceTypes []string
CABundle *string
AWSENILimitedPodDensity bool
ContainerRuntime *string
Expand Down
10 changes: 4 additions & 6 deletions pkg/providers/amifamily/bootstrap/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ type Custom struct {
}

type TemplateData struct {
Taints []v1.Taint `hash:"set"`
Labels map[string]string `hash:"set"`
InstanceTypes []string
Taints []v1.Taint `hash:"set"`
Labels map[string]string `hash:"set"`
}

func (e Custom) Script() (string, error) {
Expand All @@ -48,9 +47,8 @@ func (e Custom) templateUserData(rawUserData string) (string, error) {
}

data := TemplateData{
Taints: e.Options.Taints,
Labels: e.Options.Labels,
InstanceTypes: e.Options.InstanceTypes,
Taints: e.Options.Taints,
Labels: e.Options.Labels,
}

var buf bytes.Buffer
Expand Down
8 changes: 1 addition & 7 deletions pkg/providers/amifamily/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ type Custom struct {
}

// UserData returns the default userdata script for the AMI Family
func (c Custom) UserData(_ *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, _ *string, instanceTypes []*cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper {
var iTypes []string
for _, i := range instanceTypes {
iTypes = append(iTypes, i.Name)
}

func (c Custom) UserData(_ *v1alpha5.KubeletConfiguration, taints []v1.Taint, labels map[string]string, _ *string, _ []*cloudprovider.InstanceType, customUserData *string) bootstrap.Bootstrapper {
return bootstrap.Custom{
Options: bootstrap.Options{
Taints: taints,
Labels: labels,
InstanceTypes: iTypes,
CustomUserData: customUserData,
},
}
Expand Down

0 comments on commit 1b55c2b

Please sign in to comment.