Skip to content

Commit

Permalink
Feat: need one new Trait to support HorizontalPodAutoscaler of CPU/ME…
Browse files Browse the repository at this point in the history
…M/PodCustomMetrcs

Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
  • Loading branch information
StevenLeiZhang committed Dec 24, 2022
1 parent f029f55 commit a60f114
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vela-templates/definitions/internal/trait/hpa.cue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ template: {
}
}
},
if len(parameter.podCustomMetrics) != 0 for m in parameter.podCustomMetrics {
if parameter.podCustomMetrics != _|_ for m in parameter.podCustomMetrics {
type: "Pods"
pods: {
metric: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ spec:
properties:
targetAPIVersion: apps/v1
targetKind: Deployment
max: 10
min: 1
cpu:
type: Utilization
value: 80
max: 10
mem:
type: Utilization
type: AverageValue
value: 90
min: 1
podCustomMetrics:
# here are custom metric names and values
- name: pod_net_received_rate
Expand Down

0 comments on commit a60f114

Please sign in to comment.