Skip to content

Commit c9a9c31

Browse files
authored
allow to re-add HPA name if same (#398)
1 parent 71c3130 commit c9a9c31

File tree

24 files changed

+1583
-24
lines changed

24 files changed

+1583
-24
lines changed

api/v1beta3/testdata/validating/no-horizontal-with-hpa/before-tortoise.yaml

+79-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,82 @@ spec:
1919
- containerName: nginx
2020
policy:
2121
cpu: Horizontal
22-
memory: Vertical
22+
memory: Vertical
23+
status:
24+
autoscalingPolicy:
25+
- containerName: istio-proxy
26+
policy:
27+
cpu: Horizontal
28+
memory: Vertical
29+
- containerName: nginx
30+
policy:
31+
cpu: Horizontal
32+
memory: Vertical
33+
tortoisePhase: Working
34+
containerResourcePhases:
35+
- containerName: "nginx"
36+
resourcePhases:
37+
cpu:
38+
phase: Working
39+
memory:
40+
phase: Working
41+
- containerName: "istio-proxy"
42+
resourcePhases:
43+
cpu:
44+
phase: Working
45+
memory:
46+
phase: Working
47+
targets:
48+
scaleTargetRef:
49+
kind: Deployment
50+
name: sample
51+
horizontalPodAutoscaler: sample
52+
verticalPodAutoscalers:
53+
- name: tortoise-monitor-sample
54+
role: Monitor
55+
- name: tortoise-updater-sample
56+
role: Updater
57+
conditions:
58+
containerRecommendationFromVPA:
59+
- containerName: echo
60+
maxRecommendation:
61+
cpu:
62+
quantity: 6m
63+
updatedAt: "2023-10-04T15:45:16Z"
64+
memory:
65+
quantity: "56623104"
66+
updatedAt: "2023-10-04T15:45:16Z"
67+
recommendation:
68+
cpu:
69+
quantity: 6m
70+
updatedAt: "2023-10-04T15:45:16Z"
71+
memory:
72+
quantity: "56623104"
73+
updatedAt: "2023-10-04T15:45:16Z"
74+
recommendations:
75+
horizontal:
76+
targetUtilizations:
77+
- containerName: "nginx"
78+
targetUtilization:
79+
cpu: 30
80+
- containerName: "istio-proxy"
81+
targetUtilization:
82+
cpu: 30
83+
maxReplicas:
84+
- from: 0
85+
timezone: Asia/Tokyo
86+
to: 24
87+
updatedAt: "2023-10-04T15:45:16Z"
88+
value: 12
89+
minReplicas:
90+
- from: 0
91+
timezone: Asia/Tokyo
92+
to: 1
93+
updatedAt: "2023-10-04T15:45:16Z"
94+
value: 3
95+
vertical:
96+
containerResourceRecommendation:
97+
- RecommendedResource:
98+
cpu: 6m
99+
memory: "56623104"
100+
containerName: nginx

api/v1beta3/testdata/validating/no-horizontal-with-hpa/updating-tortoise.yaml

+79-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,82 @@ spec:
1919
- containerName: nginx
2020
policy:
2121
cpu: Vertical
22-
memory: Vertical
22+
memory: Vertical
23+
status:
24+
autoscalingPolicy:
25+
- containerName: istio-proxy
26+
policy:
27+
cpu: Horizontal
28+
memory: Vertical
29+
- containerName: nginx
30+
policy:
31+
cpu: Horizontal
32+
memory: Vertical
33+
tortoisePhase: Working
34+
containerResourcePhases:
35+
- containerName: "nginx"
36+
resourcePhases:
37+
cpu:
38+
phase: Working
39+
memory:
40+
phase: Working
41+
- containerName: "istio-proxy"
42+
resourcePhases:
43+
cpu:
44+
phase: Working
45+
memory:
46+
phase: Working
47+
targets:
48+
scaleTargetRef:
49+
kind: Deployment
50+
name: sample
51+
horizontalPodAutoscaler: sample
52+
verticalPodAutoscalers:
53+
- name: tortoise-monitor-sample
54+
role: Monitor
55+
- name: tortoise-updater-sample
56+
role: Updater
57+
conditions:
58+
containerRecommendationFromVPA:
59+
- containerName: echo
60+
maxRecommendation:
61+
cpu:
62+
quantity: 6m
63+
updatedAt: "2023-10-04T15:45:16Z"
64+
memory:
65+
quantity: "56623104"
66+
updatedAt: "2023-10-04T15:45:16Z"
67+
recommendation:
68+
cpu:
69+
quantity: 6m
70+
updatedAt: "2023-10-04T15:45:16Z"
71+
memory:
72+
quantity: "56623104"
73+
updatedAt: "2023-10-04T15:45:16Z"
74+
recommendations:
75+
horizontal:
76+
targetUtilizations:
77+
- containerName: "nginx"
78+
targetUtilization:
79+
cpu: 30
80+
- containerName: "istio-proxy"
81+
targetUtilization:
82+
cpu: 30
83+
maxReplicas:
84+
- from: 0
85+
timezone: Asia/Tokyo
86+
to: 24
87+
updatedAt: "2023-10-04T15:45:16Z"
88+
value: 12
89+
minReplicas:
90+
- from: 0
91+
timezone: Asia/Tokyo
92+
to: 1
93+
updatedAt: "2023-10-04T15:45:16Z"
94+
value: 3
95+
vertical:
96+
containerResourceRecommendation:
97+
- RecommendedResource:
98+
cpu: 6m
99+
memory: "56623104"
100+
containerName: nginx

api/v1beta3/testdata/validating/no-horizontal-with-no-deletion/before-tortoise.yaml

+79-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,82 @@ spec:
1818
- containerName: nginx
1919
policy:
2020
cpu: Horizontal
21-
memory: Vertical
21+
memory: Vertical
22+
status:
23+
autoscalingPolicy:
24+
- containerName: istio-proxy
25+
policy:
26+
cpu: Horizontal
27+
memory: Vertical
28+
- containerName: nginx
29+
policy:
30+
cpu: Horizontal
31+
memory: Vertical
32+
tortoisePhase: Working
33+
containerResourcePhases:
34+
- containerName: "nginx"
35+
resourcePhases:
36+
cpu:
37+
phase: Working
38+
memory:
39+
phase: Working
40+
- containerName: "istio-proxy"
41+
resourcePhases:
42+
cpu:
43+
phase: Working
44+
memory:
45+
phase: Working
46+
targets:
47+
scaleTargetRef:
48+
kind: Deployment
49+
name: sample
50+
horizontalPodAutoscaler: sample
51+
verticalPodAutoscalers:
52+
- name: tortoise-monitor-sample
53+
role: Monitor
54+
- name: tortoise-updater-sample
55+
role: Updater
56+
conditions:
57+
containerRecommendationFromVPA:
58+
- containerName: echo
59+
maxRecommendation:
60+
cpu:
61+
quantity: 6m
62+
updatedAt: "2023-10-04T15:45:16Z"
63+
memory:
64+
quantity: "56623104"
65+
updatedAt: "2023-10-04T15:45:16Z"
66+
recommendation:
67+
cpu:
68+
quantity: 6m
69+
updatedAt: "2023-10-04T15:45:16Z"
70+
memory:
71+
quantity: "56623104"
72+
updatedAt: "2023-10-04T15:45:16Z"
73+
recommendations:
74+
horizontal:
75+
targetUtilizations:
76+
- containerName: "nginx"
77+
targetUtilization:
78+
cpu: 30
79+
- containerName: "istio-proxy"
80+
targetUtilization:
81+
cpu: 30
82+
maxReplicas:
83+
- from: 0
84+
timezone: Asia/Tokyo
85+
to: 24
86+
updatedAt: "2023-10-04T15:45:16Z"
87+
value: 12
88+
minReplicas:
89+
- from: 0
90+
timezone: Asia/Tokyo
91+
to: 1
92+
updatedAt: "2023-10-04T15:45:16Z"
93+
value: 3
94+
vertical:
95+
containerResourceRecommendation:
96+
- RecommendedResource:
97+
cpu: 6m
98+
memory: "56623104"
99+
containerName: nginx

api/v1beta3/testdata/validating/no-horizontal-with-no-deletion/updating-tortoise.yaml

+79-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,82 @@ spec:
1818
- containerName: nginx
1919
policy:
2020
cpu: Vertical
21-
memory: Vertical
21+
memory: Vertical
22+
status:
23+
autoscalingPolicy:
24+
- containerName: istio-proxy
25+
policy:
26+
cpu: Horizontal
27+
memory: Vertical
28+
- containerName: nginx
29+
policy:
30+
cpu: Horizontal
31+
memory: Vertical
32+
tortoisePhase: Working
33+
containerResourcePhases:
34+
- containerName: "nginx"
35+
resourcePhases:
36+
cpu:
37+
phase: Working
38+
memory:
39+
phase: Working
40+
- containerName: "istio-proxy"
41+
resourcePhases:
42+
cpu:
43+
phase: Working
44+
memory:
45+
phase: Working
46+
targets:
47+
scaleTargetRef:
48+
kind: Deployment
49+
name: sample
50+
horizontalPodAutoscaler: sample
51+
verticalPodAutoscalers:
52+
- name: tortoise-monitor-sample
53+
role: Monitor
54+
- name: tortoise-updater-sample
55+
role: Updater
56+
conditions:
57+
containerRecommendationFromVPA:
58+
- containerName: echo
59+
maxRecommendation:
60+
cpu:
61+
quantity: 6m
62+
updatedAt: "2023-10-04T15:45:16Z"
63+
memory:
64+
quantity: "56623104"
65+
updatedAt: "2023-10-04T15:45:16Z"
66+
recommendation:
67+
cpu:
68+
quantity: 6m
69+
updatedAt: "2023-10-04T15:45:16Z"
70+
memory:
71+
quantity: "56623104"
72+
updatedAt: "2023-10-04T15:45:16Z"
73+
recommendations:
74+
horizontal:
75+
targetUtilizations:
76+
- containerName: "nginx"
77+
targetUtilization:
78+
cpu: 30
79+
- containerName: "istio-proxy"
80+
targetUtilization:
81+
cpu: 30
82+
maxReplicas:
83+
- from: 0
84+
timezone: Asia/Tokyo
85+
to: 24
86+
updatedAt: "2023-10-04T15:45:16Z"
87+
value: 12
88+
minReplicas:
89+
- from: 0
90+
timezone: Asia/Tokyo
91+
to: 1
92+
updatedAt: "2023-10-04T15:45:16Z"
93+
value: 3
94+
vertical:
95+
containerResourceRecommendation:
96+
- RecommendedResource:
97+
cpu: 6m
98+
memory: "56623104"
99+
containerName: nginx

0 commit comments

Comments
 (0)