From 9dda5ddc02b82b624ebbf69e2641a30f3df03a67 Mon Sep 17 00:00:00 2001 From: Dax McDonald Date: Wed, 7 Aug 2019 09:57:12 -0700 Subject: [PATCH] Use norman struct tags for limits of nodepool timeout Extreme values could overflow nodepool timeout int64 value. Now, it will return an error for values > maxInt64 or less than 0. --- apis/management.cattle.io/v3/machine_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/management.cattle.io/v3/machine_types.go b/apis/management.cattle.io/v3/machine_types.go index 2b8383b2..b48cff45 100644 --- a/apis/management.cattle.io/v3/machine_types.go +++ b/apis/management.cattle.io/v3/machine_types.go @@ -157,7 +157,7 @@ type NodePoolSpec struct { DisplayName string `json:"displayName"` ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster],noupdate,required"` - DeleteNotReadyAfterSecs time.Duration `json:"deleteNotReadyAfterSecs" norman:"default=0"` + DeleteNotReadyAfterSecs time.Duration `json:"deleteNotReadyAfterSecs" norman:"default=0,max=9223372036854775807,min=0"` } type NodePoolStatus struct {