diff --git a/config/crd/bases/config.nri_balloonspolicies.yaml b/config/crd/bases/config.nri_balloonspolicies.yaml index 84cf113a1..fd4d02ad8 100644 --- a/config/crd/bases/config.nri_balloonspolicies.yaml +++ b/config/crd/bases/config.nri_balloonspolicies.yaml @@ -201,6 +201,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set preferCloseToDevices: description: |- PreferCloseToDevices: prefer creating new balloons of this @@ -208,6 +209,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set preferCoreType: description: |- preferCoreType: prefer performance or efficient (P/E) CPU cores on diff --git a/config/crd/bases/config.nri_topologyawarepolicies.yaml b/config/crd/bases/config.nri_topologyawarepolicies.yaml index df4944647..baf85875f 100644 --- a/config/crd/bases/config.nri_topologyawarepolicies.yaml +++ b/config/crd/bases/config.nri_topologyawarepolicies.yaml @@ -217,6 +217,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set reservedResources: additionalProperties: type: string diff --git a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml b/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml index 84cf113a1..fd4d02ad8 100644 --- a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml +++ b/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml @@ -201,6 +201,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set preferCloseToDevices: description: |- PreferCloseToDevices: prefer creating new balloons of this @@ -208,6 +209,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set preferCoreType: description: |- preferCoreType: prefer performance or efficient (P/E) CPU cores on diff --git a/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml b/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml index df4944647..baf85875f 100644 --- a/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml +++ b/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml @@ -217,6 +217,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set reservedResources: additionalProperties: type: string diff --git a/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go b/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go index 88251d09d..357a52f26 100644 --- a/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go +++ b/pkg/apis/config/v1alpha1/resmgr/policy/balloons/config.go @@ -129,6 +129,7 @@ type BalloonDef struct { // Namespaces control which namespaces are assigned into // balloon instances from this definition. This is used by // namespace assign methods. + // +listType=set Namespaces []string `json:"namespaces,omitempty"` // GroupBy groups containers into same balloon instances if // their GroupBy expressions evaluate to the same group. @@ -220,11 +221,13 @@ type BalloonDef struct { ShareIdleCpusInSame CPUTopologyLevel `json:"shareIdleCPUsInSame,omitempty"` // PreferCloseToDevices: prefer creating new balloons of this // type close to listed devices. + // +listType=set PreferCloseToDevices []string `json:"preferCloseToDevices,omitempty"` // PreferFarFromDevices: prefer creating new balloons of this // type far from listed devices. // TODO: PreferFarFromDevices is considered too untested for usage. Hence, // for the time being we prevent its usage through CRDs. + // +listType=set PreferFarFromDevices []string `json:"-"` // preferIsolCpus: prefer kernel isolated cpus // +kubebuilder:default=false diff --git a/pkg/apis/config/v1alpha1/resmgr/policy/topologyaware/config.go b/pkg/apis/config/v1alpha1/resmgr/policy/topologyaware/config.go index d1e537215..d5cfe6591 100644 --- a/pkg/apis/config/v1alpha1/resmgr/policy/topologyaware/config.go +++ b/pkg/apis/config/v1alpha1/resmgr/policy/topologyaware/config.go @@ -91,6 +91,7 @@ type Config struct { // ReservedPoolNamespaces lists extra namespaces which are treated like // 'kube-system' (resources allocate from the reserved pool). // +optional + // +listType=set ReservedPoolNamespaces []string `json:"reservedPoolNamespaces,omitempty"` // AvailableResources defines the bounding set for the policy to allocate // resources from.