mirror of https://github.com/kubernetes/kops.git
Merge pull request #10690 from bharath-123/task/remove-unused-param
Remove unused instanceGroup parameter from setClusterFields
This commit is contained in:
commit
75df2e5cf7
|
|
@ -504,7 +504,7 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr
|
|||
cluster.Spec.MasterPublicName = c.MasterPublicName
|
||||
}
|
||||
|
||||
if err := commands.SetClusterFields(c.Overrides, cluster, instanceGroups); err != nil {
|
||||
if err := commands.SetClusterFields(c.Overrides, cluster); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func RunSetCluster(ctx context.Context, f *util.Factory, cmd *cobra.Command, out
|
|||
return err
|
||||
}
|
||||
|
||||
if err := SetClusterFields(options.Fields, cluster, instanceGroups); err != nil {
|
||||
if err := SetClusterFields(options.Fields, cluster); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ func RunSetCluster(ctx context.Context, f *util.Factory, cmd *cobra.Command, out
|
|||
}
|
||||
|
||||
// SetClusterFields sets field values in the cluster
|
||||
func SetClusterFields(fields []string, cluster *api.Cluster, instanceGroups []*api.InstanceGroup) error {
|
||||
func SetClusterFields(fields []string, cluster *api.Cluster) error {
|
||||
for _, field := range fields {
|
||||
kv := strings.SplitN(field, "=", 2)
|
||||
if len(kv) != 2 {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ func TestSetClusterBadInput(t *testing.T) {
|
|||
"bad-set-input",
|
||||
}
|
||||
|
||||
err := SetClusterFields(fields, &kops.Cluster{}, []*kops.InstanceGroup{})
|
||||
err := SetClusterFields(fields, &kops.Cluster{})
|
||||
if err == nil {
|
||||
t.Errorf("expected a field parsing error, but received none")
|
||||
}
|
||||
|
|
@ -310,10 +310,9 @@ func TestSetClusterFields(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, g := range grid {
|
||||
var igs []*kops.InstanceGroup
|
||||
c := g.Input
|
||||
|
||||
err := SetClusterFields(g.Fields, &c, igs)
|
||||
err := SetClusterFields(g.Fields, &c)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error from setClusterFields %v: %v", g.Fields, err)
|
||||
continue
|
||||
|
|
@ -362,10 +361,9 @@ func TestSetCiliumFields(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, g := range grid {
|
||||
var igs []*kops.InstanceGroup
|
||||
c := g.Input
|
||||
|
||||
err := SetClusterFields(g.Fields, &c, igs)
|
||||
err := SetClusterFields(g.Fields, &c)
|
||||
if err != nil {
|
||||
t.Errorf("unexpected error from setClusterFields %v: %v", g.Fields, err)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue