-
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.
add the test cases for updating validation (#161)
- Loading branch information
1 parent
f05a469
commit 9ab5b47
Showing
14 changed files
with
375 additions
and
17 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
api/v1beta1/testdata/validating/no-horizontal-with-hpa/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,22 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "DeleteAll" | ||
targetRefs: | ||
horizontalPodAutoscalerName: "sample" | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical |
26 changes: 26 additions & 0 deletions
26
api/v1beta1/testdata/validating/no-horizontal-with-hpa/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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: sample | ||
namespace: default | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: istio-proxy | ||
image: istio-proxy:1.0.0 | ||
ports: | ||
- containerPort: 81 | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 |
27 changes: 27 additions & 0 deletions
27
api/v1beta1/testdata/validating/no-horizontal-with-hpa/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,27 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: sample | ||
namespace: default | ||
spec: | ||
maxReplicas: 10 | ||
metrics: | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: nginx | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: istio-proxy | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
minReplicas: 3 | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: sample |
22 changes: 22 additions & 0 deletions
22
api/v1beta1/testdata/validating/no-horizontal-with-hpa/updating-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,22 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "DeleteAll" | ||
targetRefs: | ||
horizontalPodAutoscalerName: "sample" | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical |
21 changes: 21 additions & 0 deletions
21
api/v1beta1/testdata/validating/no-horizontal-with-no-deletion/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,21 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "NoDelete" | ||
targetRefs: | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical |
26 changes: 26 additions & 0 deletions
26
api/v1beta1/testdata/validating/no-horizontal-with-no-deletion/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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: sample | ||
namespace: default | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: istio-proxy | ||
image: istio-proxy:1.0.0 | ||
ports: | ||
- containerPort: 81 | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 |
27 changes: 27 additions & 0 deletions
27
api/v1beta1/testdata/validating/no-horizontal-with-no-deletion/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,27 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: sample | ||
namespace: default | ||
spec: | ||
maxReplicas: 10 | ||
metrics: | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: nginx | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: istio-proxy | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
minReplicas: 3 | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: sample |
21 changes: 21 additions & 0 deletions
21
api/v1beta1/testdata/validating/no-horizontal-with-no-deletion/updating-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,21 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "NoDelete" | ||
targetRefs: | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical |
22 changes: 22 additions & 0 deletions
22
api/v1beta1/testdata/validating/success-remove-all-horizontal/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,22 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "NoDelete" | ||
targetRefs: | ||
horizontalPodAutoscalerName: "sample" | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Horizontal | ||
memory: Vertical |
26 changes: 26 additions & 0 deletions
26
api/v1beta1/testdata/validating/success-remove-all-horizontal/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,26 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: sample | ||
namespace: default | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: istio-proxy | ||
image: istio-proxy:1.0.0 | ||
ports: | ||
- containerPort: 81 | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 |
27 changes: 27 additions & 0 deletions
27
api/v1beta1/testdata/validating/success-remove-all-horizontal/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,27 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: sample | ||
namespace: default | ||
spec: | ||
maxReplicas: 10 | ||
metrics: | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: nginx | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
- type: ContainerResource | ||
containerResource: | ||
name: cpu | ||
container: istio-proxy | ||
target: | ||
type: Utilization | ||
averageUtilization: 60 | ||
minReplicas: 3 | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: sample |
21 changes: 21 additions & 0 deletions
21
api/v1beta1/testdata/validating/success-remove-all-horizontal/updating-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,21 @@ | ||
apiVersion: autoscaling.mercari.com/v1beta1 | ||
kind: Tortoise | ||
metadata: | ||
name: tortoise-sample | ||
namespace: default | ||
spec: | ||
updateMode: "Off" | ||
deletionPolicy: "DeleteAll" | ||
targetRefs: | ||
scaleTargetRef: | ||
kind: Deployment | ||
name: sample | ||
resourcePolicy: | ||
- containerName: istio-proxy | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical | ||
- containerName: nginx | ||
autoscalingPolicy: | ||
cpu: Vertical | ||
memory: Vertical |
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
Oops, something went wrong.