From a0bf36c83c9de0662426e9de67d38fadfb1ef996 Mon Sep 17 00:00:00 2001 From: rmweir Date: Tue, 11 Feb 2020 11:51:27 -0700 Subject: [PATCH] Add dynamic field to feature type Added dynamic field to feature type. A value of false indicates that changed feature values will not go into effect until rancher restarts. Switched feature type to use spec and status convention. --- apis/management.cattle.io/v3/global_types.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apis/management.cattle.io/v3/global_types.go b/apis/management.cattle.io/v3/global_types.go index 6413139b..e0fc5194 100644 --- a/apis/management.cattle.io/v3/global_types.go +++ b/apis/management.cattle.io/v3/global_types.go @@ -18,6 +18,15 @@ type Feature struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Value *bool `json:"value" norman:"required"` - Default bool `json:"default" norman:"nocreate,noupdate"` + Spec FeatureSpec `json:"spec"` + Status FeatureStatus `json:"status"` +} + +type FeatureSpec struct { + Value *bool `json:"value" norman:"required"` +} + +type FeatureStatus struct { + Dynamic bool `json:"dynamic"` + Default bool `json:"default"` }