From dee2b39a48b577a64c179cdf39285b27fd7eb0c0 Mon Sep 17 00:00:00 2001
From: Vince Prignano <vincepri@vmware.com>
Date: Mon, 8 Jul 2019 10:55:03 -0700
Subject: [PATCH] Remove NodeConditions from Machine.Status

Signed-off-by: Vince Prignano <vincepri@vmware.com>
---
 config/crds/cluster.sigs.k8s.io_machines.yaml | 36 -------------------
 pkg/apis/cluster/v1alpha2/machine_types.go    |  8 -----
 .../cluster/v1alpha2/zz_generated.deepcopy.go |  7 ----
 3 files changed, 51 deletions(-)

diff --git a/config/crds/cluster.sigs.k8s.io_machines.yaml b/config/crds/cluster.sigs.k8s.io_machines.yaml
index 2cab2cb0ea40..52e58d206bcf 100644
--- a/config/crds/cluster.sigs.k8s.io_machines.yaml
+++ b/config/crds/cluster.sigs.k8s.io_machines.yaml
@@ -646,42 +646,6 @@ spec:
             bootstrapReady:
               description: BootstrapReady is the state of the bootstrap provider.
               type: boolean
-            conditions:
-              description: 'Conditions lists the conditions synced from the node conditions
-                of the corresponding node-object. Machine-controller is responsible
-                for keeping conditions up-to-date. MachineSet controller will be taking
-                these conditions as a signal to decide if machine is healthy or needs
-                to be replaced. Refer: https://kubernetes.io/docs/concepts/architecture/nodes/#condition'
-              items:
-                description: NodeCondition contains condition information for a node.
-                properties:
-                  lastHeartbeatTime:
-                    description: Last time we got an update on a given condition.
-                    format: date-time
-                    type: string
-                  lastTransitionTime:
-                    description: Last time the condition transit from one status to
-                      another.
-                    format: date-time
-                    type: string
-                  message:
-                    description: Human readable message indicating details about last
-                      transition.
-                    type: string
-                  reason:
-                    description: (brief) reason for the condition's last transition.
-                    type: string
-                  status:
-                    description: Status of the condition, one of True, False, Unknown.
-                    type: string
-                  type:
-                    description: Type of node condition.
-                    type: string
-                required:
-                - status
-                - type
-                type: object
-              type: array
             errorMessage:
               description: "ErrorMessage will be set in the event that there is a
                 terminal problem reconciling the Machine and will contain a more verbose
diff --git a/pkg/apis/cluster/v1alpha2/machine_types.go b/pkg/apis/cluster/v1alpha2/machine_types.go
index 5a7b868cbb0f..eb5fec5b6912 100644
--- a/pkg/apis/cluster/v1alpha2/machine_types.go
+++ b/pkg/apis/cluster/v1alpha2/machine_types.go
@@ -150,14 +150,6 @@ type MachineStatus struct {
 	// +optional
 	Addresses []corev1.NodeAddress `json:"addresses,omitempty"`
 
-	// Conditions lists the conditions synced from the node conditions of the corresponding node-object.
-	// Machine-controller is responsible for keeping conditions up-to-date.
-	// MachineSet controller will be taking these conditions as a signal to decide if
-	// machine is healthy or needs to be replaced.
-	// Refer: https://kubernetes.io/docs/concepts/architecture/nodes/#condition
-	// +optional
-	Conditions []corev1.NodeCondition `json:"conditions,omitempty"`
-
 	// Phase represents the current phase of machine actuation.
 	// E.g. Pending, Running, Terminating, Failed etc.
 	// +optional
diff --git a/pkg/apis/cluster/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/cluster/v1alpha2/zz_generated.deepcopy.go
index 989f32e91972..12b32860edc6 100644
--- a/pkg/apis/cluster/v1alpha2/zz_generated.deepcopy.go
+++ b/pkg/apis/cluster/v1alpha2/zz_generated.deepcopy.go
@@ -596,13 +596,6 @@ func (in *MachineStatus) DeepCopyInto(out *MachineStatus) {
 		*out = make([]v1.NodeAddress, len(*in))
 		copy(*out, *in)
 	}
-	if in.Conditions != nil {
-		in, out := &in.Conditions, &out.Conditions
-		*out = make([]v1.NodeCondition, len(*in))
-		for i := range *in {
-			(*in)[i].DeepCopyInto(&(*out)[i])
-		}
-	}
 	if in.Phase != nil {
 		in, out := &in.Phase, &out.Phase
 		*out = new(string)