Skip to content

Commit

Permalink
Convert machineSpec.Versions to a pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Jan 16, 2019
1 parent 750b022 commit 0b766d0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/clusterctl/clusterdeployer/clusterdeployer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ func generateTestMasterMachine(name string) *clusterv1.Machine {
Name: name,
},
Spec: clusterv1.MachineSpec{
Versions: clusterv1.MachineVersionInfo{
Versions: &clusterv1.MachineVersionInfo{
ControlPlane: "1.10.1",
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type MachineSpec struct {
// should populate the values it uses when persisting Machine objects.
// A Machine spec missing this field at runtime is invalid.
// +optional
Versions MachineVersionInfo `json:"versions,omitempty"`
Versions *MachineVersionInfo `json:"versions,omitempty"`

// To populate in the associated Node for dynamic kubelet config. This
// field already exists in Node, so any updates to it in the Machine
Expand Down
6 changes: 5 additions & 1 deletion pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controller/machine/machine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestReconcile(t *testing.T) {
instance := &clusterv1alpha1.Machine{
ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "default"},
Spec: clusterv1alpha1.MachineSpec{
Versions: clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
Versions: &clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestReconcile(t *testing.T) {
Labels: labels,
},
Spec: clusterv1alpha1.MachineSpec{
Versions: clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
Versions: &clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/machineset/machineset_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestReconcile(t *testing.T) {
Replicas: &replicas,
Template: clusterv1alpha1.MachineTemplateSpec{
Spec: clusterv1alpha1.MachineSpec{
Versions: clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
Versions: &clusterv1alpha1.MachineVersionInfo{Kubelet: "1.10.3"},
},
},
},
Expand Down

0 comments on commit 0b766d0

Please sign in to comment.