From 639b6ba63402ffe17f46e3219f77b416b009fa46 Mon Sep 17 00:00:00 2001 From: kinarashah Date: Mon, 19 Nov 2018 11:03:37 -0800 Subject: [PATCH] add currentNodeLabels and currentNodeAnnotations to Node Spec Fields to store current node status labels and annotations when calculating desiredNode values --- apis/management.cattle.io/v3/machine_types.go | 2 ++ apis/management.cattle.io/v3/schema/schema.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apis/management.cattle.io/v3/machine_types.go b/apis/management.cattle.io/v3/machine_types.go index 071a273b..f161f233 100644 --- a/apis/management.cattle.io/v3/machine_types.go +++ b/apis/management.cattle.io/v3/machine_types.go @@ -188,6 +188,8 @@ type NodeSpec struct { InternalNodeSpec v1.NodeSpec `json:"internalNodeSpec"` DesiredNodeLabels map[string]string `json:"desiredNodeLabels,omitempty"` DesiredNodeAnnotations map[string]string `json:"desiredNodeAnnotations,omitempty"` + CurrentNodeLabels map[string]string `json:"currentNodeLabels,omitempty"` + CurrentNodeAnnotations map[string]string `json:"currentNodeAnnotations,omitempty"` DesiredNodeUnschedulable string `json:"desiredNodeUnschedulable,omitempty"` NodeDrainInput *NodeDrainInput `json:"nodeDrainInput,omitempty"` } diff --git a/apis/management.cattle.io/v3/schema/schema.go b/apis/management.cattle.io/v3/schema/schema.go index 9da955a5..6695f69f 100644 --- a/apis/management.cattle.io/v3/schema/schema.go +++ b/apis/management.cattle.io/v3/schema/schema.go @@ -229,6 +229,8 @@ func nodeTypes(schemas *types.Schemas) *types.Schemas { &m.Move{From: "nodeAnnotations", To: "annotations"}, &m.Drop{Field: "desiredNodeLabels"}, &m.Drop{Field: "desiredNodeAnnotations"}, + &m.Drop{Field: "currentNodeLabels"}, + &m.Drop{Field: "currentNodeAnnotations"}, &m.Drop{Field: "desiredNodeUnschedulable"}, &m.Drop{Field: "nodeDrainInput"}, &m.AnnotationField{Field: "publicEndpoints", List: true},