Skip to content

Commit

Permalink
fix: remove inline tag for corev1.ResourceList to fix #390 (#391)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Liu <jasonliu747@gmail.com>
  • Loading branch information
jasonliu747 committed Jul 21, 2022
1 parent f32a0ba commit bf308ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apis/slo/v1alpha1/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import (
)

type ResourceMap struct {
corev1.ResourceList `json:",inline"`
corev1.ResourceList `json:"resources,omitempty"`
Devices []schedulingv1alpha1.DeviceInfo `json:"devices,omitempty"`
}
32 changes: 20 additions & 12 deletions config/crd/bases/slo.koordinator.sh_nodemetrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ spec:
description: NodeMetric contains the metrics for this node.
properties:
nodeUsage:
additionalProperties:
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
properties:
devices:
items:
Expand Down Expand Up @@ -94,6 +88,16 @@ spec:
type: string
type: object
type: array
resources:
additionalProperties:
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
description: ResourceList is a set of (resource name, quantity)
pairs.
type: object
type: object
type: object
podsMetric:
Expand All @@ -106,12 +110,6 @@ spec:
namespace:
type: string
podUsage:
additionalProperties:
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
properties:
devices:
items:
Expand Down Expand Up @@ -143,6 +141,16 @@ spec:
type: string
type: object
type: array
resources:
additionalProperties:
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
description: ResourceList is a set of (resource name, quantity)
pairs.
type: object
type: object
type: object
type: array
Expand Down

0 comments on commit bf308ed

Please sign in to comment.