Skip to content

Commit

Permalink
doc: netqos based on terway-qos
Browse files Browse the repository at this point in the history
  • Loading branch information
lucming committed Dec 16, 2023
1 parent 688cdd3 commit f23c9cf
Show file tree
Hide file tree
Showing 4 changed files with 704 additions and 0 deletions.
36 changes: 36 additions & 0 deletions apis/slo/v1alpha1/nodeslo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1

import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -202,6 +203,41 @@ type ResourceQOS struct {
MemoryQOS *MemoryQOSCfg `json:"memoryQOS,omitempty"`
BlkIOQOS *BlkIOQOSCfg `json:"blkioQOS,omitempty"`
ResctrlQOS *ResctrlQOSCfg `json:"resctrlQOS,omitempty"`
NetworkQOS *NetworkQOSCfg `json:"networkQOS,omitempty"`
}

type NetworkQOSCfg struct {
Enable *bool `json:"enable,omitempty"`
NetworkQOS `json:",inline"`
TotalNetworkBandwidth resource.Quantity `json:"totalNetworkBandwidth,omitempty"`
}

type NetworkQOS struct {
// IngressRequest describes the minimum percentage of network bandwidth guaranteed in the ingress direction.
// bps(bytes per second), valid in 0-100
// +kubebuilder:default=0
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
IngressRequest *int64 `json:"ingressRequest,omitempty" validate:"omitempty,min=0,max=100"`
// IngressLimit describes the maximum percentage of network bandwidth can be used in the ingress direction,
// bps(bytes per seconds), valid in 0-100
// +kubebuilder:default=100
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
IngressLimit *int64 `json:"ingressLimit,omitempty" validate:"omitempty,min=0,max=100"`

// EgressRequest describes the minimum percentage of network bandwidth guaranteed in the egress direction.
// bps(bytes per second), valid in 0-100
// +kubebuilder:default=0
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
EgressRequest *int64 `json:"egressRequest,omitempty" validate:"omitempty,min=0,max=100"`
// EgressLimit describes the maximum percentage of network bandwidth can be used in the egress direction,
// bps(bytes per seconds), validate in 0-100
// +kubebuilder:default=100
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
EgressLimit *int64 `json:"egressLimit,omitempty" validate:"omitempty,min=0,max=100"`
}

type ResourceQOSPolicies struct {
Expand Down
62 changes: 62 additions & 0 deletions apis/slo/v1alpha1/zz_generated.deepcopy.go

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

235 changes: 235 additions & 0 deletions config/crd/bases/slo.koordinator.sh_nodeslos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,53 @@ spec:
minimum: 1
type: integer
type: object
networkQOS:
properties:
egressLimit:
default: 100
description: EgressLimit describes the maximum percentage
of network bandwidth can be used in the egress direction,
bps(bytes per seconds), validate in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
egressRequest:
default: 0
description: EgressRequest describes the minimum percentage
of network bandwidth guaranteed in the egress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
enable:
type: boolean
ingressLimit:
default: 100
description: IngressLimit describes the maximum percentage
of network bandwidth can be used in the ingress direction,
bps(bytes per seconds), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
ingressRequest:
default: 0
description: IngressRequest describes the minimum percentage
of network bandwidth guaranteed in the ingress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
totalNetworkBandwidth:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resctrlQOS:
description: ResctrlQOSCfg stores node-level config of resctrl
qos
Expand Down Expand Up @@ -526,6 +573,53 @@ spec:
minimum: 1
type: integer
type: object
networkQOS:
properties:
egressLimit:
default: 100
description: EgressLimit describes the maximum percentage
of network bandwidth can be used in the egress direction,
bps(bytes per seconds), validate in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
egressRequest:
default: 0
description: EgressRequest describes the minimum percentage
of network bandwidth guaranteed in the egress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
enable:
type: boolean
ingressLimit:
default: 100
description: IngressLimit describes the maximum percentage
of network bandwidth can be used in the ingress direction,
bps(bytes per seconds), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
ingressRequest:
default: 0
description: IngressRequest describes the minimum percentage
of network bandwidth guaranteed in the ingress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
totalNetworkBandwidth:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resctrlQOS:
description: ResctrlQOSCfg stores node-level config of resctrl
qos
Expand Down Expand Up @@ -751,6 +845,53 @@ spec:
minimum: 1
type: integer
type: object
networkQOS:
properties:
egressLimit:
default: 100
description: EgressLimit describes the maximum percentage
of network bandwidth can be used in the egress direction,
bps(bytes per seconds), validate in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
egressRequest:
default: 0
description: EgressRequest describes the minimum percentage
of network bandwidth guaranteed in the egress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
enable:
type: boolean
ingressLimit:
default: 100
description: IngressLimit describes the maximum percentage
of network bandwidth can be used in the ingress direction,
bps(bytes per seconds), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
ingressRequest:
default: 0
description: IngressRequest describes the minimum percentage
of network bandwidth guaranteed in the ingress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
totalNetworkBandwidth:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resctrlQOS:
description: ResctrlQOSCfg stores node-level config of resctrl
qos
Expand Down Expand Up @@ -976,6 +1117,53 @@ spec:
minimum: 1
type: integer
type: object
networkQOS:
properties:
egressLimit:
default: 100
description: EgressLimit describes the maximum percentage
of network bandwidth can be used in the egress direction,
bps(bytes per seconds), validate in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
egressRequest:
default: 0
description: EgressRequest describes the minimum percentage
of network bandwidth guaranteed in the egress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
enable:
type: boolean
ingressLimit:
default: 100
description: IngressLimit describes the maximum percentage
of network bandwidth can be used in the ingress direction,
bps(bytes per seconds), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
ingressRequest:
default: 0
description: IngressRequest describes the minimum percentage
of network bandwidth guaranteed in the ingress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
totalNetworkBandwidth:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resctrlQOS:
description: ResctrlQOSCfg stores node-level config of resctrl
qos
Expand Down Expand Up @@ -1208,6 +1396,53 @@ spec:
minimum: 1
type: integer
type: object
networkQOS:
properties:
egressLimit:
default: 100
description: EgressLimit describes the maximum percentage
of network bandwidth can be used in the egress direction,
bps(bytes per seconds), validate in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
egressRequest:
default: 0
description: EgressRequest describes the minimum percentage
of network bandwidth guaranteed in the egress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
enable:
type: boolean
ingressLimit:
default: 100
description: IngressLimit describes the maximum percentage
of network bandwidth can be used in the ingress direction,
bps(bytes per seconds), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
ingressRequest:
default: 0
description: IngressRequest describes the minimum percentage
of network bandwidth guaranteed in the ingress direction.
bps(bytes per second), valid in 0-100
format: int64
maximum: 100
minimum: 0
type: integer
totalNetworkBandwidth:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resctrlQOS:
description: ResctrlQOSCfg stores node-level config of resctrl
qos
Expand Down
Loading

0 comments on commit f23c9cf

Please sign in to comment.