diff --git a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml index 4035ca8..6b658f9 100644 --- a/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml +++ b/config/crd/bases/config.katalyst.kubewharf.io_adminqosconfigurations.yaml @@ -63,10 +63,195 @@ spec: config: description: Config is custom field for admin qos configuration properties: + evictionConfig: + description: EvictionConfig is a configuration for eviction + properties: + cpuPressureEvictionConfig: + description: CPUPressureEvictionConfig is the config for cpu + pressure eviction + properties: + enableLoadEviction: + description: EnableLoadEviction is whether to enable cpu + load eviction + type: boolean + enableSuppressionEviction: + description: EnableSuppressionEviction is whether to enable + pod-level cpu suppression eviction + type: boolean + gracePeriod: + description: GracePeriod is the grace period of cpu pressure + eviction + format: int64 + type: integer + loadEvictionCoolDownTime: + description: LoadEvictionCoolDownTime is the cool-down + time of cpu load eviction, if the cpu load eviction + is triggered, the cpu load eviction will be disabled + for the cool-down time + type: string + loadMetricRingSize: + description: LoadMetricRingSize is the size of the load + metric ring, which is used to calculate the load of + the target cpuset pool + minimum: 1 + type: integer + loadThresholdMetPercentage: + description: LoadThresholdMetPercentage is the percentage + of the number of times the load over the upper bound + to the total number of times the load is measured, if + the percentage is greater than the load threshold met + percentage, the eviction or node tainted will be triggered + type: number + loadUpperBoundRatio: + description: LoadUpperBoundRatio is the upper bound ratio + of cpuset pool load, if the load of the target cpuset + pool is greater than the load upper bound repeatedly, + the eviction will be triggered + type: number + maxSuppressionToleranceRate: + description: MaxSuppressionToleranceRate is the maximum + cpu suppression tolerance rate that can be set by the + pod, if the cpu suppression tolerance rate of the pod + is greater than the maximum cpu suppression tolerance + rate, the cpu suppression tolerance rate of the pod + will be set to the maximum cpu suppression tolerance + rate + type: number + minSuppressionToleranceDuration: + description: MinSuppressionToleranceDuration is the minimum + duration a pod can tolerate cpu suppression, only if + the cpu suppression duration of the pod is greater than + the minimum cpu suppression duration, the eviction will + be triggered + type: string + type: object + dryRun: + description: DryRun is the list of eviction plugins to dryRun + '*' means "all dry-run by default" 'foo' means "dry-run + 'foo'" first item for a particular name wins + items: + type: string + type: array + memoryPressureEvictionConfig: + description: MemoryPressureEvictionConfig is the config for + memory pressure eviction + properties: + enableNumaLevelEviction: + description: EnableNumaLevelEviction is whether to enable + numa-level eviction + type: boolean + enableRSSOveruseEviction: + description: EnableRSSOveruseEviction is whether to enable + pod-level rss overuse eviction + type: boolean + enableSystemLevelEviction: + description: EnableSystemLevelEviction is whether to enable + system-level eviction + type: boolean + gracePeriod: + description: GracePeriod is the grace period of memory + pressure eviction + format: int64 + type: integer + numaEvictionRankingMetrics: + description: NumaEvictionRankingMetrics is the metrics + used to rank pods for eviction at the NUMA level + items: + description: NumaEvictionRankingMetric is the metrics + used to rank pods for eviction at the NUMA level + enum: + - qos.pod + - priority.pod + - mem.total.numa.container + type: string + type: array + numaFreeBelowWatermarkTimesThreshold: + description: NumaFreeBelowWatermarkTimesThreshold is the + threshold for the number of times NUMA's free memory + falls below the watermark + type: integer + rssOveruseRateThreshold: + description: RSSOveruseRateThreshold is the threshold + for the rate of rss + type: number + systemEvictionRankingMetrics: + description: SystemEvictionRankingMetrics is the metrics + used to rank pods for eviction at the system level + items: + description: SystemEvictionRankingMetric is the metrics + used to rank pods for eviction at the system level + enum: + - qos.pod + - priority.pod + - mem.usage.container + type: string + type: array + systemKswapdRateExceedTimesThreshold: + description: SystemKswapdRateExceedTimesThreshold is the + threshold for the number of times the kswapd reclaiming + rate exceeds the threshold + type: integer + systemKswapdRateThreshold: + description: NumaFreeBelowWatermarkTimesThreshold is the + threshold for the rate of kswapd reclaiming rate + type: integer + type: object + reclaimedResourcesEvictionConfig: + description: ReclaimedResourcesEvictionConfig is the config + for reclaimed resources' eviction + properties: + evictionThreshold: + additionalProperties: + type: number + description: EvictionThreshold eviction threshold rate + for reclaimed resources + type: object + gracePeriod: + description: GracePeriod is the grace period of reclaimed + resources' eviction + format: int64 + type: integer + type: object + type: object reclaimedResourceConfig: description: ReclaimedResourceConfig is a configuration for reclaim resource properties: + cpuHeadroomConfig: + description: CPUHeadroomConfig is a configuration for cpu + headroom + properties: + utilBasedConfig: + description: UtilBasedConfig is a config for utilization + based cpu headroom policy + properties: + enable: + description: Enable is a flag to enable utilization + based cpu headroom policy + type: boolean + maxHeadroomCapacityRate: + description: MaxHeadroomCapacityRate is the max headroom + capacity rate of cpu headroom to the total cpu capacity + of node + type: number + maxOversoldRate: + description: MaxOversoldRate is the max oversold rate + of cpu headroom to the actual size of reclaimed_cores + pool + type: number + maxReclaimedCoreUtilization: + description: MaxReclaimedCoreUtilization is the max + reclaimed core utilization of reclaimed_cores pool, + which is used to calculate the oversold cpu headroom, + if zero means no limit + type: number + targetReclaimedCoreUtilization: + description: TargetReclaimedCoreUtilization is the + target reclaimed core utilization to be used for + calculating the oversold cpu headroom + type: number + type: object + type: object enableReclaim: description: EnableReclaim is a flag to enable reclaim resource, if true, reclaim resource will be enabled, which means reclaim @@ -74,6 +259,33 @@ spec: colocation between reclaimed_cores pod and other pods, otherwise, reclaim resource will be disabled. type: boolean + memoryHeadroomConfig: + description: MemoryHeadroomConfig is a configuration for memory + headroom + properties: + utilBasedConfig: + description: MemoryHeadroomUtilBasedConfig is a config + for utilization based memory headroom policy + properties: + cacheBasedRatio: + description: CacheBasedRatio is the rate of cache + oversold, 0 means disable cache oversold + type: number + enable: + description: Enable is a flag to enable utilization + based memory headroom policy + type: boolean + freeBasedRatio: + description: FreeBasedRatio is the estimation of free + memory utilization, which can be used as system + buffer to oversold memory. + type: number + staticBasedCapacity: + description: StaticBasedCapacity is the static oversold + memory size by bytes + type: number + type: object + type: object minReclaimedResourceForReport: additionalProperties: anyOf: @@ -141,6 +353,8 @@ spec: currently applied Spec version. The default value is 3. format: int64 type: integer + required: + - config type: object status: properties: diff --git a/config/crd/bases/config.katalyst.kubewharf.io_evictionconfigurations.yaml b/config/crd/bases/config.katalyst.kubewharf.io_evictionconfigurations.yaml deleted file mode 100644 index 57d6be9..0000000 --- a/config/crd/bases/config.katalyst.kubewharf.io_evictionconfigurations.yaml +++ /dev/null @@ -1,211 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.0 - creationTimestamp: null - name: evictionconfigurations.config.katalyst.kubewharf.io -spec: - group: config.katalyst.kubewharf.io - names: - kind: EvictionConfiguration - listKind: EvictionConfigurationList - plural: evictionconfigurations - shortNames: - - ec - singular: evictionconfiguration - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - - jsonPath: .spec.nodeLabelSelector - name: SELECTOR - type: string - - jsonPath: .spec.ephemeralSelector.nodeNames - name: NODES - type: string - - jsonPath: .spec.ephemeralSelector.lastDuration - name: DURATION - type: string - - jsonPath: .status.conditions[?(@.type=="Valid")].status - name: VALID - type: string - - jsonPath: .status.conditions[?(@.type=="Valid")].reason - name: REASON - type: string - - jsonPath: .status.conditions[?(@.type=="Valid")].message - name: MESSAGE - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: EvictionConfiguration is the Schema for the configuration API - used by eviction - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: EvictionConfigurationSpec defines the desired state of EvictionConfiguration - properties: - config: - description: Config is custom field for eviction configuration all - configuration crd should contain a field named with `config` - properties: - evictionPluginsConfig: - description: EvictionPluginsConfig is the config for all eviction - plugins - properties: - memoryEvictionPluginConfig: - description: MemoryEvictionPluginConfig is the config for - memory eviction plugin - properties: - enableNumaLevelDetection: - description: EnableNumaLevelDetection is whether to enable - numa-level detection - type: boolean - enableRssOveruseDetection: - description: EnableRSSOveruseDetection is whether to enable - pod-level rss overuse detection - type: boolean - enableSystemLevelDetection: - description: EnableSystemLevelDetection is whether to - enable system-level detection - type: boolean - gracePeriod: - description: GracePeriod is the grace period of memory - eviction - format: int64 - type: integer - numaEvictionRankingMetrics: - description: NumaEvictionRankingMetrics is the metrics - used to rank pods for eviction at the NUMA level - items: - type: string - type: array - numaFreeBelowWatermarkTimesThreshold: - description: NumaFreeBelowWatermarkTimesThreshold is the - threshold for the number of times NUMA's free memory - falls below the watermark - type: integer - rssOveruseRateThreshold: - description: RssOveruseRateThreshold is the threshold - for the rate of rss - type: number - systemEvictionRankingMetrics: - description: SystemEvictionRankingMetrics is the metrics - used to rank pods for eviction at the system level - items: - type: string - type: array - systemKswapdRateExceedTimesThreshold: - description: SystemKswapdRateExceedCountThreshold is the - threshold for the number of times the kswapd reclaiming - rate exceeds the threshold - type: integer - systemKswapdRateThreshold: - description: NumaFreeBelowWatermarkTimesThreshold is the - threshold for the rate of kswapd reclaiming rate - type: integer - type: object - reclaimedResourcesEvictionPluginConfig: - description: ReclaimedResourcesEvictionPluginConfig is the - config for reclaimed resources eviction plugin - properties: - evictionThreshold: - additionalProperties: - type: number - description: EvictionThreshold eviction threshold rate - for reclaimed resources - type: object - type: object - type: object - type: object - ephemeralSelector: - description: EphemeralSelector is used to indicate the - properties: - lastDuration: - description: define the duration this configuration will last - from creationTimestamp. must and only set when NodeNames already - set - type: string - nodeNames: - description: Specific nodes' name the configurations will be effected. - items: - type: string - type: array - type: object - nodeLabelSelector: - description: NodeLabelSelector select nodes to apply these configurations - if spec.labelKey no set, NodeLabelSelector must be empty, the label - selector must only include KatalystCustomConfig.spec .nodeLabelSelectorKey, - otherwise it will not be synced This field will be immutable after - it is initially set. - type: string - revisionHistoryLimit: - default: 3 - description: RevisionHistoryLimit is the maximum number of revisions - that will be maintained in the resource's revision history. The - revision history consists of all revisions not represented by a - currently applied Spec version. The default value is 3. - format: int64 - type: integer - type: object - status: - properties: - collisionCount: - description: Count of hash collisions for this cr. The kcc controller - uses this field as a collision avoidance mechanism when it needs - to create the name for the newest ControllerRevision. - format: int32 - type: integer - conditions: - description: Represents the latest available observations of a config's - current state. - items: - properties: - lastTransitionTime: - description: Last time the condition transit from one status - to another. - format: date-time - type: string - message: - description: message is a human-readable explanation containing - details about the transition - type: string - reason: - description: reason is the 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 config condition - type: string - required: - - status - - type - type: object - type: array - observedGeneration: - description: The most recent generation observed by the kcc controller. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/pkg/apis/config/v1alpha1/adminqos.go b/pkg/apis/config/v1alpha1/adminqos.go index d31ab91..ca13bba 100644 --- a/pkg/apis/config/v1alpha1/adminqos.go +++ b/pkg/apis/config/v1alpha1/adminqos.go @@ -57,12 +57,17 @@ type AdminQoSConfigurationSpec struct { GenericConfigSpec `json:",inline"` // Config is custom field for admin qos configuration - Config AdminQoSConfig `json:"config,omitempty"` + Config AdminQoSConfig `json:"config"` } type AdminQoSConfig struct { // ReclaimedResourceConfig is a configuration for reclaim resource - ReclaimedResourceConfig ReclaimedResourceConfig `json:"reclaimedResourceConfig,omitempty"` + // +optional + ReclaimedResourceConfig *ReclaimedResourceConfig `json:"reclaimedResourceConfig,omitempty"` + + // EvictionConfig is a configuration for eviction + // +optional + EvictionConfig *EvictionConfig `json:"evictionConfig,omitempty"` } type ReclaimedResourceConfig struct { @@ -88,4 +93,231 @@ type ReclaimedResourceConfig struct { // requirements. // +optional ReservedResourceForAllocate *v1.ResourceList `json:"reservedResourceForAllocate,omitempty"` + + // CPUHeadroomConfig is a configuration for cpu headroom + // +optional + CPUHeadroomConfig *CPUHeadroomConfig `json:"cpuHeadroomConfig,omitempty"` + + // MemoryHeadroomConfig is a configuration for memory headroom + // +optional + MemoryHeadroomConfig *MemoryHeadroomConfig `json:"memoryHeadroomConfig,omitempty"` +} + +type MemoryHeadroomConfig struct { + // MemoryHeadroomUtilBasedConfig is a config for utilization based memory headroom policy + // +optional + UtilBasedConfig *MemoryHeadroomUtilBasedConfig `json:"utilBasedConfig,omitempty"` } + +type MemoryHeadroomUtilBasedConfig struct { + // Enable is a flag to enable utilization based memory headroom policy + // +optional + Enable *bool `json:"enable,omitempty"` + + // FreeBasedRatio is the estimation of free memory utilization, which can + // be used as system buffer to oversold memory. + // +kubectl:validation:Minimum=0 + // +kubectl:validation:Maximum=1 + // +optional + FreeBasedRatio *float64 `json:"freeBasedRatio,omitempty"` + + // StaticBasedCapacity is the static oversold memory size by bytes + // +kubectl:validation:Minimum=0 + // +optional + StaticBasedCapacity *float64 `json:"staticBasedCapacity,omitempty"` + + // CacheBasedRatio is the rate of cache oversold, 0 means disable cache oversold + // +kubectl:validation:Minimum=0 + // +kubectl:validation:Maximum=1 + // +optional + CacheBasedRatio *float64 `json:"cacheBasedRatio,omitempty"` +} + +type CPUHeadroomConfig struct { + // UtilBasedConfig is a config for utilization based cpu headroom policy + // +optional + UtilBasedConfig *CPUHeadroomUtilBasedConfig `json:"utilBasedConfig,omitempty"` +} + +type CPUHeadroomUtilBasedConfig struct { + // Enable is a flag to enable utilization based cpu headroom policy + // +optional + Enable *bool `json:"enable,omitempty"` + + // TargetReclaimedCoreUtilization is the target reclaimed core utilization to be used for + // calculating the oversold cpu headroom + // +kubectl:validation:Minimum=0 + // +kubectl:validation:Maximum=1 + // +optional + TargetReclaimedCoreUtilization *float64 `json:"targetReclaimedCoreUtilization,omitempty"` + + // MaxReclaimedCoreUtilization is the max reclaimed core utilization of reclaimed_cores pool, + // which is used to calculate the oversold cpu headroom, if zero means no limit + // +kubectl:validation:Minimum=0 + // +kubectl:validation:Maximum=1 + // +optional + MaxReclaimedCoreUtilization *float64 `json:"maxReclaimedCoreUtilization,omitempty"` + + // MaxOversoldRate is the max oversold rate of cpu headroom to the actual size of + // reclaimed_cores pool + // +kubectl:validation:Minimum=0 + // +optional + MaxOversoldRate *float64 `json:"maxOversoldRate,omitempty"` + + // MaxHeadroomCapacityRate is the max headroom capacity rate of cpu headroom to the total + // cpu capacity of node + // +kubectl:validation:Minimum=0 + // +optional + MaxHeadroomCapacityRate *float64 `json:"maxHeadroomCapacityRate,omitempty"` +} + +type EvictionConfig struct { + // DryRun is the list of eviction plugins to dryRun + // '*' means "all dry-run by default" + // 'foo' means "dry-run 'foo'" + // first item for a particular name wins + // +optional + DryRun []string `json:"dryRun,omitempty"` + + // CPUPressureEvictionConfig is the config for cpu pressure eviction + // +optional + CPUPressureEvictionConfig *CPUPressureEvictionConfig `json:"cpuPressureEvictionConfig,omitempty"` + + // MemoryPressureEvictionConfig is the config for memory pressure eviction + // +optional + MemoryPressureEvictionConfig *MemoryPressureEvictionConfig `json:"memoryPressureEvictionConfig,omitempty"` + + // ReclaimedResourcesEvictionConfig is the config for reclaimed resources' eviction + // +optional + ReclaimedResourcesEvictionConfig *ReclaimedResourcesEvictionConfig `json:"reclaimedResourcesEvictionConfig,omitempty"` +} + +type ReclaimedResourcesEvictionConfig struct { + // EvictionThreshold eviction threshold rate for reclaimed resources + // +optional + EvictionThreshold map[v1.ResourceName]float64 `json:"evictionThreshold,omitempty"` + + // GracePeriod is the grace period of reclaimed resources' eviction + // +kubectl:validation:Minimum=0 + // +optional + GracePeriod *int64 `json:"gracePeriod,omitempty"` +} + +type CPUPressureEvictionConfig struct { + // EnableLoadEviction is whether to enable cpu load eviction + // +optional + EnableLoadEviction *bool `json:"enableLoadEviction,omitempty"` + + // LoadUpperBoundRatio is the upper bound ratio of cpuset pool load, if the load + // of the target cpuset pool is greater than the load upper bound repeatedly, the + // eviction will be triggered + // +kubectl:validation:Minimum=1 + // +optional + LoadUpperBoundRatio *float64 `json:"loadUpperBoundRatio,omitempty"` + + // LoadThresholdMetPercentage is the percentage of the number of times the load + // over the upper bound to the total number of times the load is measured, if the + // percentage is greater than the load threshold met percentage, the eviction or + // node tainted will be triggered + // +kubectl:validation:Minimum=0 + // +kubectl:validation:Maximum=1 + // +optional + LoadThresholdMetPercentage *float64 `json:"loadThresholdMetPercentage,omitempty"` + + // LoadMetricRingSize is the size of the load metric ring, which is used to calculate the + // load of the target cpuset pool + // +kubebuilder:validation:Minimum=1 + // +optional + LoadMetricRingSize *int `json:"loadMetricRingSize,omitempty"` + + // LoadEvictionCoolDownTime is the cool-down time of cpu load eviction, + // if the cpu load eviction is triggered, the cpu load eviction will be + // disabled for the cool-down time + // +optional + LoadEvictionCoolDownTime *metav1.Duration `json:"loadEvictionCoolDownTime,omitempty"` + + // EnableSuppressionEviction is whether to enable pod-level cpu suppression eviction + // +optional + EnableSuppressionEviction *bool `json:"enableSuppressionEviction,omitempty"` + + // MaxSuppressionToleranceRate is the maximum cpu suppression tolerance rate that + // can be set by the pod, if the cpu suppression tolerance rate of the pod is greater + // than the maximum cpu suppression tolerance rate, the cpu suppression tolerance rate + // of the pod will be set to the maximum cpu suppression tolerance rate + // +kubectl:validation:Minimum=0 + // +optional + MaxSuppressionToleranceRate *float64 `json:"maxSuppressionToleranceRate,omitempty"` + + // MinSuppressionToleranceDuration is the minimum duration a pod can tolerate cpu + // suppression, only if the cpu suppression duration of the pod is greater than the + // minimum cpu suppression duration, the eviction will be triggered + // +optional + MinSuppressionToleranceDuration *metav1.Duration `json:"minSuppressionToleranceDuration,omitempty"` + + // GracePeriod is the grace period of cpu pressure eviction + // +kubectl:validation:Minimum=0 + // +optional + GracePeriod *int64 `json:"gracePeriod,omitempty"` +} + +type MemoryPressureEvictionConfig struct { + // EnableNumaLevelEviction is whether to enable numa-level eviction + // +optional + EnableNumaLevelEviction *bool `json:"enableNumaLevelEviction,omitempty"` + + // EnableSystemLevelEviction is whether to enable system-level eviction + // +optional + EnableSystemLevelEviction *bool `json:"enableSystemLevelEviction,omitempty"` + + // NumaFreeBelowWatermarkTimesThreshold is the threshold for the number of + // times NUMA's free memory falls below the watermark + // +kubectl:validation:Minimum=0 + // +optional + NumaFreeBelowWatermarkTimesThreshold *int `json:"numaFreeBelowWatermarkTimesThreshold,omitempty"` + + // NumaFreeBelowWatermarkTimesThreshold is the threshold for the rate of + // kswapd reclaiming rate + // +kubectl:validation:Minimum=0 + // +optional + SystemKswapdRateThreshold *int `json:"systemKswapdRateThreshold,omitempty"` + + // SystemKswapdRateExceedTimesThreshold is the threshold for the number of + // times the kswapd reclaiming rate exceeds the threshold + // +kubectl:validation:Minimum=0 + // +optional + SystemKswapdRateExceedTimesThreshold *int `json:"systemKswapdRateExceedTimesThreshold,omitempty"` + + // NumaEvictionRankingMetrics is the metrics used to rank pods for eviction + // at the NUMA level + // +optional + NumaEvictionRankingMetrics []NumaEvictionRankingMetric `json:"numaEvictionRankingMetrics,omitempty"` + + // SystemEvictionRankingMetrics is the metrics used to rank pods for eviction + // at the system level + // +optional + SystemEvictionRankingMetrics []SystemEvictionRankingMetric `json:"systemEvictionRankingMetrics,omitempty"` + + // EnableRSSOveruseEviction is whether to enable pod-level rss overuse eviction + // +optional + EnableRSSOveruseEviction *bool `json:"enableRSSOveruseEviction,omitempty"` + + // RSSOveruseRateThreshold is the threshold for the rate of rss + // +kubectl:validation:Minimum=0 + // +optional + RSSOveruseRateThreshold *float64 `json:"rssOveruseRateThreshold,omitempty"` + + // GracePeriod is the grace period of memory pressure eviction + // +kubectl:validation:Minimum=0 + // +optional + GracePeriod *int64 `json:"gracePeriod,omitempty"` +} + +// NumaEvictionRankingMetric is the metrics used to rank pods for eviction at the +// NUMA level +// +kubebuilder:validation:Enum=qos.pod;priority.pod;mem.total.numa.container +type NumaEvictionRankingMetric string + +// SystemEvictionRankingMetric is the metrics used to rank pods for eviction at the +// system level +// +kubebuilder:validation:Enum=qos.pod;priority.pod;mem.usage.container +type SystemEvictionRankingMetric string diff --git a/pkg/apis/config/v1alpha1/eviction.go b/pkg/apis/config/v1alpha1/eviction.go deleted file mode 100644 index 3669d35..0000000 --- a/pkg/apis/config/v1alpha1/eviction.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2022 The Katalyst Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=evictionconfigurations,shortName=ec -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=.metadata.creationTimestamp -// +kubebuilder:printcolumn:name="SELECTOR",type=string,JSONPath=".spec.nodeLabelSelector" -// +kubebuilder:printcolumn:name="NODES",type=string,JSONPath=".spec.ephemeralSelector.nodeNames" -// +kubebuilder:printcolumn:name="DURATION",type=string,JSONPath=".spec.ephemeralSelector.lastDuration" -// +kubebuilder:printcolumn:name="VALID",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].status" -// +kubebuilder:printcolumn:name="REASON",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].reason" -// +kubebuilder:printcolumn:name="MESSAGE",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].message" - -// EvictionConfiguration is the Schema for the configuration API used by eviction -type EvictionConfiguration struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec EvictionConfigurationSpec `json:"spec,omitempty"` - Status GenericConfigStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true - -// EvictionConfigurationList contains a list of EvictionConfiguration -type EvictionConfigurationList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []EvictionConfiguration `json:"items"` -} - -// EvictionConfigurationSpec defines the desired state of EvictionConfiguration -type EvictionConfigurationSpec struct { - GenericConfigSpec `json:",inline"` - - // Config is custom field for eviction configuration - // all configuration crd should contain a field named with `config` - Config EvictionConfig `json:"config,omitempty"` -} - -type EvictionConfig struct { - // EvictionPluginsConfig is the config for all eviction plugins - EvictionPluginsConfig EvictionPluginsConfig `json:"evictionPluginsConfig,omitempty"` -} - -type EvictionPluginsConfig struct { - // ReclaimedResourcesEvictionPluginConfig is the config for reclaimed resources eviction plugin - ReclaimedResourcesEvictionPluginConfig ReclaimedResourcesEvictionPluginConfig `json:"reclaimedResourcesEvictionPluginConfig,omitempty" json:"reclaimedResourcesEvictionPluginConfig"` - - // MemoryEvictionPluginConfig is the config for memory eviction plugin - MemoryEvictionPluginConfig MemoryEvictionPluginConfig `json:"memoryEvictionPluginConfig,omitempty" json:"memoryEvictionPluginConfig"` -} - -type ReclaimedResourcesEvictionPluginConfig struct { - // EvictionThreshold eviction threshold rate for reclaimed resources - EvictionThreshold map[v1.ResourceName]float64 `json:"evictionThreshold,omitempty"` -} - -type MemoryEvictionPluginConfig struct { - // EnableNumaLevelDetection is whether to enable numa-level detection - EnableNumaLevelDetection *bool `json:"enableNumaLevelDetection,omitempty"` - - // EnableSystemLevelDetection is whether to enable system-level detection - EnableSystemLevelDetection *bool `json:"enableSystemLevelDetection,omitempty"` - - // NumaFreeBelowWatermarkTimesThreshold is the threshold for the number of times NUMA's free memory falls below the watermark - NumaFreeBelowWatermarkTimesThreshold *int `json:"numaFreeBelowWatermarkTimesThreshold,omitempty"` - - // NumaFreeBelowWatermarkTimesThreshold is the threshold for the rate of kswapd reclaiming rate - SystemKswapdRateThreshold *int `json:"systemKswapdRateThreshold,omitempty"` - - // SystemKswapdRateExceedCountThreshold is the threshold for the number of times the kswapd reclaiming rate exceeds the threshold - SystemKswapdRateExceedTimesThreshold *int `json:"systemKswapdRateExceedTimesThreshold,omitempty"` - - // NumaEvictionRankingMetrics is the metrics used to rank pods for eviction at the NUMA level - NumaEvictionRankingMetrics []string `json:"numaEvictionRankingMetrics,omitempty"` - - // SystemEvictionRankingMetrics is the metrics used to rank pods for eviction at the system level - SystemEvictionRankingMetrics []string `json:"systemEvictionRankingMetrics,omitempty"` - - // GracePeriod is the grace period of memory eviction - GracePeriod *int64 `json:"gracePeriod,omitempty"` - - // EnableRSSOveruseDetection is whether to enable pod-level rss overuse detection - EnableRssOveruseDetection *bool `json:"enableRssOveruseDetection,omitempty"` - - // RssOveruseRateThreshold is the threshold for the rate of rss - RssOveruseRateThreshold *float64 `json:"rssOveruseRateThreshold,omitempty"` -} diff --git a/pkg/apis/config/v1alpha1/register.go b/pkg/apis/config/v1alpha1/register.go index 205a7a1..276e640 100644 --- a/pkg/apis/config/v1alpha1/register.go +++ b/pkg/apis/config/v1alpha1/register.go @@ -34,7 +34,6 @@ var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha const ( ResourceNameKatalystCustomConfigs = "katalystcustomconfigs" ResourceNameCustomNodeConfigs = "customnodeconfigs" - ResourceNameEvictionConfigurations = "evictionconfigurations" ResourceNameAdminQoSConfigurations = "adminqosconfigurations" ) @@ -59,8 +58,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CustomNodeConfigList{}, // agent custom config crd - &EvictionConfiguration{}, - &EvictionConfigurationList{}, &AdminQoSConfiguration{}, &AdminQoSConfigurationList{}, ) diff --git a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go index 939bb6e..9aec0ac 100644 --- a/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -31,7 +31,16 @@ import ( // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AdminQoSConfig) DeepCopyInto(out *AdminQoSConfig) { *out = *in - in.ReclaimedResourceConfig.DeepCopyInto(&out.ReclaimedResourceConfig) + if in.ReclaimedResourceConfig != nil { + in, out := &in.ReclaimedResourceConfig, &out.ReclaimedResourceConfig + *out = new(ReclaimedResourceConfig) + (*in).DeepCopyInto(*out) + } + if in.EvictionConfig != nil { + in, out := &in.EvictionConfig, &out.EvictionConfig + *out = new(EvictionConfig) + (*in).DeepCopyInto(*out) + } return } @@ -124,6 +133,129 @@ func (in *AdminQoSConfigurationSpec) DeepCopy() *AdminQoSConfigurationSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CPUHeadroomConfig) DeepCopyInto(out *CPUHeadroomConfig) { + *out = *in + if in.UtilBasedConfig != nil { + in, out := &in.UtilBasedConfig, &out.UtilBasedConfig + *out = new(CPUHeadroomUtilBasedConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUHeadroomConfig. +func (in *CPUHeadroomConfig) DeepCopy() *CPUHeadroomConfig { + if in == nil { + return nil + } + out := new(CPUHeadroomConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CPUHeadroomUtilBasedConfig) DeepCopyInto(out *CPUHeadroomUtilBasedConfig) { + *out = *in + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.TargetReclaimedCoreUtilization != nil { + in, out := &in.TargetReclaimedCoreUtilization, &out.TargetReclaimedCoreUtilization + *out = new(float64) + **out = **in + } + if in.MaxReclaimedCoreUtilization != nil { + in, out := &in.MaxReclaimedCoreUtilization, &out.MaxReclaimedCoreUtilization + *out = new(float64) + **out = **in + } + if in.MaxOversoldRate != nil { + in, out := &in.MaxOversoldRate, &out.MaxOversoldRate + *out = new(float64) + **out = **in + } + if in.MaxHeadroomCapacityRate != nil { + in, out := &in.MaxHeadroomCapacityRate, &out.MaxHeadroomCapacityRate + *out = new(float64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUHeadroomUtilBasedConfig. +func (in *CPUHeadroomUtilBasedConfig) DeepCopy() *CPUHeadroomUtilBasedConfig { + if in == nil { + return nil + } + out := new(CPUHeadroomUtilBasedConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CPUPressureEvictionConfig) DeepCopyInto(out *CPUPressureEvictionConfig) { + *out = *in + if in.EnableLoadEviction != nil { + in, out := &in.EnableLoadEviction, &out.EnableLoadEviction + *out = new(bool) + **out = **in + } + if in.LoadUpperBoundRatio != nil { + in, out := &in.LoadUpperBoundRatio, &out.LoadUpperBoundRatio + *out = new(float64) + **out = **in + } + if in.LoadThresholdMetPercentage != nil { + in, out := &in.LoadThresholdMetPercentage, &out.LoadThresholdMetPercentage + *out = new(float64) + **out = **in + } + if in.LoadMetricRingSize != nil { + in, out := &in.LoadMetricRingSize, &out.LoadMetricRingSize + *out = new(int) + **out = **in + } + if in.LoadEvictionCoolDownTime != nil { + in, out := &in.LoadEvictionCoolDownTime, &out.LoadEvictionCoolDownTime + *out = new(v1.Duration) + **out = **in + } + if in.EnableSuppressionEviction != nil { + in, out := &in.EnableSuppressionEviction, &out.EnableSuppressionEviction + *out = new(bool) + **out = **in + } + if in.MaxSuppressionToleranceRate != nil { + in, out := &in.MaxSuppressionToleranceRate, &out.MaxSuppressionToleranceRate + *out = new(float64) + **out = **in + } + if in.MinSuppressionToleranceDuration != nil { + in, out := &in.MinSuppressionToleranceDuration, &out.MinSuppressionToleranceDuration + *out = new(v1.Duration) + **out = **in + } + if in.GracePeriod != nil { + in, out := &in.GracePeriod, &out.GracePeriod + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUPressureEvictionConfig. +func (in *CPUPressureEvictionConfig) DeepCopy() *CPUPressureEvictionConfig { + if in == nil { + return nil + } + out := new(CPUPressureEvictionConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomNodeConfig) DeepCopyInto(out *CustomNodeConfig) { *out = *in @@ -256,113 +388,35 @@ func (in *EphemeralSelector) DeepCopy() *EphemeralSelector { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EvictionConfig) DeepCopyInto(out *EvictionConfig) { *out = *in - in.EvictionPluginsConfig.DeepCopyInto(&out.EvictionPluginsConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionConfig. -func (in *EvictionConfig) DeepCopy() *EvictionConfig { - if in == nil { - return nil - } - out := new(EvictionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EvictionConfiguration) DeepCopyInto(out *EvictionConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionConfiguration. -func (in *EvictionConfiguration) DeepCopy() *EvictionConfiguration { - if in == nil { - return nil - } - out := new(EvictionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EvictionConfiguration) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EvictionConfigurationList) DeepCopyInto(out *EvictionConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EvictionConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.CPUPressureEvictionConfig != nil { + in, out := &in.CPUPressureEvictionConfig, &out.CPUPressureEvictionConfig + *out = new(CPUPressureEvictionConfig) + (*in).DeepCopyInto(*out) } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionConfigurationList. -func (in *EvictionConfigurationList) DeepCopy() *EvictionConfigurationList { - if in == nil { - return nil + if in.MemoryPressureEvictionConfig != nil { + in, out := &in.MemoryPressureEvictionConfig, &out.MemoryPressureEvictionConfig + *out = new(MemoryPressureEvictionConfig) + (*in).DeepCopyInto(*out) } - out := new(EvictionConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EvictionConfigurationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.ReclaimedResourcesEvictionConfig != nil { + in, out := &in.ReclaimedResourcesEvictionConfig, &out.ReclaimedResourcesEvictionConfig + *out = new(ReclaimedResourcesEvictionConfig) + (*in).DeepCopyInto(*out) } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EvictionConfigurationSpec) DeepCopyInto(out *EvictionConfigurationSpec) { - *out = *in - in.GenericConfigSpec.DeepCopyInto(&out.GenericConfigSpec) - in.Config.DeepCopyInto(&out.Config) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionConfigurationSpec. -func (in *EvictionConfigurationSpec) DeepCopy() *EvictionConfigurationSpec { - if in == nil { - return nil - } - out := new(EvictionConfigurationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EvictionPluginsConfig) DeepCopyInto(out *EvictionPluginsConfig) { - *out = *in - in.ReclaimedResourcesEvictionPluginConfig.DeepCopyInto(&out.ReclaimedResourcesEvictionPluginConfig) - in.MemoryEvictionPluginConfig.DeepCopyInto(&out.MemoryEvictionPluginConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionPluginsConfig. -func (in *EvictionPluginsConfig) DeepCopy() *EvictionPluginsConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionConfig. +func (in *EvictionConfig) DeepCopy() *EvictionConfig { if in == nil { return nil } - out := new(EvictionPluginsConfig) + out := new(EvictionConfig) in.DeepCopyInto(out) return out } @@ -553,15 +607,72 @@ func (in *KatalystCustomConfigStatus) DeepCopy() *KatalystCustomConfigStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MemoryEvictionPluginConfig) DeepCopyInto(out *MemoryEvictionPluginConfig) { +func (in *MemoryHeadroomConfig) DeepCopyInto(out *MemoryHeadroomConfig) { *out = *in - if in.EnableNumaLevelDetection != nil { - in, out := &in.EnableNumaLevelDetection, &out.EnableNumaLevelDetection + if in.UtilBasedConfig != nil { + in, out := &in.UtilBasedConfig, &out.UtilBasedConfig + *out = new(MemoryHeadroomUtilBasedConfig) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryHeadroomConfig. +func (in *MemoryHeadroomConfig) DeepCopy() *MemoryHeadroomConfig { + if in == nil { + return nil + } + out := new(MemoryHeadroomConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemoryHeadroomUtilBasedConfig) DeepCopyInto(out *MemoryHeadroomUtilBasedConfig) { + *out = *in + if in.Enable != nil { + in, out := &in.Enable, &out.Enable + *out = new(bool) + **out = **in + } + if in.FreeBasedRatio != nil { + in, out := &in.FreeBasedRatio, &out.FreeBasedRatio + *out = new(float64) + **out = **in + } + if in.StaticBasedCapacity != nil { + in, out := &in.StaticBasedCapacity, &out.StaticBasedCapacity + *out = new(float64) + **out = **in + } + if in.CacheBasedRatio != nil { + in, out := &in.CacheBasedRatio, &out.CacheBasedRatio + *out = new(float64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryHeadroomUtilBasedConfig. +func (in *MemoryHeadroomUtilBasedConfig) DeepCopy() *MemoryHeadroomUtilBasedConfig { + if in == nil { + return nil + } + out := new(MemoryHeadroomUtilBasedConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemoryPressureEvictionConfig) DeepCopyInto(out *MemoryPressureEvictionConfig) { + *out = *in + if in.EnableNumaLevelEviction != nil { + in, out := &in.EnableNumaLevelEviction, &out.EnableNumaLevelEviction *out = new(bool) **out = **in } - if in.EnableSystemLevelDetection != nil { - in, out := &in.EnableSystemLevelDetection, &out.EnableSystemLevelDetection + if in.EnableSystemLevelEviction != nil { + in, out := &in.EnableSystemLevelEviction, &out.EnableSystemLevelEviction *out = new(bool) **out = **in } @@ -582,38 +693,38 @@ func (in *MemoryEvictionPluginConfig) DeepCopyInto(out *MemoryEvictionPluginConf } if in.NumaEvictionRankingMetrics != nil { in, out := &in.NumaEvictionRankingMetrics, &out.NumaEvictionRankingMetrics - *out = make([]string, len(*in)) + *out = make([]NumaEvictionRankingMetric, len(*in)) copy(*out, *in) } if in.SystemEvictionRankingMetrics != nil { in, out := &in.SystemEvictionRankingMetrics, &out.SystemEvictionRankingMetrics - *out = make([]string, len(*in)) + *out = make([]SystemEvictionRankingMetric, len(*in)) copy(*out, *in) } - if in.GracePeriod != nil { - in, out := &in.GracePeriod, &out.GracePeriod - *out = new(int64) - **out = **in - } - if in.EnableRssOveruseDetection != nil { - in, out := &in.EnableRssOveruseDetection, &out.EnableRssOveruseDetection + if in.EnableRSSOveruseEviction != nil { + in, out := &in.EnableRSSOveruseEviction, &out.EnableRSSOveruseEviction *out = new(bool) **out = **in } - if in.RssOveruseRateThreshold != nil { - in, out := &in.RssOveruseRateThreshold, &out.RssOveruseRateThreshold + if in.RSSOveruseRateThreshold != nil { + in, out := &in.RSSOveruseRateThreshold, &out.RSSOveruseRateThreshold *out = new(float64) **out = **in } + if in.GracePeriod != nil { + in, out := &in.GracePeriod, &out.GracePeriod + *out = new(int64) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryEvictionPluginConfig. -func (in *MemoryEvictionPluginConfig) DeepCopy() *MemoryEvictionPluginConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryPressureEvictionConfig. +func (in *MemoryPressureEvictionConfig) DeepCopy() *MemoryPressureEvictionConfig { if in == nil { return nil } - out := new(MemoryEvictionPluginConfig) + out := new(MemoryPressureEvictionConfig) in.DeepCopyInto(out) return out } @@ -659,6 +770,16 @@ func (in *ReclaimedResourceConfig) DeepCopyInto(out *ReclaimedResourceConfig) { } } } + if in.CPUHeadroomConfig != nil { + in, out := &in.CPUHeadroomConfig, &out.CPUHeadroomConfig + *out = new(CPUHeadroomConfig) + (*in).DeepCopyInto(*out) + } + if in.MemoryHeadroomConfig != nil { + in, out := &in.MemoryHeadroomConfig, &out.MemoryHeadroomConfig + *out = new(MemoryHeadroomConfig) + (*in).DeepCopyInto(*out) + } return } @@ -673,7 +794,7 @@ func (in *ReclaimedResourceConfig) DeepCopy() *ReclaimedResourceConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReclaimedResourcesEvictionPluginConfig) DeepCopyInto(out *ReclaimedResourcesEvictionPluginConfig) { +func (in *ReclaimedResourcesEvictionConfig) DeepCopyInto(out *ReclaimedResourcesEvictionConfig) { *out = *in if in.EvictionThreshold != nil { in, out := &in.EvictionThreshold, &out.EvictionThreshold @@ -682,15 +803,20 @@ func (in *ReclaimedResourcesEvictionPluginConfig) DeepCopyInto(out *ReclaimedRes (*out)[key] = val } } + if in.GracePeriod != nil { + in, out := &in.GracePeriod, &out.GracePeriod + *out = new(int64) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReclaimedResourcesEvictionPluginConfig. -func (in *ReclaimedResourcesEvictionPluginConfig) DeepCopy() *ReclaimedResourcesEvictionPluginConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReclaimedResourcesEvictionConfig. +func (in *ReclaimedResourcesEvictionConfig) DeepCopy() *ReclaimedResourcesEvictionConfig { if in == nil { return nil } - out := new(ReclaimedResourcesEvictionPluginConfig) + out := new(ReclaimedResourcesEvictionConfig) in.DeepCopyInto(out) return out }