Skip to content

Commit

Permalink
Merge pull request #18 from luomingmeng/dev/adminqos_list_use_pointer
Browse files Browse the repository at this point in the history
refactor adminqos definition list and map member remove omitempty json flag
  • Loading branch information
waynepeking348 authored Jul 3, 2023
2 parents be7b0f7 + de156c1 commit dcb57b0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ spec:
- priority.pod
- mem.total.numa.container
type: string
minItems: 1
type: array
numaFreeBelowWatermarkTimesThreshold:
description: NumaFreeBelowWatermarkTimesThreshold is the
Expand All @@ -185,6 +186,7 @@ spec:
- priority.pod
- mem.usage.container
type: string
minItems: 1
type: array
systemKswapdRateExceedTimesThreshold:
description: SystemKswapdRateExceedTimesThreshold is the
Expand Down
6 changes: 4 additions & 2 deletions pkg/apis/config/v1alpha1/adminqos.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ type EvictionConfig struct {
// 'foo' means "dry-run 'foo'"
// first item for a particular name wins
// +optional
DryRun []string `json:"dryRun,omitempty"`
DryRun []string `json:"dryRun"`

// CPUPressureEvictionConfig is the config for cpu pressure eviction
// +optional
Expand All @@ -195,7 +195,7 @@ type EvictionConfig struct {
type ReclaimedResourcesEvictionConfig struct {
// EvictionThreshold eviction threshold rate for reclaimed resources
// +optional
EvictionThreshold map[v1.ResourceName]float64 `json:"evictionThreshold,omitempty"`
EvictionThreshold map[v1.ResourceName]float64 `json:"evictionThreshold"`

// GracePeriod is the grace period of reclaimed resources' eviction
// +kubectl:validation:Minimum=0
Expand Down Expand Up @@ -289,11 +289,13 @@ type MemoryPressureEvictionConfig struct {

// NumaEvictionRankingMetrics is the metrics used to rank pods for eviction
// at the NUMA level
// +kubebuilder:validation:MinItems=1
// +optional
NumaEvictionRankingMetrics []NumaEvictionRankingMetric `json:"numaEvictionRankingMetrics,omitempty"`

// SystemEvictionRankingMetrics is the metrics used to rank pods for eviction
// at the system level
// +kubebuilder:validation:MinItems=1
// +optional
SystemEvictionRankingMetrics []SystemEvictionRankingMetric `json:"systemEvictionRankingMetrics,omitempty"`

Expand Down
14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dcb57b0

Please sign in to comment.