-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
not update HPA if it's not ready (#169)
- Loading branch information
1 parent
c555c8b
commit f0f81be
Showing
46 changed files
with
1,712 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...rs/testdata/reconcile-for-the-single-container-pod-gathering-data-finished/after/hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-hpa-mercari | ||
namespace: default | ||
spec: | ||
behavior: | ||
scaleDown: | ||
policies: | ||
- periodSeconds: 90 | ||
type: Percent | ||
value: 2 | ||
selectPolicy: Max | ||
scaleUp: | ||
policies: | ||
- periodSeconds: 60 | ||
type: Percent | ||
value: 100 | ||
selectPolicy: Max | ||
stabilizationWindowSeconds: 0 | ||
maxReplicas: 20 | ||
metrics: | ||
- containerResource: | ||
container: app | ||
name: cpu | ||
target: | ||
averageUtilization: 75 | ||
type: Utilization | ||
type: ContainerResource | ||
minReplicas: 5 | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
status: | ||
currentMetrics: null | ||
desiredReplicas: 0 |
73 changes: 73 additions & 0 deletions
73
...stdata/reconcile-for-the-single-container-pod-gathering-data-finished/after/tortoise.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
metadata: | ||
name: mercari | ||
namespace: default | ||
spec: | ||
resourcePolicy: | ||
- autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical | ||
containerName: app | ||
targetRefs: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
status: | ||
conditions: | ||
containerRecommendationFromVPA: | ||
- containerName: app | ||
maxRecommendation: | ||
cpu: | ||
quantity: "3" | ||
updatedAt: null | ||
memory: | ||
quantity: 3Gi | ||
updatedAt: null | ||
recommendation: | ||
cpu: | ||
quantity: "3" | ||
updatedAt: null | ||
memory: | ||
quantity: 3Gi | ||
updatedAt: null | ||
tortoiseConditions: null | ||
recommendations: | ||
horizontal: | ||
maxReplicas: | ||
- from: 0 | ||
timezone: Local | ||
to: 24 | ||
updatedAt: "2023-10-06T01:01:24Z" | ||
value: 20 | ||
minReplicas: | ||
- from: 0 | ||
timezone: Local | ||
to: 24 | ||
updatedAt: "2023-10-06T01:01:24Z" | ||
value: 5 | ||
targetUtilizations: | ||
- containerName: app | ||
targetUtilization: | ||
cpu: 75 | ||
vertical: | ||
containerResourceRecommendation: | ||
- RecommendedResource: | ||
cpu: "4" | ||
memory: 3Gi | ||
containerName: app | ||
targets: | ||
deployment: "" | ||
horizontalPodAutoscaler: tortoise-hpa-mercari | ||
verticalPodAutoscalers: | ||
- name: tortoise-updater-mercari | ||
role: Updater | ||
- name: tortoise-monitor-mercari | ||
role: Monitor | ||
tortoisePhase: Working | ||
containerResourcePhases: | ||
- containerName: "app" | ||
resourcePhases: | ||
cpu: | ||
phase: Working | ||
memory: | ||
phase: Working |
33 changes: 33 additions & 0 deletions
33
...ata/reconcile-for-the-single-container-pod-gathering-data-finished/after/vpa-Monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-monitor-mercari | ||
namespace: default | ||
spec: | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: app | ||
targetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
updatePolicy: | ||
updateMode: "Off" | ||
status: | ||
conditions: | ||
- lastTransitionTime: null | ||
status: "True" | ||
type: RecommendationProvided | ||
recommendation: | ||
containerRecommendations: | ||
- containerName: app | ||
lowerBound: | ||
cpu: "3" | ||
memory: 3Gi | ||
target: | ||
cpu: "3" | ||
memory: 3Gi | ||
upperBound: | ||
cpu: "5" | ||
memory: 5Gi |
34 changes: 34 additions & 0 deletions
34
...ata/reconcile-for-the-single-container-pod-gathering-data-finished/after/vpa-Updater.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-updater-mercari | ||
namespace: default | ||
spec: | ||
recommenders: | ||
- name: tortoise-controller | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: app | ||
targetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
updatePolicy: | ||
updateMode: Auto | ||
status: | ||
recommendation: | ||
containerRecommendations: | ||
- containerName: app | ||
lowerBound: | ||
cpu: "4" | ||
memory: 3Gi | ||
target: | ||
cpu: "4" | ||
memory: 3Gi | ||
uncappedTarget: | ||
cpu: "4" | ||
memory: 3Gi | ||
upperBound: | ||
cpu: "4" | ||
memory: 3Gi |
23 changes: 23 additions & 0 deletions
23
...ata/reconcile-for-the-single-container-pod-gathering-data-finished/before/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
metadata: | ||
name: mercari-app | ||
namespace: default | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: mercari | ||
strategy: {} | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: mercari | ||
spec: | ||
containers: | ||
- image: awesome-mercari-app-image | ||
name: app | ||
resources: | ||
requests: | ||
cpu: "4" | ||
memory: 4Gi | ||
status: | ||
replicas: 10 |
38 changes: 38 additions & 0 deletions
38
...s/testdata/reconcile-for-the-single-container-pod-gathering-data-finished/before/hpa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-hpa-mercari | ||
namespace: default | ||
spec: | ||
behavior: | ||
scaleDown: | ||
policies: | ||
- periodSeconds: 90 | ||
type: Percent | ||
value: 2 | ||
selectPolicy: Max | ||
scaleUp: | ||
policies: | ||
- periodSeconds: 60 | ||
type: Percent | ||
value: 100 | ||
selectPolicy: Max | ||
stabilizationWindowSeconds: 0 | ||
maxReplicas: 100 | ||
metrics: | ||
- containerResource: | ||
container: app | ||
name: cpu | ||
target: | ||
averageUtilization: 50 | ||
type: Utilization | ||
type: ContainerResource | ||
minReplicas: 1 | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
status: | ||
currentMetrics: null | ||
desiredReplicas: 0 |
69 changes: 69 additions & 0 deletions
69
...tdata/reconcile-for-the-single-container-pod-gathering-data-finished/before/tortoise.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
metadata: | ||
name: mercari | ||
namespace: default | ||
spec: | ||
resourcePolicy: | ||
- autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical | ||
containerName: app | ||
targetRefs: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
status: | ||
conditions: | ||
containerRecommendationFromVPA: | ||
- containerName: app | ||
maxRecommendation: | ||
cpu: | ||
quantity: "0" | ||
updatedAt: null | ||
memory: | ||
quantity: "0" | ||
updatedAt: null | ||
recommendation: | ||
cpu: | ||
quantity: "0" | ||
updatedAt: null | ||
memory: | ||
quantity: "0" | ||
updatedAt: null | ||
tortoiseConditions: null | ||
recommendations: | ||
horizontal: | ||
maxReplicas: | ||
- from: 0 | ||
timezone: Local | ||
to: 24 | ||
updatedAt: "2023-10-06T01:01:24Z" | ||
value: 15 | ||
minReplicas: | ||
- from: 0 | ||
timezone: Local | ||
to: 24 | ||
updatedAt: "2023-10-06T01:01:24Z" | ||
value: 3 | ||
targetUtilizations: | ||
- containerName: app | ||
targetUtilization: | ||
cpu: 50 | ||
vertical: | ||
containerResourceRecommendation: null | ||
targets: | ||
deployment: "" | ||
horizontalPodAutoscaler: tortoise-hpa-mercari | ||
verticalPodAutoscalers: | ||
- name: tortoise-updater-mercari | ||
role: Updater | ||
- name: tortoise-monitor-mercari | ||
role: Monitor | ||
tortoisePhase: GatheringData | ||
containerResourcePhases: | ||
- containerName: "app" | ||
resourcePhases: | ||
cpu: | ||
phase: GatheringData | ||
memory: | ||
phase: GatheringData |
33 changes: 33 additions & 0 deletions
33
...ta/reconcile-for-the-single-container-pod-gathering-data-finished/before/vpa-Monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-monitor-mercari | ||
namespace: default | ||
spec: | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: app | ||
targetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
updatePolicy: | ||
updateMode: "Off" | ||
status: | ||
conditions: | ||
- lastTransitionTime: null | ||
status: "True" | ||
type: RecommendationProvided | ||
recommendation: | ||
containerRecommendations: | ||
- containerName: app | ||
lowerBound: | ||
cpu: "3" | ||
memory: 3Gi | ||
target: | ||
cpu: "3" | ||
memory: 3Gi | ||
upperBound: | ||
cpu: "5" | ||
memory: 5Gi |
19 changes: 19 additions & 0 deletions
19
...ta/reconcile-for-the-single-container-pod-gathering-data-finished/before/vpa-Updater.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
metadata: | ||
annotations: | ||
tortoise.autoscaling.mercari.com/managed-by-tortoise: "true" | ||
tortoises.autoscaling.mercari.com/tortoise-name: mercari | ||
name: tortoise-updater-mercari | ||
namespace: default | ||
spec: | ||
recommenders: | ||
- name: tortoise-controller | ||
resourcePolicy: | ||
containerPolicies: | ||
- containerName: app | ||
targetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: mercari-app | ||
updatePolicy: | ||
updateMode: Auto | ||
status: {} |
Oops, something went wrong.